Show More
@@ -1,376 +1,376 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 |
|
15 | |||
16 | ('label','[personal]'), |
|
16 | ('label','[personal]'), | |
17 | ('generic','[v2.0.0]'), |
|
17 | ('generic','[v2.0.0]'), | |
18 |
|
18 | |||
19 | ('lang','[lang => JavaScript]'), |
|
19 | ('lang','[lang => JavaScript]'), | |
20 | ('license','[license => LicenseName]'), |
|
20 | ('license','[license => LicenseName]'), | |
21 |
|
21 | |||
22 | ('ref','[requires => RepoName]'), |
|
22 | ('ref','[requires => RepoName]'), | |
23 | ('ref','[recommends => GroupName]'), |
|
23 | ('ref','[recommends => GroupName]'), | |
24 | ('ref','[conflicts => SomeName]'), |
|
24 | ('ref','[conflicts => SomeName]'), | |
25 | ('ref','[base => SomeName]'), |
|
25 | ('ref','[base => SomeName]'), | |
26 | ('url','[url => [linkName](https://rhodecode.com)]'), |
|
26 | ('url','[url => [linkName](https://rhodecode.com)]'), | |
27 | ('see','[see => http://rhodecode.com]'), |
|
27 | ('see','[see => http://rhodecode.com]'), | |
28 | ] |
|
28 | ] | |
29 | %> |
|
29 | %> | |
30 | % for tag_type, tag in example_tags: |
|
30 | % for tag_type, tag in example_tags: | |
31 | <tr> |
|
31 | <tr> | |
32 | <td>${tag|n}</td> |
|
32 | <td>${tag|n}</td> | |
33 | <td>${h.style_metatag(tag_type, tag)|n}</td> |
|
33 | <td>${h.style_metatag(tag_type, tag)|n}</td> | |
34 | </tr> |
|
34 | </tr> | |
35 | % endfor |
|
35 | % endfor | |
36 | </table> |
|
36 | </table> | |
37 | </%def> |
|
37 | </%def> | |
38 |
|
38 | |||
39 | ## REPOSITORY RENDERERS |
|
39 | ## REPOSITORY RENDERERS | |
40 | <%def name="quick_menu(repo_name)"> |
|
40 | <%def name="quick_menu(repo_name)"> | |
41 | <i class="icon-more"></i> |
|
41 | <i class="icon-more"></i> | |
42 | <div class="menu_items_container hidden"> |
|
42 | <div class="menu_items_container hidden"> | |
43 | <ul class="menu_items"> |
|
43 | <ul class="menu_items"> | |
44 | <li> |
|
44 | <li> | |
45 | <a title="${_('Summary')}" href="${h.route_path('repo_summary',repo_name=repo_name)}"> |
|
45 | <a title="${_('Summary')}" href="${h.route_path('repo_summary',repo_name=repo_name)}"> | |
46 | <span>${_('Summary')}</span> |
|
46 | <span>${_('Summary')}</span> | |
47 | </a> |
|
47 | </a> | |
48 | </li> |
|
48 | </li> | |
49 | <li> |
|
49 | <li> | |
50 | <a title="${_('Changelog')}" href="${h.route_path('repo_changelog',repo_name=repo_name)}"> |
|
50 | <a title="${_('Changelog')}" href="${h.route_path('repo_changelog',repo_name=repo_name)}"> | |
51 | <span>${_('Changelog')}</span> |
|
51 | <span>${_('Changelog')}</span> | |
52 | </a> |
|
52 | </a> | |
53 | </li> |
|
53 | </li> | |
54 | <li> |
|
54 | <li> | |
55 | <a title="${_('Files')}" href="${h.route_path('repo_files:default_commit',repo_name=repo_name)}"> |
|
55 | <a title="${_('Files')}" href="${h.route_path('repo_files:default_commit',repo_name=repo_name)}"> | |
56 | <span>${_('Files')}</span> |
|
56 | <span>${_('Files')}</span> | |
57 | </a> |
|
57 | </a> | |
58 | </li> |
|
58 | </li> | |
59 | <li> |
|
59 | <li> | |
60 | <a title="${_('Fork')}" href="${h.route_path('repo_fork_new',repo_name=repo_name)}"> |
|
60 | <a title="${_('Fork')}" href="${h.route_path('repo_fork_new',repo_name=repo_name)}"> | |
61 | <span>${_('Fork')}</span> |
|
61 | <span>${_('Fork')}</span> | |
62 | </a> |
|
62 | </a> | |
63 | </li> |
|
63 | </li> | |
64 | </ul> |
|
64 | </ul> | |
65 | </div> |
|
65 | </div> | |
66 | </%def> |
|
66 | </%def> | |
67 |
|
67 | |||
68 | <%def name="repo_name(name,rtype,rstate,private,fork_of,short_name=False,admin=False)"> |
|
68 | <%def name="repo_name(name,rtype,rstate,private,fork_of,short_name=False,admin=False)"> | |
69 | <% |
|
69 | <% | |
70 | def get_name(name,short_name=short_name): |
|
70 | def get_name(name,short_name=short_name): | |
71 | if short_name: |
|
71 | if short_name: | |
72 | return name.split('/')[-1] |
|
72 | return name.split('/')[-1] | |
73 | else: |
|
73 | else: | |
74 | return name |
|
74 | return name | |
75 | %> |
|
75 | %> | |
76 | <div class="${'repo_state_pending' if rstate == 'repo_state_pending' else ''} truncate"> |
|
76 | <div class="${'repo_state_pending' if rstate == 'repo_state_pending' else ''} truncate"> | |
77 | ##NAME |
|
77 | ##NAME | |
78 | <a href="${h.route_path('edit_repo',repo_name=name) if admin else h.route_path('repo_summary',repo_name=name)}"> |
|
78 | <a href="${h.route_path('edit_repo',repo_name=name) if admin else h.route_path('repo_summary',repo_name=name)}"> | |
79 |
|
79 | |||
80 | ##TYPE OF REPO |
|
80 | ##TYPE OF REPO | |
81 | %if h.is_hg(rtype): |
|
81 | %if h.is_hg(rtype): | |
82 | <span title="${_('Mercurial repository')}"><i class="icon-hg"></i></span> |
|
82 | <span title="${_('Mercurial repository')}"><i class="icon-hg" style="font-size: 14px;"></i></span> | |
83 | %elif h.is_git(rtype): |
|
83 | %elif h.is_git(rtype): | |
84 | <span title="${_('Git repository')}"><i class="icon-git"></i></span> |
|
84 | <span title="${_('Git repository')}"><i class="icon-git" style="font-size: 14px"></i></span> | |
85 | %elif h.is_svn(rtype): |
|
85 | %elif h.is_svn(rtype): | |
86 | <span title="${_('Subversion repository')}"><i class="icon-svn"></i></span> |
|
86 | <span title="${_('Subversion repository')}"><i class="icon-svn" style="font-size: 14px"></i></span> | |
87 | %endif |
|
87 | %endif | |
88 |
|
88 | |||
89 | ##PRIVATE/PUBLIC |
|
89 | ##PRIVATE/PUBLIC | |
90 | %if private and c.visual.show_private_icon: |
|
90 | %if private and c.visual.show_private_icon: | |
91 | <i class="icon-lock" title="${_('Private repository')}"></i> |
|
91 | <i class="icon-lock" title="${_('Private repository')}"></i> | |
92 | %elif not private and c.visual.show_public_icon: |
|
92 | %elif not private and c.visual.show_public_icon: | |
93 | <i class="icon-unlock-alt" title="${_('Public repository')}"></i> |
|
93 | <i class="icon-unlock-alt" title="${_('Public repository')}"></i> | |
94 | %else: |
|
94 | %else: | |
95 | <span></span> |
|
95 | <span></span> | |
96 | %endif |
|
96 | %endif | |
97 | ${get_name(name)} |
|
97 | ${get_name(name)} | |
98 | </a> |
|
98 | </a> | |
99 | %if fork_of: |
|
99 | %if fork_of: | |
100 | <a href="${h.route_path('repo_summary',repo_name=fork_of.repo_name)}"><i class="icon-code-fork"></i></a> |
|
100 | <a href="${h.route_path('repo_summary',repo_name=fork_of.repo_name)}"><i class="icon-code-fork"></i></a> | |
101 | %endif |
|
101 | %endif | |
102 | %if rstate == 'repo_state_pending': |
|
102 | %if rstate == 'repo_state_pending': | |
103 | <span class="creation_in_progress tooltip" title="${_('This repository is being created in a background task')}"> |
|
103 | <span class="creation_in_progress tooltip" title="${_('This repository is being created in a background task')}"> | |
104 | (${_('creating...')}) |
|
104 | (${_('creating...')}) | |
105 | </span> |
|
105 | </span> | |
106 | %endif |
|
106 | %endif | |
107 | </div> |
|
107 | </div> | |
108 | </%def> |
|
108 | </%def> | |
109 |
|
109 | |||
110 | <%def name="repo_desc(description, stylify_metatags)"> |
|
110 | <%def name="repo_desc(description, stylify_metatags)"> | |
111 | <% |
|
111 | <% | |
112 | tags, description = h.extract_metatags(description) |
|
112 | tags, description = h.extract_metatags(description) | |
113 | %> |
|
113 | %> | |
114 |
|
114 | |||
115 | <div class="truncate-wrap"> |
|
115 | <div class="truncate-wrap"> | |
116 | % if stylify_metatags: |
|
116 | % if stylify_metatags: | |
117 | % for tag_type, tag in tags: |
|
117 | % for tag_type, tag in tags: | |
118 | ${h.style_metatag(tag_type, tag)|n} |
|
118 | ${h.style_metatag(tag_type, tag)|n} | |
119 | % endfor |
|
119 | % endfor | |
120 | % endif |
|
120 | % endif | |
121 | ${description} |
|
121 | ${description} | |
122 | </div> |
|
122 | </div> | |
123 |
|
123 | |||
124 | </%def> |
|
124 | </%def> | |
125 |
|
125 | |||
126 | <%def name="last_change(last_change)"> |
|
126 | <%def name="last_change(last_change)"> | |
127 | ${h.age_component(last_change)} |
|
127 | ${h.age_component(last_change)} | |
128 | </%def> |
|
128 | </%def> | |
129 |
|
129 | |||
130 | <%def name="revision(name,rev,tip,author,last_msg)"> |
|
130 | <%def name="revision(name,rev,tip,author,last_msg)"> | |
131 | <div> |
|
131 | <div> | |
132 | %if rev >= 0: |
|
132 | %if rev >= 0: | |
133 | <code><a title="${h.tooltip('%s:\n\n%s' % (author,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> |
|
133 | <code><a title="${h.tooltip('%s:\n\n%s' % (author,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> | |
134 | %else: |
|
134 | %else: | |
135 | ${_('No commits yet')} |
|
135 | ${_('No commits yet')} | |
136 | %endif |
|
136 | %endif | |
137 | </div> |
|
137 | </div> | |
138 | </%def> |
|
138 | </%def> | |
139 |
|
139 | |||
140 | <%def name="rss(name)"> |
|
140 | <%def name="rss(name)"> | |
141 | %if c.rhodecode_user.username != h.DEFAULT_USER: |
|
141 | %if c.rhodecode_user.username != h.DEFAULT_USER: | |
142 | <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> |
|
142 | <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> | |
143 | %else: |
|
143 | %else: | |
144 | <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> |
|
144 | <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> | |
145 | %endif |
|
145 | %endif | |
146 | </%def> |
|
146 | </%def> | |
147 |
|
147 | |||
148 | <%def name="atom(name)"> |
|
148 | <%def name="atom(name)"> | |
149 | %if c.rhodecode_user.username != h.DEFAULT_USER: |
|
149 | %if c.rhodecode_user.username != h.DEFAULT_USER: | |
150 | <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> |
|
150 | <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> | |
151 | %else: |
|
151 | %else: | |
152 | <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> |
|
152 | <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> | |
153 | %endif |
|
153 | %endif | |
154 | </%def> |
|
154 | </%def> | |
155 |
|
155 | |||
156 | <%def name="user_gravatar(email, size=16)"> |
|
156 | <%def name="user_gravatar(email, size=16)"> | |
157 | <div class="rc-user tooltip" title="${h.tooltip(h.author_string(email))}"> |
|
157 | <div class="rc-user tooltip" title="${h.tooltip(h.author_string(email))}"> | |
158 | ${base.gravatar(email, 16)} |
|
158 | ${base.gravatar(email, 16)} | |
159 | </div> |
|
159 | </div> | |
160 | </%def> |
|
160 | </%def> | |
161 |
|
161 | |||
162 | <%def name="repo_actions(repo_name, super_user=True)"> |
|
162 | <%def name="repo_actions(repo_name, super_user=True)"> | |
163 | <div> |
|
163 | <div> | |
164 | <div class="grid_edit"> |
|
164 | <div class="grid_edit"> | |
165 | <a href="${h.route_path('edit_repo',repo_name=repo_name)}" title="${_('Edit')}"> |
|
165 | <a href="${h.route_path('edit_repo',repo_name=repo_name)}" title="${_('Edit')}"> | |
166 | <i class="icon-pencil"></i>Edit</a> |
|
166 | <i class="icon-pencil"></i>Edit</a> | |
167 | </div> |
|
167 | </div> | |
168 | <div class="grid_delete"> |
|
168 | <div class="grid_delete"> | |
169 | ${h.secure_form(h.route_path('edit_repo_advanced_delete', repo_name=repo_name), method='POST', request=request)} |
|
169 | ${h.secure_form(h.route_path('edit_repo_advanced_delete', repo_name=repo_name), method='POST', request=request)} | |
170 | ${h.submit('remove_%s' % repo_name,_('Delete'),class_="btn btn-link btn-danger", |
|
170 | ${h.submit('remove_%s' % repo_name,_('Delete'),class_="btn btn-link btn-danger", | |
171 | onclick="return confirm('"+_('Confirm to delete this repository: %s') % repo_name+"');")} |
|
171 | onclick="return confirm('"+_('Confirm to delete this repository: %s') % repo_name+"');")} | |
172 | ${h.end_form()} |
|
172 | ${h.end_form()} | |
173 | </div> |
|
173 | </div> | |
174 | </div> |
|
174 | </div> | |
175 | </%def> |
|
175 | </%def> | |
176 |
|
176 | |||
177 | <%def name="repo_state(repo_state)"> |
|
177 | <%def name="repo_state(repo_state)"> | |
178 | <div> |
|
178 | <div> | |
179 | %if repo_state == 'repo_state_pending': |
|
179 | %if repo_state == 'repo_state_pending': | |
180 | <div class="tag tag4">${_('Creating')}</div> |
|
180 | <div class="tag tag4">${_('Creating')}</div> | |
181 | %elif repo_state == 'repo_state_created': |
|
181 | %elif repo_state == 'repo_state_created': | |
182 | <div class="tag tag1">${_('Created')}</div> |
|
182 | <div class="tag tag1">${_('Created')}</div> | |
183 | %else: |
|
183 | %else: | |
184 | <div class="tag alert2" title="${h.tooltip(repo_state)}">invalid</div> |
|
184 | <div class="tag alert2" title="${h.tooltip(repo_state)}">invalid</div> | |
185 | %endif |
|
185 | %endif | |
186 | </div> |
|
186 | </div> | |
187 | </%def> |
|
187 | </%def> | |
188 |
|
188 | |||
189 |
|
189 | |||
190 | ## REPO GROUP RENDERERS |
|
190 | ## REPO GROUP RENDERERS | |
191 | <%def name="quick_repo_group_menu(repo_group_name)"> |
|
191 | <%def name="quick_repo_group_menu(repo_group_name)"> | |
192 | <i class="icon-more"></i> |
|
192 | <i class="icon-more"></i> | |
193 | <div class="menu_items_container hidden"> |
|
193 | <div class="menu_items_container hidden"> | |
194 | <ul class="menu_items"> |
|
194 | <ul class="menu_items"> | |
195 | <li> |
|
195 | <li> | |
196 | <a href="${h.route_path('repo_group_home', repo_group_name=repo_group_name)}">${_('Summary')}</a> |
|
196 | <a href="${h.route_path('repo_group_home', repo_group_name=repo_group_name)}">${_('Summary')}</a> | |
197 | </li> |
|
197 | </li> | |
198 |
|
198 | |||
199 | </ul> |
|
199 | </ul> | |
200 | </div> |
|
200 | </div> | |
201 | </%def> |
|
201 | </%def> | |
202 |
|
202 | |||
203 | <%def name="repo_group_name(repo_group_name, children_groups=None)"> |
|
203 | <%def name="repo_group_name(repo_group_name, children_groups=None)"> | |
204 | <div> |
|
204 | <div> | |
205 | <a href="${h.route_path('repo_group_home', repo_group_name=repo_group_name)}"> |
|
205 | <a href="${h.route_path('repo_group_home', repo_group_name=repo_group_name)}"> | |
206 | <i class="icon-folder-close" title="${_('Repository group')}"></i> |
|
206 | <i class="icon-folder-close" title="${_('Repository group')}" style="font-size: 16px"></i> | |
207 | %if children_groups: |
|
207 | %if children_groups: | |
208 | ${h.literal(' » '.join(children_groups))} |
|
208 | ${h.literal(' » '.join(children_groups))} | |
209 | %else: |
|
209 | %else: | |
210 | ${repo_group_name} |
|
210 | ${repo_group_name} | |
211 | %endif |
|
211 | %endif | |
212 | </a> |
|
212 | </a> | |
213 | </div> |
|
213 | </div> | |
214 | </%def> |
|
214 | </%def> | |
215 |
|
215 | |||
216 | <%def name="repo_group_desc(description, personal, stylify_metatags)"> |
|
216 | <%def name="repo_group_desc(description, personal, stylify_metatags)"> | |
217 |
|
217 | |||
218 | <% |
|
218 | <% | |
219 | tags, description = h.extract_metatags(description) |
|
219 | tags, description = h.extract_metatags(description) | |
220 | %> |
|
220 | %> | |
221 |
|
221 | |||
222 | <div class="truncate-wrap"> |
|
222 | <div class="truncate-wrap"> | |
223 | % if personal: |
|
223 | % if personal: | |
224 | <div class="metatag" tag="personal">${_('personal')}</div> |
|
224 | <div class="metatag" tag="personal">${_('personal')}</div> | |
225 | % endif |
|
225 | % endif | |
226 |
|
226 | |||
227 | % if stylify_metatags: |
|
227 | % if stylify_metatags: | |
228 | % for tag_type, tag in tags: |
|
228 | % for tag_type, tag in tags: | |
229 | ${h.style_metatag(tag_type, tag)|n} |
|
229 | ${h.style_metatag(tag_type, tag)|n} | |
230 | % endfor |
|
230 | % endfor | |
231 | % endif |
|
231 | % endif | |
232 | ${description} |
|
232 | ${description} | |
233 | </div> |
|
233 | </div> | |
234 |
|
234 | |||
235 | </%def> |
|
235 | </%def> | |
236 |
|
236 | |||
237 | <%def name="repo_group_actions(repo_group_id, repo_group_name, gr_count)"> |
|
237 | <%def name="repo_group_actions(repo_group_id, repo_group_name, gr_count)"> | |
238 | <div class="grid_edit"> |
|
238 | <div class="grid_edit"> | |
239 | <a href="${h.url('edit_repo_group',group_name=repo_group_name)}" title="${_('Edit')}">Edit</a> |
|
239 | <a href="${h.url('edit_repo_group',group_name=repo_group_name)}" title="${_('Edit')}">Edit</a> | |
240 | </div> |
|
240 | </div> | |
241 | <div class="grid_delete"> |
|
241 | <div class="grid_delete"> | |
242 | ${h.secure_form(h.url('delete_repo_group', group_name=repo_group_name),method='delete')} |
|
242 | ${h.secure_form(h.url('delete_repo_group', group_name=repo_group_name),method='delete')} | |
243 | ${h.submit('remove_%s' % repo_group_name,_('Delete'),class_="btn btn-link btn-danger", |
|
243 | ${h.submit('remove_%s' % repo_group_name,_('Delete'),class_="btn btn-link btn-danger", | |
244 | 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)+"');")} |
|
244 | 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)+"');")} | |
245 | ${h.end_form()} |
|
245 | ${h.end_form()} | |
246 | </div> |
|
246 | </div> | |
247 | </%def> |
|
247 | </%def> | |
248 |
|
248 | |||
249 |
|
249 | |||
250 | <%def name="user_actions(user_id, username)"> |
|
250 | <%def name="user_actions(user_id, username)"> | |
251 | <div class="grid_edit"> |
|
251 | <div class="grid_edit"> | |
252 | <a href="${h.url('edit_user',user_id=user_id)}" title="${_('Edit')}"> |
|
252 | <a href="${h.url('edit_user',user_id=user_id)}" title="${_('Edit')}"> | |
253 | <i class="icon-pencil"></i>Edit</a> |
|
253 | <i class="icon-pencil"></i>Edit</a> | |
254 | </div> |
|
254 | </div> | |
255 | <div class="grid_delete"> |
|
255 | <div class="grid_delete"> | |
256 | ${h.secure_form(h.url('delete_user', user_id=user_id),method='delete')} |
|
256 | ${h.secure_form(h.url('delete_user', user_id=user_id),method='delete')} | |
257 | ${h.submit('remove_',_('Delete'),id="remove_user_%s" % user_id, class_="btn btn-link btn-danger", |
|
257 | ${h.submit('remove_',_('Delete'),id="remove_user_%s" % user_id, class_="btn btn-link btn-danger", | |
258 | onclick="return confirm('"+_('Confirm to delete this user: %s') % username+"');")} |
|
258 | onclick="return confirm('"+_('Confirm to delete this user: %s') % username+"');")} | |
259 | ${h.end_form()} |
|
259 | ${h.end_form()} | |
260 | </div> |
|
260 | </div> | |
261 | </%def> |
|
261 | </%def> | |
262 |
|
262 | |||
263 | <%def name="user_group_actions(user_group_id, user_group_name)"> |
|
263 | <%def name="user_group_actions(user_group_id, user_group_name)"> | |
264 | <div class="grid_edit"> |
|
264 | <div class="grid_edit"> | |
265 | <a href="${h.route_path('edit_user_group', user_group_id=user_group_id)}" title="${_('Edit')}">Edit</a> |
|
265 | <a href="${h.route_path('edit_user_group', user_group_id=user_group_id)}" title="${_('Edit')}">Edit</a> | |
266 | </div> |
|
266 | </div> | |
267 | <div class="grid_delete"> |
|
267 | <div class="grid_delete"> | |
268 | ${h.secure_form(h.route_path('user_groups_delete', user_group_id=user_group_id), method='POST', request=request)} |
|
268 | ${h.secure_form(h.route_path('user_groups_delete', user_group_id=user_group_id), method='POST', request=request)} | |
269 | ${h.submit('remove_',_('Delete'),id="remove_group_%s" % user_group_id, class_="btn btn-link btn-danger", |
|
269 | ${h.submit('remove_',_('Delete'),id="remove_group_%s" % user_group_id, class_="btn btn-link btn-danger", | |
270 | onclick="return confirm('"+_('Confirm to delete this user group: %s') % user_group_name+"');")} |
|
270 | onclick="return confirm('"+_('Confirm to delete this user group: %s') % user_group_name+"');")} | |
271 | ${h.end_form()} |
|
271 | ${h.end_form()} | |
272 | </div> |
|
272 | </div> | |
273 | </%def> |
|
273 | </%def> | |
274 |
|
274 | |||
275 |
|
275 | |||
276 | <%def name="user_name(user_id, username)"> |
|
276 | <%def name="user_name(user_id, username)"> | |
277 | ${h.link_to(h.person(username, 'username_or_name_or_email'), h.url('edit_user', user_id=user_id))} |
|
277 | ${h.link_to(h.person(username, 'username_or_name_or_email'), h.url('edit_user', user_id=user_id))} | |
278 | </%def> |
|
278 | </%def> | |
279 |
|
279 | |||
280 | <%def name="user_profile(username)"> |
|
280 | <%def name="user_profile(username)"> | |
281 | ${base.gravatar_with_user(username, 16)} |
|
281 | ${base.gravatar_with_user(username, 16)} | |
282 | </%def> |
|
282 | </%def> | |
283 |
|
283 | |||
284 | <%def name="user_group_name(user_group_id, user_group_name)"> |
|
284 | <%def name="user_group_name(user_group_id, user_group_name)"> | |
285 | <div> |
|
285 | <div> | |
286 | <a href="${h.route_path('edit_user_group', user_group_id=user_group_id)}"> |
|
286 | <a href="${h.route_path('edit_user_group', user_group_id=user_group_id)}"> | |
287 | <i class="icon-group" title="${_('User group')}"></i> ${user_group_name}</a> |
|
287 | <i class="icon-group" title="${_('User group')}"></i> ${user_group_name}</a> | |
288 | </div> |
|
288 | </div> | |
289 | </%def> |
|
289 | </%def> | |
290 |
|
290 | |||
291 |
|
291 | |||
292 | ## GISTS |
|
292 | ## GISTS | |
293 |
|
293 | |||
294 | <%def name="gist_gravatar(full_contact)"> |
|
294 | <%def name="gist_gravatar(full_contact)"> | |
295 | <div class="gist_gravatar"> |
|
295 | <div class="gist_gravatar"> | |
296 | ${base.gravatar(full_contact, 30)} |
|
296 | ${base.gravatar(full_contact, 30)} | |
297 | </div> |
|
297 | </div> | |
298 | </%def> |
|
298 | </%def> | |
299 |
|
299 | |||
300 | <%def name="gist_access_id(gist_access_id, full_contact)"> |
|
300 | <%def name="gist_access_id(gist_access_id, full_contact)"> | |
301 | <div> |
|
301 | <div> | |
302 | <b> |
|
302 | <b> | |
303 | <a href="${h.route_path('gist_show', gist_id=gist_access_id)}">gist: ${gist_access_id}</a> |
|
303 | <a href="${h.route_path('gist_show', gist_id=gist_access_id)}">gist: ${gist_access_id}</a> | |
304 | </b> |
|
304 | </b> | |
305 | </div> |
|
305 | </div> | |
306 | </%def> |
|
306 | </%def> | |
307 |
|
307 | |||
308 | <%def name="gist_author(full_contact, created_on, expires)"> |
|
308 | <%def name="gist_author(full_contact, created_on, expires)"> | |
309 | ${base.gravatar_with_user(full_contact, 16)} |
|
309 | ${base.gravatar_with_user(full_contact, 16)} | |
310 | </%def> |
|
310 | </%def> | |
311 |
|
311 | |||
312 |
|
312 | |||
313 | <%def name="gist_created(created_on)"> |
|
313 | <%def name="gist_created(created_on)"> | |
314 | <div class="created"> |
|
314 | <div class="created"> | |
315 | ${h.age_component(created_on, time_is_local=True)} |
|
315 | ${h.age_component(created_on, time_is_local=True)} | |
316 | </div> |
|
316 | </div> | |
317 | </%def> |
|
317 | </%def> | |
318 |
|
318 | |||
319 | <%def name="gist_expires(expires)"> |
|
319 | <%def name="gist_expires(expires)"> | |
320 | <div class="created"> |
|
320 | <div class="created"> | |
321 | %if expires == -1: |
|
321 | %if expires == -1: | |
322 | ${_('never')} |
|
322 | ${_('never')} | |
323 | %else: |
|
323 | %else: | |
324 | ${h.age_component(h.time_to_utcdatetime(expires))} |
|
324 | ${h.age_component(h.time_to_utcdatetime(expires))} | |
325 | %endif |
|
325 | %endif | |
326 | </div> |
|
326 | </div> | |
327 | </%def> |
|
327 | </%def> | |
328 |
|
328 | |||
329 | <%def name="gist_type(gist_type)"> |
|
329 | <%def name="gist_type(gist_type)"> | |
330 | %if gist_type != 'public': |
|
330 | %if gist_type != 'public': | |
331 | <div class="tag">${_('Private')}</div> |
|
331 | <div class="tag">${_('Private')}</div> | |
332 | %endif |
|
332 | %endif | |
333 | </%def> |
|
333 | </%def> | |
334 |
|
334 | |||
335 | <%def name="gist_description(gist_description)"> |
|
335 | <%def name="gist_description(gist_description)"> | |
336 | ${gist_description} |
|
336 | ${gist_description} | |
337 | </%def> |
|
337 | </%def> | |
338 |
|
338 | |||
339 |
|
339 | |||
340 | ## PULL REQUESTS GRID RENDERERS |
|
340 | ## PULL REQUESTS GRID RENDERERS | |
341 |
|
341 | |||
342 | <%def name="pullrequest_target_repo(repo_name)"> |
|
342 | <%def name="pullrequest_target_repo(repo_name)"> | |
343 | <div class="truncate"> |
|
343 | <div class="truncate"> | |
344 | ${h.link_to(repo_name,h.route_path('repo_summary',repo_name=repo_name))} |
|
344 | ${h.link_to(repo_name,h.route_path('repo_summary',repo_name=repo_name))} | |
345 | </div> |
|
345 | </div> | |
346 | </%def> |
|
346 | </%def> | |
347 | <%def name="pullrequest_status(status)"> |
|
347 | <%def name="pullrequest_status(status)"> | |
348 | <div class="${'flag_status %s' % status} pull-left"></div> |
|
348 | <div class="${'flag_status %s' % status} pull-left"></div> | |
349 | </%def> |
|
349 | </%def> | |
350 |
|
350 | |||
351 | <%def name="pullrequest_title(title, description)"> |
|
351 | <%def name="pullrequest_title(title, description)"> | |
352 | ${title} <br/> |
|
352 | ${title} <br/> | |
353 | ${h.shorter(description, 40)} |
|
353 | ${h.shorter(description, 40)} | |
354 | </%def> |
|
354 | </%def> | |
355 |
|
355 | |||
356 | <%def name="pullrequest_comments(comments_nr)"> |
|
356 | <%def name="pullrequest_comments(comments_nr)"> | |
357 | <i class="icon-comment"></i> ${comments_nr} |
|
357 | <i class="icon-comment"></i> ${comments_nr} | |
358 | </%def> |
|
358 | </%def> | |
359 |
|
359 | |||
360 | <%def name="pullrequest_name(pull_request_id, target_repo_name, short=False)"> |
|
360 | <%def name="pullrequest_name(pull_request_id, target_repo_name, short=False)"> | |
361 | <a href="${h.route_path('pullrequest_show',repo_name=target_repo_name,pull_request_id=pull_request_id)}"> |
|
361 | <a href="${h.route_path('pullrequest_show',repo_name=target_repo_name,pull_request_id=pull_request_id)}"> | |
362 | % if short: |
|
362 | % if short: | |
363 | #${pull_request_id} |
|
363 | #${pull_request_id} | |
364 | % else: |
|
364 | % else: | |
365 | ${_('Pull request #%(pr_number)s') % {'pr_number': pull_request_id,}} |
|
365 | ${_('Pull request #%(pr_number)s') % {'pr_number': pull_request_id,}} | |
366 | % endif |
|
366 | % endif | |
367 | </a> |
|
367 | </a> | |
368 | </%def> |
|
368 | </%def> | |
369 |
|
369 | |||
370 | <%def name="pullrequest_updated_on(updated_on)"> |
|
370 | <%def name="pullrequest_updated_on(updated_on)"> | |
371 | ${h.age_component(h.time_to_utcdatetime(updated_on))} |
|
371 | ${h.age_component(h.time_to_utcdatetime(updated_on))} | |
372 | </%def> |
|
372 | </%def> | |
373 |
|
373 | |||
374 | <%def name="pullrequest_author(full_contact)"> |
|
374 | <%def name="pullrequest_author(full_contact)"> | |
375 | ${base.gravatar_with_user(full_contact, 16)} |
|
375 | ${base.gravatar_with_user(full_contact, 16)} | |
376 | </%def> |
|
376 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now