-rw-r--r-- | ui-summary.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ui-summary.c b/ui-summary.c index ff3ed4d..42f4300 100644 --- a/ui-summary.c +++ b/ui-summary.c | |||
@@ -84,56 +84,58 @@ static int cgit_print_tag_cb(const char *refname, const unsigned char *sha1, | |||
84 | if (!tag || parse_tag(tag) || !(info = cgit_parse_tag(tag))) | 84 | if (!tag || parse_tag(tag) || !(info = cgit_parse_tag(tag))) |
85 | return 2; | 85 | return 2; |
86 | html("<tr><td>"); | 86 | html("<tr><td>"); |
87 | url = cgit_pageurl(cgit_query_repo, "view", | 87 | url = cgit_pageurl(cgit_query_repo, "view", |
88 | fmt("id=%s", sha1_to_hex(sha1))); | 88 | fmt("id=%s", sha1_to_hex(sha1))); |
89 | html_link_open(url, NULL, NULL); | 89 | html_link_open(url, NULL, NULL); |
90 | html_txt(buf); | 90 | html_txt(buf); |
91 | html_link_close(); | 91 | html_link_close(); |
92 | html("</td><td>"); | 92 | html("</td><td>"); |
93 | if (info->tagger_date > 0) | 93 | if (info->tagger_date > 0) |
94 | cgit_print_date(info->tagger_date); | 94 | cgit_print_date(info->tagger_date); |
95 | html("</td><td>"); | 95 | html("</td><td>"); |
96 | if (info->tagger) | 96 | if (info->tagger) |
97 | html(info->tagger); | 97 | html(info->tagger); |
98 | html("</td><td>"); | 98 | html("</td><td>"); |
99 | cgit_print_object_ref(tag->tagged); | 99 | cgit_print_object_ref(tag->tagged); |
100 | html("</td></tr>\n"); | 100 | html("</td></tr>\n"); |
101 | } else { | 101 | } else { |
102 | html("<tr><td>"); | 102 | html("<tr><td>"); |
103 | html_txt(buf); | 103 | html_txt(buf); |
104 | html("</td><td colspan='2'/><td>"); | 104 | html("</td><td colspan='2'/><td>"); |
105 | cgit_print_object_ref(obj); | 105 | cgit_print_object_ref(obj); |
106 | html("</td></tr>\n"); | 106 | html("</td></tr>\n"); |
107 | } | 107 | } |
108 | return 0; | 108 | return 0; |
109 | } | 109 | } |
110 | 110 | ||
111 | static void cgit_print_branches() | 111 | static void cgit_print_branches() |
112 | { | 112 | { |
113 | html("<tr class='nohover'><th class='left'>Branch</th>" | 113 | html("<tr class='nohover'><th class='left'>Branch</th>" |
114 | "<th class='left'>Updated</th>" | 114 | "<th class='left'>Updated</th>" |
115 | "<th class='left'>Author</th>" | 115 | "<th class='left'>Author</th>" |
116 | "<th class='left'>Head commit</th></tr>\n"); | 116 | "<th class='left'>Head commit</th></tr>\n"); |
117 | for_each_branch_ref(cgit_print_branch_cb, NULL); | 117 | for_each_branch_ref(cgit_print_branch_cb, NULL); |
118 | } | 118 | } |
119 | 119 | ||
120 | static void cgit_print_tags() | 120 | static void cgit_print_tags() |
121 | { | 121 | { |
122 | html("<tr class='nohover'><th class='left'>Tag</th>" | 122 | html("<tr class='nohover'><th class='left'>Tag</th>" |
123 | "<th class='left'>Created</th>" | 123 | "<th class='left'>Created</th>" |
124 | "<th class='left'>Author</th>" | 124 | "<th class='left'>Author</th>" |
125 | "<th class='left'>Reference</th></tr>\n"); | 125 | "<th class='left'>Reference</th></tr>\n"); |
126 | for_each_tag_ref(cgit_print_tag_cb, NULL); | 126 | for_each_tag_ref(cgit_print_tag_cb, NULL); |
127 | } | 127 | } |
128 | 128 | ||
129 | void cgit_print_summary() | 129 | void cgit_print_summary() |
130 | { | 130 | { |
131 | html("<h2>"); | 131 | html("<h2>"); |
132 | html_txt("Repo summary page"); | 132 | html(cgit_repo->name); |
133 | html("</h2>"); | 133 | html("</h2><h3>"); |
134 | html(cgit_repo->desc); | ||
135 | html("</h3>"); | ||
134 | html("<table class='list nowrap'>"); | 136 | html("<table class='list nowrap'>"); |
135 | cgit_print_branches(); | 137 | cgit_print_branches(); |
136 | html("<tr class='nohover'><td colspan='4'> </td></tr>"); | 138 | html("<tr class='nohover'><td colspan='4'> </td></tr>"); |
137 | cgit_print_tags(); | 139 | cgit_print_tags(); |
138 | html("</table>"); | 140 | html("</table>"); |
139 | } | 141 | } |