add tag action
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
diff --git a/gotweb/files/htdocs/gotweb/gotweb.css b/gotweb/files/htdocs/gotweb/gotweb.css
index 231a314..adcf32b 100644
--- a/gotweb/files/htdocs/gotweb/gotweb.css
+++ b/gotweb/files/htdocs/gotweb/gotweb.css
@@ -482,6 +482,45 @@ body {
padding-bottom: 20px;
}
+/* tag.tmpl */
+
+#log_tag_title_wrapper {
+ clear: left;
+ float: left;
+ width: 100%;
+ background-color: LightSlateGray;
+ color: #ffffff;
+}
+#log_tag_title {
+ padding-left: 10px;
+ padding-top: 5px;
+ padding-bottom: 5px;
+}
+#log_tag_content {
+ clear: left;
+ float: left;
+ width: 100%;
+}
+#log_tag_row_wrapper {
+ clear: left;
+ float: left;
+ background-color: #f5fcfb;
+ width: 100%;
+}
+#log_tag_commit {
+ clear: left;
+ float: left;
+ padding-left: 10px;
+ padding-top: 5px;
+ padding-bottom: 2px;
+}
+#log_tag {
+ clear: left;
+ float: left;
+ padding: 20px;
+ font-family: monospace;
+}
+
/* tree.tmpl */
#log_tree_title_wrapper {
diff --git a/gotweb/gotweb.c b/gotweb/gotweb.c
index 27dcfca..5190de1 100644
--- a/gotweb/gotweb.c
+++ b/gotweb/gotweb.c
@@ -833,7 +833,7 @@ gw_parse_querystring(struct trans *gw_trans)
action = &gw_query_funcs[i];
if (action->func_name == NULL)
continue;
-khttp_puts(gw_trans->gw_req, p->parsed.s);
+
if (strcmp(action->func_name,
p->parsed.s) == 0) {
gw_trans->action = i;
@@ -1302,7 +1302,7 @@ gw_get_repo_log(struct trans *gw_trans, const char *search_pattern,
*commit_diff_disp = NULL, *logbriefs_navs_html = NULL,
*log_tree_html = NULL, *log_commit_html = NULL,
*log_diff_html = NULL, *commit_tree = NULL,
- *commit_tree_disp = NULL;
+ *commit_tree_disp = NULL, *log_tag_html = NULL;
char *commit_log0, *newline;
regex_t regex;
int have_match;
@@ -1674,15 +1674,15 @@ gw_get_repo_log(struct trans *gw_trans, const char *search_pattern,
logbriefs_navs_html = NULL;
break;
case (LOGTAG):
- log_tree_html = strdup("tag log here");
+ log_tag_html = strdup("tag log here");
- if ((asprintf(&commit_row, log_tree_row,
- gw_html_escape(commit_log), log_tree_html)) == -1) {
+ if ((asprintf(&commit_row, log_tag_row,
+ gw_html_escape(commit_log), log_tag_html)) == -1) {
error = got_error_from_errno("asprintf");
goto done;
}
- free(log_tree_html);
+ free(log_tag_html);
break;
case (LOGTREE):
log_tree_html = strdup("log tree here");
diff --git a/gotweb/gotweb_ui.h b/gotweb/gotweb_ui.h
index f6dde10..06568ca 100644
--- a/gotweb/gotweb_ui.h
+++ b/gotweb/gotweb_ui.h
@@ -193,6 +193,21 @@ char *logs_navs =
"<a href='?path=%s&action=tree&commit=%s'>tree</a><!--/* | " \
"<a href='?path=%s&action=snapshot&commit=%s'>snapshot</a> */-->";
+/* tag.tmpl */
+
+char *log_tag =
+ "<div id='log_tree_title_wrapper'>" \
+ "<div id='log_tree_title'>Tag</div></div>" \
+ "<div id='log_tree_content'>%s</div>";
+
+char *log_tag_row =
+ "<div id='log_tag_row_wrapper'>" \
+ "<div id='log_tag_commit'>%s</div>" \
+ "</div>" \
+ "<div id='dotted_line'></div>" \
+ "<div id='log_tag'>%s</div>" \
+ "</div>";
+
/* tree.tmpl */
char *log_tree =