author | Lars Hjemli <hjemli@gmail.com> | 2007-10-27 08:47:44 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-10-27 08:53:28 (UTC) |
commit | ac1f493b6bbc589327e9ba3303f112fcd323c6b6 (patch) (unidiff) | |
tree | 4729ecc84e0b24b044131546ff39bdd55a6cd9a6 /ui-shared.c | |
parent | 7937d06090dd5e19145ec6fa8befc5770954b30c (diff) | |
download | cgit-ac1f493b6bbc589327e9ba3303f112fcd323c6b6.zip cgit-ac1f493b6bbc589327e9ba3303f112fcd323c6b6.tar.gz cgit-ac1f493b6bbc589327e9ba3303f112fcd323c6b6.tar.bz2 |
Add links to the new refs page from summary page
If either branches or tags are filtered on the summary page, add a link to
refs/heads and/or refs/tags right below the last branch/tag.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | ui-shared.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ui-shared.c b/ui-shared.c index 5c5bcf3..e4bb98f 100644 --- a/ui-shared.c +++ b/ui-shared.c | |||
@@ -206,48 +206,54 @@ void cgit_log_link(char *name, char *title, char *class, char *head, | |||
206 | delim = "&"; | 206 | delim = "&"; |
207 | } | 207 | } |
208 | if (ofs > 0) { | 208 | if (ofs > 0) { |
209 | html(delim); | 209 | html(delim); |
210 | html("ofs="); | 210 | html("ofs="); |
211 | htmlf("%d", ofs); | 211 | htmlf("%d", ofs); |
212 | } | 212 | } |
213 | html("'>"); | 213 | html("'>"); |
214 | html_txt(name); | 214 | html_txt(name); |
215 | html("</a>"); | 215 | html("</a>"); |
216 | } | 216 | } |
217 | 217 | ||
218 | void cgit_commit_link(char *name, char *title, char *class, char *head, | 218 | void cgit_commit_link(char *name, char *title, char *class, char *head, |
219 | char *rev) | 219 | char *rev) |
220 | { | 220 | { |
221 | if (strlen(name) > cgit_max_msg_len && cgit_max_msg_len >= 15) { | 221 | if (strlen(name) > cgit_max_msg_len && cgit_max_msg_len >= 15) { |
222 | name[cgit_max_msg_len] = '\0'; | 222 | name[cgit_max_msg_len] = '\0'; |
223 | name[cgit_max_msg_len - 1] = '.'; | 223 | name[cgit_max_msg_len - 1] = '.'; |
224 | name[cgit_max_msg_len - 2] = '.'; | 224 | name[cgit_max_msg_len - 2] = '.'; |
225 | name[cgit_max_msg_len - 3] = '.'; | 225 | name[cgit_max_msg_len - 3] = '.'; |
226 | } | 226 | } |
227 | reporevlink("commit", name, title, class, head, rev, NULL); | 227 | reporevlink("commit", name, title, class, head, rev, NULL); |
228 | } | 228 | } |
229 | 229 | ||
230 | void cgit_refs_link(char *name, char *title, char *class, char *head, | ||
231 | char *rev, char *path) | ||
232 | { | ||
233 | reporevlink("refs", name, title, class, head, rev, path); | ||
234 | } | ||
235 | |||
230 | void cgit_snapshot_link(char *name, char *title, char *class, char *head, | 236 | void cgit_snapshot_link(char *name, char *title, char *class, char *head, |
231 | char *rev, char *archivename) | 237 | char *rev, char *archivename) |
232 | { | 238 | { |
233 | reporevlink("snapshot", name, title, class, head, rev, archivename); | 239 | reporevlink("snapshot", name, title, class, head, rev, archivename); |
234 | } | 240 | } |
235 | 241 | ||
236 | void cgit_diff_link(char *name, char *title, char *class, char *head, | 242 | void cgit_diff_link(char *name, char *title, char *class, char *head, |
237 | char *new_rev, char *old_rev, char *path) | 243 | char *new_rev, char *old_rev, char *path) |
238 | { | 244 | { |
239 | char *delim; | 245 | char *delim; |
240 | 246 | ||
241 | delim = repolink(title, class, "diff", head, path); | 247 | delim = repolink(title, class, "diff", head, path); |
242 | if (new_rev && strcmp(new_rev, cgit_query_head)) { | 248 | if (new_rev && strcmp(new_rev, cgit_query_head)) { |
243 | html(delim); | 249 | html(delim); |
244 | html("id="); | 250 | html("id="); |
245 | html_attr(new_rev); | 251 | html_attr(new_rev); |
246 | delim = "&"; | 252 | delim = "&"; |
247 | } | 253 | } |
248 | if (old_rev) { | 254 | if (old_rev) { |
249 | html(delim); | 255 | html(delim); |
250 | html("id2="); | 256 | html("id2="); |
251 | html_attr(old_rev); | 257 | html_attr(old_rev); |
252 | } | 258 | } |
253 | html("'>"); | 259 | html("'>"); |