summaryrefslogtreecommitdiff
path: root/ui-stats.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ui-stats.c51
1 files changed, 27 insertions, 24 deletions
diff --git a/ui-stats.c b/ui-stats.c
index 2a0c174..36e17d9 100644
--- a/ui-stats.c
+++ b/ui-stats.c
@@ -386,6 +386,33 @@ void cgit_show_stats(struct cgit_context *ctx)
top = ctx->qry.ofs;
if (!top)
top = 10;
+
+ html("<div class='cgit-panel'>");
+ html("<b>stat options</b>");
+ html("<form method='get' action=''>");
+ cgit_add_hidden_formfields(1, 0, "stats");
+ html("<table><tr><td colspan='2'/></tr>");
+ if (ctx->repo->max_stats > 1) {
+ html("<tr><td class='label'>Period:</td>");
+ html("<td class='ctrl'><select name='period' onchange='this.form.submit();'>");
+ for (i = 0; i < ctx->repo->max_stats; i++)
+ html_option(fmt("%c", periods[i].code),
+ periods[i].name, fmt("%c", period->code));
+ html("</select></td></tr>");
+ }
+ html("<tr><td class='label'>Authors:</td>");
+ html("<td class='ctrl'><select name='ofs' onchange='this.form.submit();'>");
+ html_intoption(10, "10", top);
+ html_intoption(25, "25", top);
+ html_intoption(50, "50", top);
+ html_intoption(100, "100", top);
+ html_intoption(-1, "all", top);
+ html("</select></td><tr>");
+ html("<tr><td/><td class='ctrl'>");
+ html("<noscript><input type='submit' value='Reload'/></noscript>");
+ html("</td></tr></table>");
+ html("</form>");
+ html("</div>");
htmlf("<h2>Commits per author per %s", period->name);
if (ctx->qry.path) {
html(" (path '");
@@ -393,30 +420,6 @@ void cgit_show_stats(struct cgit_context *ctx)
html("')");
}
html("</h2>");
-
- html("<form method='get' action='' style='float: right; text-align: right;'>");
- cgit_add_hidden_formfields(1, 0, "stats");
- if (ctx->repo->max_stats > 1) {
- html("Period: ");
- html("<select name='period' onchange='this.form.submit();'>");
- for (i = 0; i < ctx->repo->max_stats; i++)
- htmlf("<option value='%c'%s>%s</option>",
- periods[i].code,
- period == &periods[i] ? " selected" : "",
- periods[i].name);
- html("</select><br/><br/>");
- }
- html("Authors: ");
- html("");
- html("<select name='ofs' onchange='this.form.submit();'>");
- htmlf("<option value='10'%s>10</option>", top == 10 ? " selected" : "");
- htmlf("<option value='25'%s>25</option>", top == 25 ? " selected" : "");
- htmlf("<option value='50'%s>50</option>", top == 50 ? " selected" : "");
- htmlf("<option value='100'%s>100</option>", top == 100 ? " selected" : "");
- htmlf("<option value='-1'%s>All</option>", top == -1 ? " selected" : "");
- html("</select>");
- html("<noscript>&nbsp;&nbsp;<input type='submit' value='Reload'/></noscript>");
- html("</form>");
print_authors(&authors, top, period);
}
loading of the external menuRené 'Necoro' Neumann2-3/+25 2009-09-06Make glade update the MainWindow.ui fileRené 'Necoro' Neumann1-85/+134 2009-09-06Moved the menu to an extra fileRené 'Necoro' Neumann2-210/+207 2009-09-05One database instance is enough :)René 'Necoro' Neumann1-7/+18 2009-09-05Print database type at the bottom of exceptions. NOTE: This does not handle m...René 'Necoro' Neumann2-1/+6 2009-09-05Fix an error, where a category vanishes after refreshing, using the EixSQLDat...René 'Necoro' Neumann2-1/+19 2009-09-03And here is the debugging again :) ... using ctypesRené 'Necoro' Neumann1-1/+8 2009-09-03Screw debugging ... prefer the ctypes approach to get rid of yet another c-mo...René 'Necoro' Neumann3-27/+11 2009-09-03Use this wrapper instead of ctypes to set the textdomain and stuff for the gt...René 'Necoro' Neumann1-9/+5 2009-09-03Add small wrapper to C-gettextRené 'Necoro' Neumann2-1/+22 2009-08-31Update messages.potRené 'Necoro' Neumann1-42/+94 2009-08-31Removed the gtk- strings from translationsRené 'Necoro' Neumann7-3639/+3479 2009-08-31Removed the 'translatable' attribute from 'gtk-*' stringsRené 'Necoro' Neumann5-11/+11 2009-08-31Removed TODO. Renamed ChangeLog to TODORené 'Necoro' Neumann2-40/+0 2009-08-27Only import stuff if necessaryRené 'Necoro' Neumann1-8/+8 2009-08-25Release the threadQueue-Lock in syncv0.13René 'Necoro' Neumann1-0/+1 2009-08-25Updated portugese translationAlberto Federman Neto1-650/+687 2009-08-15Update spanish translationDaniel Halens1-245/+258 2009-08-15Use boolean flags instead of obscure C flags for ipc.MessageQueueRené 'Necoro' Neumann3-13/+15 2009-08-15TypoRené 'Necoro' Neumann1-1/+1 2009-08-15Enhanced the extensions.shRené 'Necoro' Neumann1-3/+8 2009-08-15Move eix-format to correct locationRené 'Necoro' Neumann1-0/+0