Commit 077f6c5a028d1105ce638b73bf2571e2df757471

Tracey Emery 2020-01-15T22:10:30

add tag action

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 =