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