... | ... |
@@ -78,7 +78,7 @@ sub startup { |
78 | 78 |
$r->get('/:user/:project/downloads')->to('#downloads'); |
79 | 79 |
|
80 | 80 |
# Tree |
81 |
- $r->get('/:user/:project/tree/(*id_dir)')->to('#tree'); |
|
81 |
+ $r->get('/:user/:project/tree/(*object)')->to('#tree'); |
|
82 | 82 |
|
83 | 83 |
# Blob |
84 | 84 |
$r->get('/:user/:project/blob/(*object)')->to('#blob'); |
... | ... |
@@ -16,7 +16,7 @@ |
16 | 16 |
<a href="<%= url_for('log', project => $project_ns, id => "refs/heads/$name") %>"> |
17 | 17 |
log |
18 | 18 |
</a> | |
19 |
- <a href="<%= url_for('tree', project => $project_ns, id_dir => $name) %>"> |
|
19 |
+ <a href="<%= url_for('tree', project => $project_ns, object => $name) %>"> |
|
20 | 20 |
tree |
21 | 21 |
</a> |
22 | 22 |
</td> |
... | ... |
@@ -35,6 +35,6 @@ |
35 | 35 |
% if ($current eq 'tree') { |
36 | 36 |
Tree |
37 | 37 |
% } else { |
38 |
- <a href="<%= url_for('tree', project => $project_ns, id_dir => $id) %>">Tree</a> |
|
38 |
+ <a href="<%= url_for('tree', project => $project_ns, object => $id) %>">Tree</a> |
|
39 | 39 |
% } |
40 | 40 |
</div> |
... | ... |
@@ -1,40 +0,0 @@ |
1 |
-% layout 'common'; |
|
2 |
- %= include '/include/header', title => 'Log', project => $project; |
|
3 |
- %= include '/include/current_directory', home_ns => $home_ns, home => $home; |
|
4 |
- %= include '/include/page_navi', current => 'log',project_ns => $project_ns; |
|
5 |
- |
|
6 |
- <%= include '/include/page_navi2', current => 'log', id => $id, |
|
7 |
- page => $page, page_count => $page_count, commits => $commits; |
|
8 |
- %> |
|
9 |
- |
|
10 |
- % for my $commit (@$commits) { |
|
11 |
- <div class="header"> |
|
12 |
- <a class="title" href="<%= url_for('commit', project => $project_ns, id => $commit->{id}) %>"> |
|
13 |
- <span class="age" style="font-size:70%"> |
|
14 |
- <%= $commit->{age_string} %> |
|
15 |
- </span> |
|
16 |
- |
|
17 |
- <%= $commit->{title} %> |
|
18 |
- </a> |
|
19 |
- </div> |
|
20 |
- <div class="title_text"> |
|
21 |
- <div class="log_link"> |
|
22 |
- <a href="<%= url_for('commit', project => $project_ns, id => $commit->{id}) %>">commit</a> | |
|
23 |
- <a href="<%= url_for('commitdiff', project => $project_ns, diff => $commit->{id}) %>"> |
|
24 |
- commitdiff |
|
25 |
- </a> |
|
26 |
- | |
|
27 |
- <a href="<%= url_for('tree', project => $project_ns, |
|
28 |
- id_dir => $commit->{id}) %>"> |
|
29 |
- tree |
|
30 |
- </a><br/> |
|
31 |
- </div> |
|
32 |
- <span class="author_date"><%= $commit->{author_name} %> [<%= $commit->{author_date} %>]</span> |
|
33 |
- <br/> |
|
34 |
- </div> |
|
35 |
- <div class="log_body"> |
|
36 |
- %= include 'include/refs', project_ns => $project_ns, commit => $commit, refs => $refs; |
|
37 |
- <%= $commit->{title} %><br/> |
|
38 |
- <br/> |
|
39 |
- </div> |
|
40 |
- % } |
... | ... |
@@ -7,7 +7,7 @@ |
7 | 7 |
# Parameters |
8 | 8 |
my $user = param('user'); |
9 | 9 |
my $project = param('project'); |
10 |
- my $id_dir ||= param('id_dir') || 'master/'; |
|
10 |
+ my $object ||= param('object') || 'master/'; |
|
11 | 11 |
|
12 | 12 |
# API |
13 | 13 |
my $api = Gitprep::API->new($self); |
... | ... |
@@ -21,7 +21,7 @@ |
21 | 21 |
my $home = "/$home_ns"; |
22 | 22 |
|
23 | 23 |
# Id and directory |
24 |
- my ($id, $dir) = $api->parse_id_path($rep, $id_dir); |
|
24 |
+ my ($id, $dir) = $api->parse_id_path($rep, $object); |
|
25 | 25 |
|
26 | 26 |
# Git |
27 | 27 |
my $git = app->git; |
... | ... |
@@ -1,58 +0,0 @@ |
1 |
-% layout 'common'; |
|
2 |
- %= include '/include/header', title => 'Short Log', project => $project; |
|
3 |
- %= include '/include/current_directory', home_ns => $home_ns, home => $home; |
|
4 |
- %= include '/include/page_navi', current => 'shortlog', project_ns => $project_ns; |
|
5 |
- |
|
6 |
- <%= include '/include/page_navi2', current => 'shortlog', id => $id, |
|
7 |
- page => $page, page_count => $page_count,commits => $commits; |
|
8 |
- %> |
|
9 |
- |
|
10 |
- <div class="header"> |
|
11 |
- <a class="title" href="<%= url_for('shortlog', project => $project_ns) %>"> |
|
12 |
- <%= $project %> |
|
13 |
- </a> |
|
14 |
- </div> |
|
15 |
- <table class="shortlog"> |
|
16 |
- % for (my $i = 0; $i < @$commits; $i++) { |
|
17 |
- % my $commit = $commits->[$i]; |
|
18 |
- % my $id = $commit->{id}; |
|
19 |
- <tr class="<%= $i % 2 ? 'light' : 'dark' %>"> |
|
20 |
- <td title="2012-03-20"><i><%= $commit->{age_string} %></i></td> |
|
21 |
- <td class="author"><%= $commit->{author_name} %></td> |
|
22 |
- <td> |
|
23 |
- <a class="list subject" href= |
|
24 |
- "<%= url_for('commit', project => $project_ns, id => $id) %>"> |
|
25 |
- <%= $commit->{title_short} %> |
|
26 |
- </a> |
|
27 |
- %= include 'include/refs', project_ns => $project_ns, commit => $commit, refs => $refs; |
|
28 |
- </td> |
|
29 |
- <td class="link"> |
|
30 |
- <a href="<%= url_for('commit', project => $project_ns, id => $id) %>">commit</a> |
|
31 |
- | |
|
32 |
- <a href="<%= url_for('commitdiff', project => $project_ns, diff => $id) %>"> |
|
33 |
- commitdiff |
|
34 |
- </a> |
|
35 |
- | |
|
36 |
- <a href="<%= url_for('tree', project => $project_ns, id_dir => $id) %>"> |
|
37 |
- tree |
|
38 |
- </a> |
|
39 |
- | |
|
40 |
- <a title="in format: tar.gz" rel="nofollow" href= |
|
41 |
- <%= url_for('snapshot', project => $project_ns, id => $id) %>> |
|
42 |
- snapshot |
|
43 |
- </a> |
|
44 |
- </td> |
|
45 |
- </tr> |
|
46 |
- % } |
|
47 |
- <tr> |
|
48 |
- <td colspan="4"> |
|
49 |
- % if (@$commits == $page_count) { |
|
50 |
- <a title="Alt-n" accesskey="n" href="<%= url_for('shortlog', project => $project_ns, |
|
51 |
- id => $id)->query(page => $page + 1) %>"> |
|
52 |
- Next |
|
53 |
- </a> |
|
54 |
- % } |
|
55 |
- </td> |
|
56 |
- </tr> |
|
57 |
- </table> |
|
58 |
- |
... | ... |
@@ -1,86 +0,0 @@ |
1 |
-% layout 'common'; |
|
2 |
- %= include '/include/header', title => 'Summary', project => $project; |
|
3 |
- %= include '/include/current_directory', home_ns => $home_ns, home => $home; |
|
4 |
- %= include '/include/page_navi', current => 'summary', project_ns => $project_ns; |
|
5 |
- <table class="projects_list"> |
|
6 |
- <tr id="metadata_desc"><td><b>Description:</b></td><td><%= $project_description %></td></tr> |
|
7 |
- <tr id="metadata_owner"><td><b>Owner:</b></td><td><%= $project_owner %></td></tr> |
|
8 |
- <tr id="metadata_lchange"><td><b>Last change:</b></td><td><%= $last_change %></td></tr> |
|
9 |
- <tr class="metadata_url"> |
|
10 |
- <td><b>URL:</b></td> |
|
11 |
- <td> |
|
12 |
- % for my $url (@$urls) { |
|
13 |
- <%= $url %> |
|
14 |
- <br /> |
|
15 |
- % } |
|
16 |
- </td> |
|
17 |
- </tr> |
|
18 |
- </table> |
|
19 |
- |
|
20 |
- <!-- Shortlog --> |
|
21 |
- <div class="header"> |
|
22 |
- <a class="title" href="<%= url_for('shortlog', project => $project_ns) %>"> |
|
23 |
- Shortlog |
|
24 |
- </a> |
|
25 |
- </div> |
|
26 |
- <table class="shortlog"> |
|
27 |
- |
|
28 |
- % for (my $i = 0; $i < @$commits; $i++) { |
|
29 |
- % my $commit = $commits->[$i]; |
|
30 |
- % my $id = $commit->{id}; |
|
31 |
- <tr class="<%= $i % 2 ? 'light' : 'dark' %>"> |
|
32 |
- <td title="<%= $commit->{age_string_date} %>"><i><%= $commit->{age_string} %></i></td> |
|
33 |
- <td class="author"><%= $commit->{author_name} %></td> |
|
34 |
- <td> |
|
35 |
- <a class="list subject" |
|
36 |
- href="<%= url_for('commit', project => $project_ns, id => $id) %>"> |
|
37 |
- %= $commit->{title_short}; |
|
38 |
- </a> |
|
39 |
- %= include 'include/refs', project_ns => $project_ns, commit => $commit, refs => $refs; |
|
40 |
- </td> |
|
41 |
- <td class="link"> |
|
42 |
- <a href="<%= url_for('commit', project => $project_ns, id => $id) %>"> |
|
43 |
- commit |
|
44 |
- </a> |
|
45 |
- | |
|
46 |
- <a href="<%= url_for('commitdiff', project => $project_ns, diff => $id) %>"> |
|
47 |
- commitdiff |
|
48 |
- </a> |
|
49 |
- | |
|
50 |
- <a href="<%= url_for('tree', project => $project_ns, id_dir => $id) %>"> |
|
51 |
- tree |
|
52 |
- </a> |
|
53 |
- | |
|
54 |
- <a title="in format: tar.gz" rel="nofollow" href= |
|
55 |
- "<%= url_for('snapshot', project => $project_ns, id => $id) %>"> |
|
56 |
- snapshot |
|
57 |
- </a> |
|
58 |
- </td> |
|
59 |
- </tr> |
|
60 |
- % } |
|
61 |
- % if (@$commits == $commit_count) { |
|
62 |
- <tr> |
|
63 |
- <td> |
|
64 |
- <a href="<%= url_for('shortlog', project => $project_ns) %>"> |
|
65 |
- ... |
|
66 |
- </a> |
|
67 |
- </td> |
|
68 |
- </tr> |
|
69 |
- % } |
|
70 |
- </table> |
|
71 |
- |
|
72 |
- <!-- Tags --> |
|
73 |
- <div class="header"> |
|
74 |
- <a class="title" href="<%= url_for('tags', project => $project_ns) %>">Tags</a> |
|
75 |
- </div> |
|
76 |
- <%= include '/include/tags', project_ns => $project_ns, |
|
77 |
- tags => $tags, tag_count => $tag_count, summary => 1; %> |
|
78 |
- |
|
79 |
- <!-- Heads --> |
|
80 |
- <div class="header"> |
|
81 |
- <a class="title" href="<%= url_for('heads', project => $project_ns) %>"> |
|
82 |
- Heads |
|
83 |
- </a> |
|
84 |
- </div> |
|
85 |
- <%= include '/include/heads', project_ns => $project_ns, |
|
86 |
- tags => $tags, head_count => $head_count, summary => 1; %> |
... | ... |
@@ -7,13 +7,13 @@ |
7 | 7 |
# Parameters |
8 | 8 |
my $user = param('user'); |
9 | 9 |
my $project = param('project'); |
10 |
- my $id_dir ||= param('id_dir') || 'master/'; |
|
10 |
+ my $object ||= param('object') || 'master/'; |
|
11 | 11 |
my $root_ns = $api->root_ns(config->{root}); |
12 | 12 |
my $rep_ns = "$root_ns/$user/$project.git"; |
13 | 13 |
my $rep = "/$rep_ns"; |
14 | 14 |
|
15 | 15 |
# Id and directory |
16 |
- my ($id, $dir) = $api->parse_id_path($rep, $id_dir); |
|
16 |
+ my ($id, $dir) = $api->parse_id_path($rep, $object); |
|
17 | 17 |
|
18 | 18 |
# Git |
19 | 19 |
my $git = app->git; |