cleanup
|
1 |
<% |
2 |
# API |
|
3 |
my $api = Gitprep::API->new($self); |
|
4 | ||
implement archive download
|
5 |
# Parameters |
cleanup
|
6 |
my $user = param('user'); |
cleanup, rename repository t...
|
7 |
my $project = param('project'); |
improved tag page design
|
8 |
my $page = param('page') || 1; |
cleanup
|
9 |
|
10 |
# Git |
|
revert encoding support
|
11 |
my $git = $self->app->git; |
cleanup
|
12 |
|
13 |
# Ref names |
|
improved tag page design
|
14 |
my $limit = app->config->{basic}{tags_limit}; |
improve tags page design
|
15 |
my $page_count = 20; |
improved tag page design
|
16 |
my $tags = $git->tags( |
17 |
$user, |
|
18 |
$project, |
|
19 |
$limit, |
|
20 |
$page_count, |
|
21 |
$page_count * ($page - 1) |
|
22 |
); |
|
fixed tags page paging bug a...
|
23 |
my $tags_count = $git->tags_count($user, $project); |
cleanup
|
24 |
%> |
25 | ||
add title
|
26 |
% layout 'common', title => "Tags \x{30fb} $user/$project"; |
cleanup
|
27 |
|
28 |
%= include '/include/header'; |
|
29 | ||
cleanup tags page
|
30 |
<div class="container"> |
cleanup
|
31 |
|
improve tags page design
|
32 |
<h3 class="topic1">Tags</h3> |
improved tags page design
|
33 |
|
34 |
% if (@$tags) { |
|
improve tags page design
|
35 |
<ul class="tags"> |
improved desingn
|
36 |
% for (my $i = 0; $i < @$tags; $i++) { |
37 |
% my $tag = $tags->[$i]; |
|
38 |
% my $name = $tag->{name}; |
|
39 |
% my $tag_class = $i == @$tags - 1 ? 'tag tag_last' : 'tag'; |
|
improve tags page design
|
40 |
<li> |
41 |
<ul class="tags-item"> |
|
42 |
<li> |
|
43 |
<span title="<%= $tag->{commit}{age_string_datetime_local} %>">on <%= $tag->{commit}{age_string_date_local} %></span> |
|
44 |
</li> |
|
45 |
<li class="last-child"> |
|
46 |
<div class="tags-name"> |
|
improved tags page design
|
47 |
<a class="font-black" href="<%= url_for("/$user/$project/tree/$name") %>"> |
48 |
<b><%= $name %></b> |
|
49 |
% if (defined $tag->{comment_short}) { |
|
50 |
- <span style="color:#333"><%= $tag->{comment_short} %></span> |
|
51 |
% } |
|
52 |
</a> |
|
53 |
</div> |
|
improve tags page design
|
54 |
<div class="tags-links"> |
improved tags page design
|
55 |
% my $commit_id = $tag->{commit}{id}; |
56 |
<a class="muted" href="<%= url_for("/$user/$project/commit/$commit_id") %>"> |
|
57 |
<i class="icon-share-alt"></i> |
|
58 |
<%= substr($commit_id, 0, 7) %> |
|
59 |
</a> |
|
fix ignore space link
|
60 |
% if (app->config->{basic}{show_ignore_space_change_link}) { |
61 |
(<a style="font-size:90%;color:#9999FF" href="<%= url_for("/$user/$project/commit/$commit_id?w=") %>"> |
|
62 |
ignore space |
|
63 |
</a>) |
|
64 |
% } |
|
improve tags page design
|
65 |
<a href="<%= url_for("/$user/$project/archive/$name.zip") %>"> |
improved tags page design
|
66 |
<i class="icon-file"></i> |
67 |
zip |
|
68 |
</a> |
|
improve tags page design
|
69 |
<a href="<%= url_for("/$user/$project/archive/$name.tar.gz") %>"> |
improved tags page design
|
70 |
<i class="icon-file"></i> |
71 |
tar.gz |
|
72 |
</a> |
|
73 |
</div> |
|
improve tags page design
|
74 |
</li> |
75 |
</ul> |
|
76 |
</li> |
|
improved desingn
|
77 |
% } |
improve tags page design
|
78 |
</ul> |
79 | ||
80 |
% if ($tags_count > $page_count) { |
|
81 |
<div class="pagenation-container" style="margin-top:20px"> |
|
82 |
<ul class="pagenation"> |
|
fixed tags page paging bug a...
|
83 |
% if ($page == 1) { |
improve tags page design
|
84 |
<li><span>Newer</span></li> |
fixed tags page paging bug a...
|
85 |
% } else { |
86 |
% my $newer_page = $page - 1; |
|
87 |
<li class="disable"> |
|
improve tags page design
|
88 |
<a href="<%= url_for("/$user/$project/tags?page=$newer_page") %>">Newer</a> |
fixed tags page paging bug a...
|
89 |
</li> |
90 |
% } |
|
91 |
% if (@$tags < $page_count) { |
|
improve tags page design
|
92 |
<li><span>Older</span></li> |
fixed tags page paging bug a...
|
93 |
% } else { |
94 |
% my $older_page = $page + 1; |
|
95 |
<li> |
|
improve tags page design
|
96 |
<a href="<%= url_for("/$user/$project/tags?page=$older_page") %>">Older</a> |
fixed tags page paging bug a...
|
97 |
</li> |
98 |
% } |
|
99 |
</ul> |
|
improve tags page design
|
100 |
</div> |
101 |
% } |
|
improved tags page design
|
102 |
% } else { |
improve tags page design
|
103 |
<ul class="tags"> |
104 |
<li> |
|
105 |
No Tags. |
|
106 |
</li> |
|
107 |
</ul> |
|
improved tags page design
|
108 |
% } |
copy gitweblite soruce code
|
109 |
</div> |
cleanup
|
110 |
|
111 |
%= include '/include/footer'; |