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