summaryrefslogtreecommitdiffabout
path: root/ui-summary.c
Unidiff
Diffstat (limited to 'ui-summary.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-summary.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui-summary.c b/ui-summary.c
index 178e959..04a466a 100644
--- a/ui-summary.c
+++ b/ui-summary.c
@@ -191,57 +191,57 @@ void cgit_print_branches(int maxcount)
191 print_refs_link("heads"); 191 print_refs_link("heads");
192} 192}
193 193
194void cgit_print_tags(int maxcount) 194void cgit_print_tags(int maxcount)
195{ 195{
196 struct reflist list; 196 struct reflist list;
197 int i; 197 int i;
198 198
199 header = 0; 199 header = 0;
200 list.refs = NULL; 200 list.refs = NULL;
201 list.alloc = list.count = 0; 201 list.alloc = list.count = 0;
202 for_each_tag_ref(cgit_refs_cb, &list); 202 for_each_tag_ref(cgit_refs_cb, &list);
203 if (list.count == 0) 203 if (list.count == 0)
204 return; 204 return;
205 qsort(list.refs, list.count, sizeof(*list.refs), cmp_tag_age); 205 qsort(list.refs, list.count, sizeof(*list.refs), cmp_tag_age);
206 if (!maxcount) 206 if (!maxcount)
207 maxcount = list.count; 207 maxcount = list.count;
208 else if (maxcount > list.count) 208 else if (maxcount > list.count)
209 maxcount = list.count; 209 maxcount = list.count;
210 print_tag_header(); 210 print_tag_header();
211 for(i=0; i<maxcount; i++) 211 for(i=0; i<maxcount; i++)
212 print_tag(list.refs[i]); 212 print_tag(list.refs[i]);
213 213
214 if (maxcount < list.count) 214 if (maxcount < list.count)
215 print_refs_link("tags"); 215 print_refs_link("tags");
216} 216}
217 217
218static void cgit_print_archives() 218static void cgit_print_archives()
219{ 219{
220 header = 0; 220 header = 0;
221 for_each_ref(cgit_print_archive_cb, NULL); 221 for_each_ref(cgit_print_archive_cb, NULL);
222 if (header) 222 if (header)
223 html("</table>"); 223 html("</table>");
224} 224}
225 225
226void cgit_print_summary() 226void cgit_print_summary()
227{ 227{
228 html("<div id='summary'>"); 228 html("<div id='summary'>");
229 cgit_print_archives(); 229 cgit_print_archives();
230 html("<h2>"); 230 html("<h2>");
231 html_txt(cgit_repo->name); 231 html_txt(cgit_repo->name);
232 html(" - "); 232 html(" - ");
233 html_txt(cgit_repo->desc); 233 html_txt(cgit_repo->desc);
234 html("</h2>"); 234 html("</h2>");
235 if (cgit_repo->readme) 235 if (cgit_repo->readme)
236 html_include(cgit_repo->readme); 236 html_include(cgit_repo->readme);
237 html("</div>"); 237 html("</div>");
238 if (cgit_summary_log > 0) 238 if (cgit_summary_log > 0)
239 cgit_print_log(cgit_query_head, 0, cgit_summary_log, NULL, NULL, 0); 239 cgit_print_log(cgit_query_head, 0, cgit_summary_log, NULL, NULL, NULL, 0);
240 html("<table class='list nowrap'>"); 240 html("<table class='list nowrap'>");
241 if (cgit_summary_log > 0) 241 if (cgit_summary_log > 0)
242 html("<tr class='nohover'><td colspan='4'>&nbsp;</td></tr>"); 242 html("<tr class='nohover'><td colspan='4'>&nbsp;</td></tr>");
243 cgit_print_branches(cgit_summary_branches); 243 cgit_print_branches(cgit_summary_branches);
244 html("<tr class='nohover'><td colspan='4'>&nbsp;</td></tr>"); 244 html("<tr class='nohover'><td colspan='4'>&nbsp;</td></tr>");
245 cgit_print_tags(cgit_summary_tags); 245 cgit_print_tags(cgit_summary_tags);
246 html("</table>"); 246 html("</table>");
247} 247}