9 |
|
|
10 |
use Data::Dump qw/dump/; |
use Data::Dump qw/dump/; |
11 |
|
|
12 |
template '/x' => page { |
template '/x-list' => page { |
13 |
h1 { _("SVN Repository browser") }; |
h1 { _("SVN Repository browser") }; |
14 |
|
|
15 |
form { |
form { |
37 |
label => _("Filter commits") |
label => _("Filter commits") |
38 |
); |
); |
39 |
|
|
40 |
warn "####",dump( $filter->result->content ); |
#warn "####",dump( $filter->result->content ); |
41 |
|
|
42 |
my $revisions = $filter->result->content('revisions'); |
my $revisions = $filter->result->content('revisions'); |
43 |
if ( $revisions ) { |
if ( $revisions ) { |
44 |
|
|
45 |
sub pager { |
sub pager { |
46 |
|
my $revisions = shift; |
47 |
|
|
48 |
div { |
div { |
49 |
attr { class => 'pager' }; |
attr { class => 'pager' }; |
72 |
} |
} |
73 |
} |
} |
74 |
|
|
75 |
pager; |
pager( $revisions ); |
76 |
|
|
77 |
|
my $show_actions = get('show_actions') || $filter->argument_value('show_actions'); |
78 |
|
my $rel_path = get('rel_path') || $filter->argument_value('rel_path'); |
79 |
|
warn "### show_actions = $show_actions"; |
80 |
|
|
81 |
dl { |
dl { |
82 |
attr { class => 'results' }; |
attr { class => 'results' }; |
85 |
tt { $r->revision } |
tt { $r->revision } |
86 |
span { attr { class => 'author' } $r->author } |
span { attr { class => 'author' } $r->author } |
87 |
span { attr { class => 'commit_date' } $r->commit_date } |
span { attr { class => 'commit_date' } $r->commit_date } |
|
# actions |
|
|
span { $r->id } |
|
88 |
} |
} |
89 |
dd { |
dd { |
90 |
pre { attr { class => 'commit_message' } $r->message } |
pre { attr { class => 'commit_message' } $r->message } |
91 |
|
}; |
92 |
|
|
93 |
|
if ( $show_actions ) { |
94 |
|
my $actions = SVNBrowser::Model::ActionCollection->new(); |
95 |
|
$actions->unlimit; |
96 |
|
$actions->limit( column => 'revision', value => $r->revision ); |
97 |
|
$actions->limit( column => 'rel_path', value => $rel_path, operator => 'STARTSWITH' ) if ($rel_path); |
98 |
|
|
99 |
|
ul { attr { class => 'actions' }; |
100 |
|
while (my $a = $actions->next) { |
101 |
|
li { |
102 |
|
tt { attr { class => 'action-' . $a->type } |
103 |
|
$a->type, |
104 |
|
$a->branch, |
105 |
|
$a->rel_path |
106 |
|
} |
107 |
|
} |
108 |
|
} |
109 |
|
} |
110 |
} |
} |
111 |
} |
} |
112 |
} |
} |
113 |
|
|
114 |
pager; |
pager( $revisions ); |
115 |
|
|
116 |
} |
} |
117 |
|
|
119 |
|
|
120 |
}; |
}; |
121 |
|
|
|
|
|