|
@@
-1,465
+1,462
b''
|
|
1
|
## DATA TABLE RE USABLE ELEMENTS
|
|
1
|
## DATA TABLE RE USABLE ELEMENTS
|
|
2
|
## usage:
|
|
2
|
## usage:
|
|
3
|
## <%namespace name="dt" file="/data_table/_dt_elements.mako"/>
|
|
3
|
## <%namespace name="dt" file="/data_table/_dt_elements.mako"/>
|
|
4
|
<%namespace name="base" file="/base/base.mako"/>
|
|
4
|
<%namespace name="base" file="/base/base.mako"/>
|
|
5
|
|
|
5
|
|
|
6
|
<%def name="metatags_help()">
|
|
6
|
<%def name="metatags_help()">
|
|
7
|
<table>
|
|
7
|
<table>
|
|
8
|
<%
|
|
8
|
<%
|
|
9
|
example_tags = [
|
|
9
|
example_tags = [
|
|
10
|
('state','[stable]'),
|
|
10
|
('state','[stable]'),
|
|
11
|
('state','[stale]'),
|
|
11
|
('state','[stale]'),
|
|
12
|
('state','[featured]'),
|
|
12
|
('state','[featured]'),
|
|
13
|
('state','[dev]'),
|
|
13
|
('state','[dev]'),
|
|
14
|
('state','[dead]'),
|
|
14
|
('state','[dead]'),
|
|
15
|
('state','[deprecated]'),
|
|
15
|
('state','[deprecated]'),
|
|
16
|
|
|
16
|
|
|
17
|
('label','[personal]'),
|
|
17
|
('label','[personal]'),
|
|
18
|
('generic','[v2.0.0]'),
|
|
18
|
('generic','[v2.0.0]'),
|
|
19
|
|
|
19
|
|
|
20
|
('lang','[lang => JavaScript]'),
|
|
20
|
('lang','[lang => JavaScript]'),
|
|
21
|
('license','[license => LicenseName]'),
|
|
21
|
('license','[license => LicenseName]'),
|
|
22
|
|
|
22
|
|
|
23
|
('ref','[requires => RepoName]'),
|
|
23
|
('ref','[requires => RepoName]'),
|
|
24
|
('ref','[recommends => GroupName]'),
|
|
24
|
('ref','[recommends => GroupName]'),
|
|
25
|
('ref','[conflicts => SomeName]'),
|
|
25
|
('ref','[conflicts => SomeName]'),
|
|
26
|
('ref','[base => SomeName]'),
|
|
26
|
('ref','[base => SomeName]'),
|
|
27
|
('url','[url => [linkName](https://rhodecode.com)]'),
|
|
27
|
('url','[url => [linkName](https://rhodecode.com)]'),
|
|
28
|
('see','[see => http://rhodecode.com]'),
|
|
28
|
('see','[see => http://rhodecode.com]'),
|
|
29
|
]
|
|
29
|
]
|
|
30
|
%>
|
|
30
|
%>
|
|
31
|
% for tag_type, tag in example_tags:
|
|
31
|
% for tag_type, tag in example_tags:
|
|
32
|
<tr>
|
|
32
|
<tr>
|
|
33
|
<td>${tag|n}</td>
|
|
33
|
<td>${tag|n}</td>
|
|
34
|
<td>${h.style_metatag(tag_type, tag)|n}</td>
|
|
34
|
<td>${h.style_metatag(tag_type, tag)|n}</td>
|
|
35
|
</tr>
|
|
35
|
</tr>
|
|
36
|
% endfor
|
|
36
|
% endfor
|
|
37
|
</table>
|
|
37
|
</table>
|
|
38
|
</%def>
|
|
38
|
</%def>
|
|
39
|
|
|
39
|
|
|
40
|
## REPOSITORY RENDERERS
|
|
40
|
## REPOSITORY RENDERERS
|
|
41
|
<%def name="quick_menu(repo_name)">
|
|
41
|
<%def name="quick_menu(repo_name)">
|
|
42
|
<i class="icon-more"></i>
|
|
42
|
<i class="icon-more"></i>
|
|
43
|
<div class="menu_items_container hidden">
|
|
43
|
<div class="menu_items_container hidden">
|
|
44
|
<ul class="menu_items">
|
|
44
|
<ul class="menu_items">
|
|
45
|
<li>
|
|
45
|
<li>
|
|
46
|
<a title="${_('Summary')}" href="${h.route_path('repo_summary',repo_name=repo_name)}">
|
|
46
|
<a title="${_('Summary')}" href="${h.route_path('repo_summary',repo_name=repo_name)}">
|
|
47
|
<span>${_('Summary')}</span>
|
|
47
|
<span>${_('Summary')}</span>
|
|
48
|
</a>
|
|
48
|
</a>
|
|
49
|
</li>
|
|
49
|
</li>
|
|
50
|
<li>
|
|
50
|
<li>
|
|
51
|
<a title="${_('Commits')}" href="${h.route_path('repo_commits',repo_name=repo_name)}">
|
|
51
|
<a title="${_('Commits')}" href="${h.route_path('repo_commits',repo_name=repo_name)}">
|
|
52
|
<span>${_('Commits')}</span>
|
|
52
|
<span>${_('Commits')}</span>
|
|
53
|
</a>
|
|
53
|
</a>
|
|
54
|
</li>
|
|
54
|
</li>
|
|
55
|
<li>
|
|
55
|
<li>
|
|
56
|
<a title="${_('Files')}" href="${h.route_path('repo_files:default_commit',repo_name=repo_name)}">
|
|
56
|
<a title="${_('Files')}" href="${h.route_path('repo_files:default_commit',repo_name=repo_name)}">
|
|
57
|
<span>${_('Files')}</span>
|
|
57
|
<span>${_('Files')}</span>
|
|
58
|
</a>
|
|
58
|
</a>
|
|
59
|
</li>
|
|
59
|
</li>
|
|
60
|
<li>
|
|
60
|
<li>
|
|
61
|
<a title="${_('Fork')}" href="${h.route_path('repo_fork_new',repo_name=repo_name)}">
|
|
61
|
<a title="${_('Fork')}" href="${h.route_path('repo_fork_new',repo_name=repo_name)}">
|
|
62
|
<span>${_('Fork')}</span>
|
|
62
|
<span>${_('Fork')}</span>
|
|
63
|
</a>
|
|
63
|
</a>
|
|
64
|
</li>
|
|
64
|
</li>
|
|
65
|
</ul>
|
|
65
|
</ul>
|
|
66
|
</div>
|
|
66
|
</div>
|
|
67
|
</%def>
|
|
67
|
</%def>
|
|
68
|
|
|
68
|
|
|
69
|
<%def name="repo_name(name,rtype,rstate,private,archived,fork_of,short_name=False,admin=False)">
|
|
69
|
<%def name="repo_name(name,rtype,rstate,private,archived,fork_of,short_name=False,admin=False)">
|
|
70
|
<%
|
|
70
|
<%
|
|
71
|
def get_name(name,short_name=short_name):
|
|
71
|
def get_name(name,short_name=short_name):
|
|
72
|
if short_name:
|
|
72
|
if short_name:
|
|
73
|
return name.split('/')[-1]
|
|
73
|
return name.split('/')[-1]
|
|
74
|
else:
|
|
74
|
else:
|
|
75
|
return name
|
|
75
|
return name
|
|
76
|
%>
|
|
76
|
%>
|
|
77
|
<div class="${'repo_state_pending' if rstate == 'repo_state_pending' else ''} truncate">
|
|
77
|
<div class="${'repo_state_pending' if rstate == 'repo_state_pending' else ''} truncate">
|
|
78
|
##NAME
|
|
78
|
##NAME
|
|
79
|
<a href="${h.route_path('edit_repo',repo_name=name) if admin else h.route_path('repo_summary',repo_name=name)}">
|
|
79
|
<a href="${h.route_path('edit_repo',repo_name=name) if admin else h.route_path('repo_summary',repo_name=name)}">
|
|
80
|
|
|
80
|
|
|
81
|
##TYPE OF REPO
|
|
81
|
##TYPE OF REPO
|
|
82
|
%if h.is_hg(rtype):
|
|
82
|
%if h.is_hg(rtype):
|
|
83
|
<span title="${_('Mercurial repository')}"><i class="icon-hg" style="font-size: 14px;"></i></span>
|
|
83
|
<span title="${_('Mercurial repository')}"><i class="icon-hg" style="font-size: 14px;"></i></span>
|
|
84
|
%elif h.is_git(rtype):
|
|
84
|
%elif h.is_git(rtype):
|
|
85
|
<span title="${_('Git repository')}"><i class="icon-git" style="font-size: 14px"></i></span>
|
|
85
|
<span title="${_('Git repository')}"><i class="icon-git" style="font-size: 14px"></i></span>
|
|
86
|
%elif h.is_svn(rtype):
|
|
86
|
%elif h.is_svn(rtype):
|
|
87
|
<span title="${_('Subversion repository')}"><i class="icon-svn" style="font-size: 14px"></i></span>
|
|
87
|
<span title="${_('Subversion repository')}"><i class="icon-svn" style="font-size: 14px"></i></span>
|
|
88
|
%endif
|
|
88
|
%endif
|
|
89
|
|
|
89
|
|
|
90
|
##PRIVATE/PUBLIC
|
|
90
|
##PRIVATE/PUBLIC
|
|
91
|
%if private is True and c.visual.show_private_icon:
|
|
91
|
%if private is True and c.visual.show_private_icon:
|
|
92
|
<i class="icon-lock" title="${_('Private repository')}"></i>
|
|
92
|
<i class="icon-lock" title="${_('Private repository')}"></i>
|
|
93
|
%elif private is False and c.visual.show_public_icon:
|
|
93
|
%elif private is False and c.visual.show_public_icon:
|
|
94
|
<i class="icon-unlock-alt" title="${_('Public repository')}"></i>
|
|
94
|
<i class="icon-unlock-alt" title="${_('Public repository')}"></i>
|
|
95
|
%else:
|
|
95
|
%else:
|
|
96
|
<span></span>
|
|
96
|
<span></span>
|
|
97
|
%endif
|
|
97
|
%endif
|
|
98
|
${get_name(name)}
|
|
98
|
${get_name(name)}
|
|
99
|
</a>
|
|
99
|
</a>
|
|
100
|
%if fork_of:
|
|
100
|
%if fork_of:
|
|
101
|
<a href="${h.route_path('repo_summary',repo_name=fork_of.repo_name)}"><i class="icon-code-fork"></i></a>
|
|
101
|
<a href="${h.route_path('repo_summary',repo_name=fork_of.repo_name)}"><i class="icon-code-fork"></i></a>
|
|
102
|
%endif
|
|
102
|
%endif
|
|
103
|
%if rstate == 'repo_state_pending':
|
|
103
|
%if rstate == 'repo_state_pending':
|
|
104
|
<span class="creation_in_progress tooltip" title="${_('This repository is being created in a background task')}">
|
|
104
|
<span class="creation_in_progress tooltip" title="${_('This repository is being created in a background task')}">
|
|
105
|
(${_('creating...')})
|
|
105
|
(${_('creating...')})
|
|
106
|
</span>
|
|
106
|
</span>
|
|
107
|
%endif
|
|
107
|
%endif
|
|
108
|
|
|
108
|
|
|
109
|
</div>
|
|
109
|
</div>
|
|
110
|
</%def>
|
|
110
|
</%def>
|
|
111
|
|
|
111
|
|
|
112
|
<%def name="repo_desc(description, stylify_metatags)">
|
|
112
|
<%def name="repo_desc(description, stylify_metatags)">
|
|
113
|
<%
|
|
113
|
<%
|
|
114
|
tags, description = h.extract_metatags(description)
|
|
114
|
tags, description = h.extract_metatags(description)
|
|
115
|
%>
|
|
115
|
%>
|
|
116
|
|
|
116
|
|
|
117
|
<div class="truncate-wrap">
|
|
117
|
<div class="truncate-wrap">
|
|
118
|
% if stylify_metatags:
|
|
118
|
% if stylify_metatags:
|
|
119
|
% for tag_type, tag in tags:
|
|
119
|
% for tag_type, tag in tags:
|
|
120
|
${h.style_metatag(tag_type, tag)|n}
|
|
120
|
${h.style_metatag(tag_type, tag)|n}
|
|
121
|
% endfor
|
|
121
|
% endfor
|
|
122
|
% endif
|
|
122
|
% endif
|
|
123
|
${description}
|
|
123
|
${description}
|
|
124
|
</div>
|
|
124
|
</div>
|
|
125
|
|
|
125
|
|
|
126
|
</%def>
|
|
126
|
</%def>
|
|
127
|
|
|
127
|
|
|
128
|
<%def name="last_change(last_change)">
|
|
128
|
<%def name="last_change(last_change)">
|
|
129
|
${h.age_component(last_change, time_is_local=True)}
|
|
129
|
${h.age_component(last_change, time_is_local=True)}
|
|
130
|
</%def>
|
|
130
|
</%def>
|
|
131
|
|
|
131
|
|
|
132
|
<%def name="revision(name,rev,tip,author,last_msg, commit_date)">
|
|
132
|
<%def name="revision(name,rev,tip,author,last_msg, commit_date)">
|
|
133
|
<div>
|
|
133
|
<div>
|
|
134
|
%if rev >= 0:
|
|
134
|
%if rev >= 0:
|
|
135
|
<code><a title="${h.tooltip('%s\n%s\n\n%s' % (author, commit_date, last_msg))}" class="tooltip" href="${h.route_path('repo_commit',repo_name=name,commit_id=tip)}">${'r%s:%s' % (rev,h.short_id(tip))}</a></code>
|
|
135
|
<code><a title="${h.tooltip('%s\n%s\n\n%s' % (author, commit_date, last_msg))}" class="tooltip" href="${h.route_path('repo_commit',repo_name=name,commit_id=tip)}">${'r%s:%s' % (rev,h.short_id(tip))}</a></code>
|
|
136
|
%else:
|
|
136
|
%else:
|
|
137
|
${_('No commits yet')}
|
|
137
|
${_('No commits yet')}
|
|
138
|
%endif
|
|
138
|
%endif
|
|
139
|
</div>
|
|
139
|
</div>
|
|
140
|
</%def>
|
|
140
|
</%def>
|
|
141
|
|
|
141
|
|
|
142
|
<%def name="rss(name)">
|
|
142
|
<%def name="rss(name)">
|
|
143
|
%if c.rhodecode_user.username != h.DEFAULT_USER:
|
|
143
|
%if c.rhodecode_user.username != h.DEFAULT_USER:
|
|
144
|
<a title="${h.tooltip(_('Subscribe to %s rss feed')% name)}" href="${h.route_path('rss_feed_home', repo_name=name, _query=dict(auth_token=c.rhodecode_user.feed_token))}"><i class="icon-rss-sign"></i></a>
|
|
144
|
<a title="${h.tooltip(_('Subscribe to %s rss feed')% name)}" href="${h.route_path('rss_feed_home', repo_name=name, _query=dict(auth_token=c.rhodecode_user.feed_token))}"><i class="icon-rss-sign"></i></a>
|
|
145
|
%else:
|
|
145
|
%else:
|
|
146
|
<a title="${h.tooltip(_('Subscribe to %s rss feed')% name)}" href="${h.route_path('rss_feed_home', repo_name=name)}"><i class="icon-rss-sign"></i></a>
|
|
146
|
<a title="${h.tooltip(_('Subscribe to %s rss feed')% name)}" href="${h.route_path('rss_feed_home', repo_name=name)}"><i class="icon-rss-sign"></i></a>
|
|
147
|
%endif
|
|
147
|
%endif
|
|
148
|
</%def>
|
|
148
|
</%def>
|
|
149
|
|
|
149
|
|
|
150
|
<%def name="atom(name)">
|
|
150
|
<%def name="atom(name)">
|
|
151
|
%if c.rhodecode_user.username != h.DEFAULT_USER:
|
|
151
|
%if c.rhodecode_user.username != h.DEFAULT_USER:
|
|
152
|
<a title="${h.tooltip(_('Subscribe to %s atom feed')% name)}" href="${h.route_path('atom_feed_home', repo_name=name, _query=dict(auth_token=c.rhodecode_user.feed_token))}"><i class="icon-rss-sign"></i></a>
|
|
152
|
<a title="${h.tooltip(_('Subscribe to %s atom feed')% name)}" href="${h.route_path('atom_feed_home', repo_name=name, _query=dict(auth_token=c.rhodecode_user.feed_token))}"><i class="icon-rss-sign"></i></a>
|
|
153
|
%else:
|
|
153
|
%else:
|
|
154
|
<a title="${h.tooltip(_('Subscribe to %s atom feed')% name)}" href="${h.route_path('atom_feed_home', repo_name=name)}"><i class="icon-rss-sign"></i></a>
|
|
154
|
<a title="${h.tooltip(_('Subscribe to %s atom feed')% name)}" href="${h.route_path('atom_feed_home', repo_name=name)}"><i class="icon-rss-sign"></i></a>
|
|
155
|
%endif
|
|
155
|
%endif
|
|
156
|
</%def>
|
|
156
|
</%def>
|
|
157
|
|
|
157
|
|
|
158
|
<%def name="user_gravatar(email, size=16)">
|
|
158
|
<%def name="user_gravatar(email, size=16)">
|
|
159
|
<div class="rc-user tooltip" title="${h.tooltip(h.author_string(email))}">
|
|
159
|
<div class="rc-user tooltip" title="${h.tooltip(h.author_string(email))}">
|
|
160
|
${base.gravatar(email, 16)}
|
|
160
|
${base.gravatar(email, 16)}
|
|
161
|
</div>
|
|
161
|
</div>
|
|
162
|
</%def>
|
|
162
|
</%def>
|
|
163
|
|
|
163
|
|
|
164
|
<%def name="repo_actions(repo_name, super_user=True)">
|
|
164
|
<%def name="repo_actions(repo_name, super_user=True)">
|
|
165
|
<div>
|
|
165
|
<div>
|
|
166
|
<div class="grid_edit">
|
|
166
|
<div class="grid_edit">
|
|
167
|
<a href="${h.route_path('edit_repo',repo_name=repo_name)}" title="${_('Edit')}">
|
|
167
|
<a href="${h.route_path('edit_repo',repo_name=repo_name)}" title="${_('Edit')}">
|
|
168
|
Edit
|
|
168
|
Edit
|
|
169
|
</a>
|
|
169
|
</a>
|
|
170
|
</div>
|
|
170
|
</div>
|
|
171
|
<div class="grid_delete">
|
|
171
|
<div class="grid_delete">
|
|
172
|
${h.secure_form(h.route_path('edit_repo_advanced_delete', repo_name=repo_name), request=request)}
|
|
172
|
${h.secure_form(h.route_path('edit_repo_advanced_delete', repo_name=repo_name), request=request)}
|
|
173
|
${h.submit('remove_%s' % repo_name,_('Delete'),class_="btn btn-link btn-danger",
|
|
173
|
${h.submit('remove_%s' % repo_name,_('Delete'),class_="btn btn-link btn-danger",
|
|
174
|
onclick="return confirm('"+_('Confirm to delete this repository: %s') % repo_name+"');")}
|
|
174
|
onclick="return confirm('"+_('Confirm to delete this repository: %s') % repo_name+"');")}
|
|
175
|
${h.end_form()}
|
|
175
|
${h.end_form()}
|
|
176
|
</div>
|
|
176
|
</div>
|
|
177
|
</div>
|
|
177
|
</div>
|
|
178
|
</%def>
|
|
178
|
</%def>
|
|
179
|
|
|
179
|
|
|
180
|
<%def name="repo_state(repo_state)">
|
|
180
|
<%def name="repo_state(repo_state)">
|
|
181
|
<div>
|
|
181
|
<div>
|
|
182
|
%if repo_state == 'repo_state_pending':
|
|
182
|
%if repo_state == 'repo_state_pending':
|
|
183
|
<div class="tag tag4">${_('Creating')}</div>
|
|
183
|
<div class="tag tag4">${_('Creating')}</div>
|
|
184
|
%elif repo_state == 'repo_state_created':
|
|
184
|
%elif repo_state == 'repo_state_created':
|
|
185
|
<div class="tag tag1">${_('Created')}</div>
|
|
185
|
<div class="tag tag1">${_('Created')}</div>
|
|
186
|
%else:
|
|
186
|
%else:
|
|
187
|
<div class="tag alert2" title="${h.tooltip(repo_state)}">invalid</div>
|
|
187
|
<div class="tag alert2" title="${h.tooltip(repo_state)}">invalid</div>
|
|
188
|
%endif
|
|
188
|
%endif
|
|
189
|
</div>
|
|
189
|
</div>
|
|
190
|
</%def>
|
|
190
|
</%def>
|
|
191
|
|
|
191
|
|
|
192
|
|
|
192
|
|
|
193
|
## REPO GROUP RENDERERS
|
|
193
|
## REPO GROUP RENDERERS
|
|
194
|
<%def name="quick_repo_group_menu(repo_group_name)">
|
|
194
|
<%def name="quick_repo_group_menu(repo_group_name)">
|
|
195
|
<i class="icon-more"></i>
|
|
195
|
<i class="icon-more"></i>
|
|
196
|
<div class="menu_items_container hidden">
|
|
196
|
<div class="menu_items_container hidden">
|
|
197
|
<ul class="menu_items">
|
|
197
|
<ul class="menu_items">
|
|
198
|
<li>
|
|
198
|
<li>
|
|
199
|
<a href="${h.route_path('repo_group_home', repo_group_name=repo_group_name)}">${_('Summary')}</a>
|
|
199
|
<a href="${h.route_path('repo_group_home', repo_group_name=repo_group_name)}">${_('Summary')}</a>
|
|
200
|
</li>
|
|
200
|
</li>
|
|
201
|
|
|
201
|
|
|
202
|
</ul>
|
|
202
|
</ul>
|
|
203
|
</div>
|
|
203
|
</div>
|
|
204
|
</%def>
|
|
204
|
</%def>
|
|
205
|
|
|
205
|
|
|
206
|
<%def name="repo_group_name(repo_group_name, children_groups=None)">
|
|
206
|
<%def name="repo_group_name(repo_group_name, children_groups=None)">
|
|
207
|
<div>
|
|
207
|
<div>
|
|
208
|
<a href="${h.route_path('repo_group_home', repo_group_name=repo_group_name)}">
|
|
208
|
<a href="${h.route_path('repo_group_home', repo_group_name=repo_group_name)}">
|
|
209
|
<i class="icon-repo-group" title="${_('Repository group')}" style="font-size: 14px"></i>
|
|
209
|
<i class="icon-repo-group" title="${_('Repository group')}" style="font-size: 14px"></i>
|
|
210
|
%if children_groups:
|
|
210
|
%if children_groups:
|
|
211
|
${h.literal(' » '.join(children_groups))}
|
|
211
|
${h.literal(' » '.join(children_groups))}
|
|
212
|
%else:
|
|
212
|
%else:
|
|
213
|
${repo_group_name}
|
|
213
|
${repo_group_name}
|
|
214
|
%endif
|
|
214
|
%endif
|
|
215
|
</a>
|
|
215
|
</a>
|
|
216
|
</div>
|
|
216
|
</div>
|
|
217
|
</%def>
|
|
217
|
</%def>
|
|
218
|
|
|
218
|
|
|
219
|
<%def name="repo_group_desc(description, personal, stylify_metatags)">
|
|
219
|
<%def name="repo_group_desc(description, personal, stylify_metatags)">
|
|
220
|
|
|
220
|
|
|
221
|
<%
|
|
221
|
<%
|
|
222
|
tags, description = h.extract_metatags(description)
|
|
222
|
tags, description = h.extract_metatags(description)
|
|
223
|
%>
|
|
223
|
%>
|
|
224
|
|
|
224
|
|
|
225
|
<div class="truncate-wrap">
|
|
225
|
<div class="truncate-wrap">
|
|
226
|
% if personal:
|
|
226
|
% if personal:
|
|
227
|
<div class="metatag" tag="personal">${_('personal')}</div>
|
|
227
|
<div class="metatag" tag="personal">${_('personal')}</div>
|
|
228
|
% endif
|
|
228
|
% endif
|
|
229
|
|
|
229
|
|
|
230
|
% if stylify_metatags:
|
|
230
|
% if stylify_metatags:
|
|
231
|
% for tag_type, tag in tags:
|
|
231
|
% for tag_type, tag in tags:
|
|
232
|
${h.style_metatag(tag_type, tag)|n}
|
|
232
|
${h.style_metatag(tag_type, tag)|n}
|
|
233
|
% endfor
|
|
233
|
% endfor
|
|
234
|
% endif
|
|
234
|
% endif
|
|
235
|
${description}
|
|
235
|
${description}
|
|
236
|
</div>
|
|
236
|
</div>
|
|
237
|
|
|
237
|
|
|
238
|
</%def>
|
|
238
|
</%def>
|
|
239
|
|
|
239
|
|
|
240
|
<%def name="repo_group_actions(repo_group_id, repo_group_name, gr_count)">
|
|
240
|
<%def name="repo_group_actions(repo_group_id, repo_group_name, gr_count)">
|
|
241
|
<div class="grid_edit">
|
|
241
|
<div class="grid_edit">
|
|
242
|
<a href="${h.route_path('edit_repo_group',repo_group_name=repo_group_name)}" title="${_('Edit')}">Edit</a>
|
|
242
|
<a href="${h.route_path('edit_repo_group',repo_group_name=repo_group_name)}" title="${_('Edit')}">Edit</a>
|
|
243
|
</div>
|
|
243
|
</div>
|
|
244
|
<div class="grid_delete">
|
|
244
|
<div class="grid_delete">
|
|
245
|
${h.secure_form(h.route_path('edit_repo_group_advanced_delete', repo_group_name=repo_group_name), request=request)}
|
|
245
|
${h.secure_form(h.route_path('edit_repo_group_advanced_delete', repo_group_name=repo_group_name), request=request)}
|
|
246
|
${h.submit('remove_%s' % repo_group_name,_('Delete'),class_="btn btn-link btn-danger",
|
|
246
|
${h.submit('remove_%s' % repo_group_name,_('Delete'),class_="btn btn-link btn-danger",
|
|
247
|
onclick="return confirm('"+_ungettext('Confirm to delete this group: %s with %s repository','Confirm to delete this group: %s with %s repositories',gr_count) % (repo_group_name, gr_count)+"');")}
|
|
247
|
onclick="return confirm('"+_ungettext('Confirm to delete this group: %s with %s repository','Confirm to delete this group: %s with %s repositories',gr_count) % (repo_group_name, gr_count)+"');")}
|
|
248
|
${h.end_form()}
|
|
248
|
${h.end_form()}
|
|
249
|
</div>
|
|
249
|
</div>
|
|
250
|
</%def>
|
|
250
|
</%def>
|
|
251
|
|
|
251
|
|
|
252
|
|
|
252
|
|
|
253
|
<%def name="user_actions(user_id, username)">
|
|
253
|
<%def name="user_actions(user_id, username)">
|
|
254
|
<div class="grid_edit">
|
|
254
|
<div class="grid_edit">
|
|
255
|
<a href="${h.route_path('user_edit',user_id=user_id)}" title="${_('Edit')}">
|
|
255
|
<a href="${h.route_path('user_edit',user_id=user_id)}" title="${_('Edit')}">
|
|
256
|
${_('Edit')}
|
|
256
|
${_('Edit')}
|
|
257
|
</a>
|
|
257
|
</a>
|
|
258
|
</div>
|
|
258
|
</div>
|
|
259
|
<div class="grid_delete">
|
|
259
|
<div class="grid_delete">
|
|
260
|
${h.secure_form(h.route_path('user_delete', user_id=user_id), request=request)}
|
|
260
|
${h.secure_form(h.route_path('user_delete', user_id=user_id), request=request)}
|
|
261
|
${h.submit('remove_',_('Delete'),id="remove_user_%s" % user_id, class_="btn btn-link btn-danger",
|
|
261
|
${h.submit('remove_',_('Delete'),id="remove_user_%s" % user_id, class_="btn btn-link btn-danger",
|
|
262
|
onclick="return confirm('"+_('Confirm to delete this user: %s') % username+"');")}
|
|
262
|
onclick="return confirm('"+_('Confirm to delete this user: %s') % username+"');")}
|
|
263
|
${h.end_form()}
|
|
263
|
${h.end_form()}
|
|
264
|
</div>
|
|
264
|
</div>
|
|
265
|
</%def>
|
|
265
|
</%def>
|
|
266
|
|
|
266
|
|
|
267
|
<%def name="user_group_actions(user_group_id, user_group_name)">
|
|
267
|
<%def name="user_group_actions(user_group_id, user_group_name)">
|
|
268
|
<div class="grid_edit">
|
|
268
|
<div class="grid_edit">
|
|
269
|
<a href="${h.route_path('edit_user_group', user_group_id=user_group_id)}" title="${_('Edit')}">Edit</a>
|
|
269
|
<a href="${h.route_path('edit_user_group', user_group_id=user_group_id)}" title="${_('Edit')}">Edit</a>
|
|
270
|
</div>
|
|
270
|
</div>
|
|
271
|
<div class="grid_delete">
|
|
271
|
<div class="grid_delete">
|
|
272
|
${h.secure_form(h.route_path('user_groups_delete', user_group_id=user_group_id), request=request)}
|
|
272
|
${h.secure_form(h.route_path('user_groups_delete', user_group_id=user_group_id), request=request)}
|
|
273
|
${h.submit('remove_',_('Delete'),id="remove_group_%s" % user_group_id, class_="btn btn-link btn-danger",
|
|
273
|
${h.submit('remove_',_('Delete'),id="remove_group_%s" % user_group_id, class_="btn btn-link btn-danger",
|
|
274
|
onclick="return confirm('"+_('Confirm to delete this user group: %s') % user_group_name+"');")}
|
|
274
|
onclick="return confirm('"+_('Confirm to delete this user group: %s') % user_group_name+"');")}
|
|
275
|
${h.end_form()}
|
|
275
|
${h.end_form()}
|
|
276
|
</div>
|
|
276
|
</div>
|
|
277
|
</%def>
|
|
277
|
</%def>
|
|
278
|
|
|
278
|
|
|
279
|
|
|
279
|
|
|
280
|
<%def name="user_name(user_id, username)">
|
|
280
|
<%def name="user_name(user_id, username)">
|
|
281
|
${h.link_to(h.person(username, 'username_or_name_or_email'), h.route_path('user_edit', user_id=user_id))}
|
|
281
|
${h.link_to(h.person(username, 'username_or_name_or_email'), h.route_path('user_edit', user_id=user_id))}
|
|
282
|
</%def>
|
|
282
|
</%def>
|
|
283
|
|
|
283
|
|
|
284
|
<%def name="user_profile(username)">
|
|
284
|
<%def name="user_profile(username)">
|
|
285
|
${base.gravatar_with_user(username, 16)}
|
|
285
|
${base.gravatar_with_user(username, 16)}
|
|
286
|
</%def>
|
|
286
|
</%def>
|
|
287
|
|
|
287
|
|
|
288
|
<%def name="user_group_name(user_group_name)">
|
|
288
|
<%def name="user_group_name(user_group_name)">
|
|
289
|
<div>
|
|
289
|
<div>
|
|
290
|
<i class="icon-user-group" title="${_('User group')}"></i>
|
|
290
|
<i class="icon-user-group" title="${_('User group')}"></i>
|
|
291
|
${h.link_to_group(user_group_name)}
|
|
291
|
${h.link_to_group(user_group_name)}
|
|
292
|
</div>
|
|
292
|
</div>
|
|
293
|
</%def>
|
|
293
|
</%def>
|
|
294
|
|
|
294
|
|
|
295
|
|
|
295
|
|
|
296
|
## GISTS
|
|
296
|
## GISTS
|
|
297
|
|
|
297
|
|
|
298
|
<%def name="gist_gravatar(full_contact)">
|
|
298
|
<%def name="gist_gravatar(full_contact)">
|
|
299
|
<div class="gist_gravatar">
|
|
299
|
<div class="gist_gravatar">
|
|
300
|
${base.gravatar(full_contact, 30)}
|
|
300
|
${base.gravatar(full_contact, 30)}
|
|
301
|
</div>
|
|
301
|
</div>
|
|
302
|
</%def>
|
|
302
|
</%def>
|
|
303
|
|
|
303
|
|
|
304
|
<%def name="gist_access_id(gist_access_id, full_contact)">
|
|
304
|
<%def name="gist_access_id(gist_access_id, full_contact)">
|
|
305
|
<div>
|
|
305
|
<div>
|
|
306
|
<b>
|
|
306
|
<b>
|
|
307
|
<a href="${h.route_path('gist_show', gist_id=gist_access_id)}">gist: ${gist_access_id}</a>
|
|
307
|
<a href="${h.route_path('gist_show', gist_id=gist_access_id)}">gist: ${gist_access_id}</a>
|
|
308
|
</b>
|
|
308
|
</b>
|
|
309
|
</div>
|
|
309
|
</div>
|
|
310
|
</%def>
|
|
310
|
</%def>
|
|
311
|
|
|
311
|
|
|
312
|
<%def name="gist_author(full_contact, created_on, expires)">
|
|
312
|
<%def name="gist_author(full_contact, created_on, expires)">
|
|
313
|
${base.gravatar_with_user(full_contact, 16)}
|
|
313
|
${base.gravatar_with_user(full_contact, 16)}
|
|
314
|
</%def>
|
|
314
|
</%def>
|
|
315
|
|
|
315
|
|
|
316
|
|
|
316
|
|
|
317
|
<%def name="gist_created(created_on)">
|
|
317
|
<%def name="gist_created(created_on)">
|
|
318
|
<div class="created">
|
|
318
|
<div class="created">
|
|
319
|
${h.age_component(created_on, time_is_local=True)}
|
|
319
|
${h.age_component(created_on, time_is_local=True)}
|
|
320
|
</div>
|
|
320
|
</div>
|
|
321
|
</%def>
|
|
321
|
</%def>
|
|
322
|
|
|
322
|
|
|
323
|
<%def name="gist_expires(expires)">
|
|
323
|
<%def name="gist_expires(expires)">
|
|
324
|
<div class="created">
|
|
324
|
<div class="created">
|
|
325
|
%if expires == -1:
|
|
325
|
%if expires == -1:
|
|
326
|
${_('never')}
|
|
326
|
${_('never')}
|
|
327
|
%else:
|
|
327
|
%else:
|
|
328
|
${h.age_component(h.time_to_utcdatetime(expires))}
|
|
328
|
${h.age_component(h.time_to_utcdatetime(expires))}
|
|
329
|
%endif
|
|
329
|
%endif
|
|
330
|
</div>
|
|
330
|
</div>
|
|
331
|
</%def>
|
|
331
|
</%def>
|
|
332
|
|
|
332
|
|
|
333
|
<%def name="gist_type(gist_type)">
|
|
333
|
<%def name="gist_type(gist_type)">
|
|
334
|
%if gist_type != 'public':
|
|
334
|
%if gist_type != 'public':
|
|
335
|
<div class="tag">${_('Private')}</div>
|
|
335
|
<div class="tag">${_('Private')}</div>
|
|
336
|
%endif
|
|
336
|
%endif
|
|
337
|
</%def>
|
|
337
|
</%def>
|
|
338
|
|
|
338
|
|
|
339
|
<%def name="gist_description(gist_description)">
|
|
339
|
<%def name="gist_description(gist_description)">
|
|
340
|
${gist_description}
|
|
340
|
${gist_description}
|
|
341
|
</%def>
|
|
341
|
</%def>
|
|
342
|
|
|
342
|
|
|
343
|
|
|
343
|
|
|
344
|
## PULL REQUESTS GRID RENDERERS
|
|
344
|
## PULL REQUESTS GRID RENDERERS
|
|
345
|
|
|
345
|
|
|
346
|
<%def name="pullrequest_target_repo(repo_name)">
|
|
346
|
<%def name="pullrequest_target_repo(repo_name)">
|
|
347
|
<div class="truncate">
|
|
347
|
<div class="truncate">
|
|
348
|
${h.link_to(repo_name,h.route_path('repo_summary',repo_name=repo_name))}
|
|
348
|
${h.link_to(repo_name,h.route_path('repo_summary',repo_name=repo_name))}
|
|
349
|
</div>
|
|
349
|
</div>
|
|
350
|
</%def>
|
|
350
|
</%def>
|
|
351
|
|
|
351
|
|
|
352
|
<%def name="pullrequest_status(status)">
|
|
352
|
<%def name="pullrequest_status(status)">
|
|
353
|
<i class="icon-circle review-status-${status}"></i>
|
|
353
|
<i class="icon-circle review-status-${status}"></i>
|
|
354
|
</%def>
|
|
354
|
</%def>
|
|
355
|
|
|
355
|
|
|
356
|
<%def name="pullrequest_title(title, description)">
|
|
356
|
<%def name="pullrequest_title(title, description)">
|
|
357
|
${title}
|
|
357
|
${title}
|
|
358
|
</%def>
|
|
358
|
</%def>
|
|
359
|
|
|
359
|
|
|
360
|
<%def name="pullrequest_comments(comments_nr)">
|
|
360
|
<%def name="pullrequest_comments(comments_nr)">
|
|
361
|
<i class="icon-comment"></i> ${comments_nr}
|
|
361
|
<i class="icon-comment"></i> ${comments_nr}
|
|
362
|
</%def>
|
|
362
|
</%def>
|
|
363
|
|
|
363
|
|
|
364
|
<%def name="pullrequest_name(pull_request_id, target_repo_name, short=False)">
|
|
364
|
<%def name="pullrequest_name(pull_request_id, target_repo_name, short=False)">
|
|
365
|
<a href="${h.route_path('pullrequest_show',repo_name=target_repo_name,pull_request_id=pull_request_id)}">
|
|
365
|
<a href="${h.route_path('pullrequest_show',repo_name=target_repo_name,pull_request_id=pull_request_id)}">
|
|
366
|
% if short:
|
|
366
|
% if short:
|
|
367
|
#${pull_request_id}
|
|
367
|
#${pull_request_id}
|
|
368
|
% else:
|
|
368
|
% else:
|
|
369
|
${_('Pull request #%(pr_number)s') % {'pr_number': pull_request_id,}}
|
|
369
|
${_('Pull request #%(pr_number)s') % {'pr_number': pull_request_id,}}
|
|
370
|
% endif
|
|
370
|
% endif
|
|
371
|
</a>
|
|
371
|
</a>
|
|
372
|
</%def>
|
|
372
|
</%def>
|
|
373
|
|
|
373
|
|
|
374
|
<%def name="pullrequest_updated_on(updated_on)">
|
|
374
|
<%def name="pullrequest_updated_on(updated_on)">
|
|
375
|
${h.age_component(h.time_to_utcdatetime(updated_on))}
|
|
375
|
${h.age_component(h.time_to_utcdatetime(updated_on))}
|
|
376
|
</%def>
|
|
376
|
</%def>
|
|
377
|
|
|
377
|
|
|
378
|
<%def name="pullrequest_author(full_contact)">
|
|
378
|
<%def name="pullrequest_author(full_contact)">
|
|
379
|
${base.gravatar_with_user(full_contact, 16)}
|
|
379
|
${base.gravatar_with_user(full_contact, 16)}
|
|
380
|
</%def>
|
|
380
|
</%def>
|
|
381
|
|
|
381
|
|
|
382
|
|
|
382
|
|
|
383
|
## ARTIFACT RENDERERS
|
|
383
|
## ARTIFACT RENDERERS
|
|
384
|
<%def name="repo_artifact_name(repo_name, file_uid, artifact_display_name)">
|
|
384
|
<%def name="repo_artifact_name(repo_name, file_uid, artifact_display_name)">
|
|
385
|
<a href="${h.route_path('repo_artifacts_get', repo_name=repo_name, uid=file_uid)}">
|
|
385
|
<a href="${h.route_path('repo_artifacts_get', repo_name=repo_name, uid=file_uid)}">
|
|
386
|
${artifact_display_name or 'EMPTY NAME'}
|
|
386
|
${artifact_display_name or '_EMPTY_NAME_'}
|
|
387
|
</a>
|
|
387
|
</a>
|
|
388
|
</%def>
|
|
388
|
</%def>
|
|
389
|
|
|
389
|
|
|
390
|
<%def name="repo_artifact_uid(repo_name, file_uid)">
|
|
390
|
<%def name="repo_artifact_uid(repo_name, file_uid)">
|
|
391
|
<code>${h.shorter(file_uid, size=12, prefix=True)}</code>
|
|
391
|
<code>${h.shorter(file_uid, size=24, prefix=True)}</code>
|
|
392
|
</%def>
|
|
|
|
|
393
|
|
|
|
|
|
394
|
<%def name="repo_artifact_uid_action(repo_name, file_uid)">
|
|
|
|
|
395
|
<i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${h.route_url('repo_artifacts_get', repo_name=repo_name, uid=file_uid)}" title="${_('Copy the full url')}"></i>
|
|
392
|
<i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${h.route_url('repo_artifacts_get', repo_name=repo_name, uid=file_uid)}" title="${_('Copy the full url')}"></i>
|
|
396
|
</%def>
|
|
393
|
</%def>
|
|
397
|
|
|
394
|
|
|
398
|
<%def name="repo_artifact_sha256(artifact_sha256)">
|
|
395
|
<%def name="repo_artifact_sha256(artifact_sha256)">
|
|
399
|
<div class="code">${h.shorter(artifact_sha256, 12)}<i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${artifact_sha256}" title="${_('Copy the sha256 ({})').format(artifact_sha256)}"></i></div>
|
|
396
|
<div class="code">${h.shorter(artifact_sha256, 12)}<i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${artifact_sha256}" title="${_('Copy the sha256 ({})').format(artifact_sha256)}"></i></div>
|
|
400
|
</%def>
|
|
397
|
</%def>
|
|
401
|
|
|
398
|
|
|
402
|
<%def name="repo_artifact_actions(repo_name, file_store_id, file_uid)">
|
|
399
|
<%def name="repo_artifact_actions(repo_name, file_store_id, file_uid)">
|
|
403
|
## <div class="grid_edit">
|
|
400
|
## <div class="grid_edit">
|
|
404
|
## <a href="#Edit" title="${_('Edit')}">${_('Edit')}</a>
|
|
401
|
## <a href="#Edit" title="${_('Edit')}">${_('Edit')}</a>
|
|
405
|
## </div>
|
|
402
|
## </div>
|
|
406
|
<div class="grid_edit">
|
|
403
|
<div class="grid_edit">
|
|
407
|
<a href="${h.route_path('repo_artifacts_info', repo_name=repo_name, uid=file_store_id)}" title="${_('Info')}">${_('Info')}</a>
|
|
404
|
<a href="${h.route_path('repo_artifacts_info', repo_name=repo_name, uid=file_store_id)}" title="${_('Info')}">${_('Info')}</a>
|
|
408
|
</div>
|
|
405
|
</div>
|
|
409
|
% if h.HasRepoPermissionAny('repository.admin')(c.repo_name):
|
|
406
|
% if h.HasRepoPermissionAny('repository.admin')(c.repo_name):
|
|
410
|
<div class="grid_delete">
|
|
407
|
<div class="grid_delete">
|
|
411
|
${h.secure_form(h.route_path('repo_artifacts_delete', repo_name=repo_name, uid=file_store_id), request=request)}
|
|
408
|
${h.secure_form(h.route_path('repo_artifacts_delete', repo_name=repo_name, uid=file_store_id), request=request)}
|
|
412
|
${h.submit('remove_',_('Delete'),id="remove_artifact_%s" % file_store_id, class_="btn btn-link btn-danger",
|
|
409
|
${h.submit('remove_',_('Delete'),id="remove_artifact_%s" % file_store_id, class_="btn btn-link btn-danger",
|
|
413
|
onclick="return confirm('"+_('Confirm to delete this artifact: %s') % file_uid+"');")}
|
|
410
|
onclick="return confirm('"+_('Confirm to delete this artifact: %s') % file_uid+"');")}
|
|
414
|
${h.end_form()}
|
|
411
|
${h.end_form()}
|
|
415
|
</div>
|
|
412
|
</div>
|
|
416
|
% endif
|
|
413
|
% endif
|
|
417
|
</%def>
|
|
414
|
</%def>
|
|
418
|
|
|
415
|
|
|
419
|
<%def name="markup_form(form_id, form_text='', help_text=None)">
|
|
416
|
<%def name="markup_form(form_id, form_text='', help_text=None)">
|
|
420
|
|
|
417
|
|
|
421
|
<div class="markup-form">
|
|
418
|
<div class="markup-form">
|
|
422
|
<div class="markup-form-area">
|
|
419
|
<div class="markup-form-area">
|
|
423
|
<div class="markup-form-area-header">
|
|
420
|
<div class="markup-form-area-header">
|
|
424
|
<ul class="nav-links clearfix">
|
|
421
|
<ul class="nav-links clearfix">
|
|
425
|
<li class="active">
|
|
422
|
<li class="active">
|
|
426
|
<a href="#edit-text" tabindex="-1" id="edit-btn_${form_id}">${_('Write')}</a>
|
|
423
|
<a href="#edit-text" tabindex="-1" id="edit-btn_${form_id}">${_('Write')}</a>
|
|
427
|
</li>
|
|
424
|
</li>
|
|
428
|
<li class="">
|
|
425
|
<li class="">
|
|
429
|
<a href="#preview-text" tabindex="-1" id="preview-btn_${form_id}">${_('Preview')}</a>
|
|
426
|
<a href="#preview-text" tabindex="-1" id="preview-btn_${form_id}">${_('Preview')}</a>
|
|
430
|
</li>
|
|
427
|
</li>
|
|
431
|
</ul>
|
|
428
|
</ul>
|
|
432
|
</div>
|
|
429
|
</div>
|
|
433
|
|
|
430
|
|
|
434
|
<div class="markup-form-area-write" style="display: block;">
|
|
431
|
<div class="markup-form-area-write" style="display: block;">
|
|
435
|
<div id="edit-container_${form_id}">
|
|
432
|
<div id="edit-container_${form_id}">
|
|
436
|
<textarea id="${form_id}" name="${form_id}" class="comment-block-ta ac-input">${form_text if form_text else ''}</textarea>
|
|
433
|
<textarea id="${form_id}" name="${form_id}" class="comment-block-ta ac-input">${form_text if form_text else ''}</textarea>
|
|
437
|
</div>
|
|
434
|
</div>
|
|
438
|
<div id="preview-container_${form_id}" class="clearfix" style="display: none;">
|
|
435
|
<div id="preview-container_${form_id}" class="clearfix" style="display: none;">
|
|
439
|
<div id="preview-box_${form_id}" class="preview-box"></div>
|
|
436
|
<div id="preview-box_${form_id}" class="preview-box"></div>
|
|
440
|
</div>
|
|
437
|
</div>
|
|
441
|
</div>
|
|
438
|
</div>
|
|
442
|
|
|
439
|
|
|
443
|
<div class="markup-form-area-footer">
|
|
440
|
<div class="markup-form-area-footer">
|
|
444
|
<div class="toolbar">
|
|
441
|
<div class="toolbar">
|
|
445
|
<div class="toolbar-text">
|
|
442
|
<div class="toolbar-text">
|
|
446
|
${(_('Parsed using %s syntax') % (
|
|
443
|
${(_('Parsed using %s syntax') % (
|
|
447
|
('<a href="%s">%s</a>' % (h.route_url('%s_help' % c.visual.default_renderer), c.visual.default_renderer.upper())),
|
|
444
|
('<a href="%s">%s</a>' % (h.route_url('%s_help' % c.visual.default_renderer), c.visual.default_renderer.upper())),
|
|
448
|
)
|
|
445
|
)
|
|
449
|
)|n}
|
|
446
|
)|n}
|
|
450
|
</div>
|
|
447
|
</div>
|
|
451
|
</div>
|
|
448
|
</div>
|
|
452
|
</div>
|
|
449
|
</div>
|
|
453
|
</div>
|
|
450
|
</div>
|
|
454
|
|
|
451
|
|
|
455
|
<div class="markup-form-footer">
|
|
452
|
<div class="markup-form-footer">
|
|
456
|
% if help_text:
|
|
453
|
% if help_text:
|
|
457
|
<span class="help-block">${help_text}</span>
|
|
454
|
<span class="help-block">${help_text}</span>
|
|
458
|
% endif
|
|
455
|
% endif
|
|
459
|
</div>
|
|
456
|
</div>
|
|
460
|
</div>
|
|
457
|
</div>
|
|
461
|
<script type="text/javascript">
|
|
458
|
<script type="text/javascript">
|
|
462
|
new MarkupForm('${form_id}');
|
|
459
|
new MarkupForm('${form_id}');
|
|
463
|
</script>
|
|
460
|
</script>
|
|
464
|
|
|
461
|
|
|
465
|
</%def>
|
|
462
|
</%def>
|