Mercurial > kallithea
annotate rhodecode/templates/data_table/_dt_elements.html @ 3526:79c980b628e3 beta
Small wording improvement.
author | Leonardo <leo@unity3d.com> |
---|---|
date | Mon, 25 Feb 2013 20:56:01 +0100 |
parents | 7b74079beec9 |
children | 802c94bdfc85 |
rev | line source |
---|---|
2304
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
1 ## DATA TABLE RE USABLE ELEMENTS |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
2 ## usage: |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
3 ## <%namespace name="dt" file="/data_table/_dt_elements.html"/> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
4 |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
5 <%def name="quick_menu(repo_name)"> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
6 <ul class="menu_items hidden"> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
7 <li style="border-top:1px solid #003367;margin-left:18px;padding-left:-99px"></li> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
8 <li> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
9 <a title="${_('Summary')}" href="${h.url('summary_home',repo_name=repo_name)}"> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
10 <span class="icon"> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
11 <img src="${h.url('/images/icons/clipboard_16.png')}" alt="${_('Summary')}" /> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
12 </span> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
13 <span>${_('Summary')}</span> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
14 </a> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
15 </li> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
16 <li> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
17 <a title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=repo_name)}"> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
18 <span class="icon"> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
19 <img src="${h.url('/images/icons/time.png')}" alt="${_('Changelog')}" /> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
20 </span> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
21 <span>${_('Changelog')}</span> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
22 </a> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
23 </li> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
24 <li> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
25 <a title="${_('Files')}" href="${h.url('files_home',repo_name=repo_name)}"> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
26 <span class="icon"> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
27 <img src="${h.url('/images/icons/file.png')}" alt="${_('Files')}" /> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
28 </span> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
29 <span>${_('Files')}</span> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
30 </a> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
31 </li> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
32 <li> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
33 <a title="${_('Fork')}" href="${h.url('repo_fork_home',repo_name=repo_name)}"> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
34 <span class="icon"> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
35 <img src="${h.url('/images/icons/arrow_divide.png')}" alt="${_('Fork')}" /> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
36 </span> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
37 <span>${_('Fork')}</span> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
38 </a> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
39 </li> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
40 </ul> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
41 </%def> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
42 |
3154
0226b6d6b2b5
Use common function for generation of grid data
Marcin Kuzminski <marcin@python-works.com>
parents:
2937
diff
changeset
|
43 <%def name="repo_name(name,rtype,private,fork_of,short_name=False,admin=False)"> |
2304
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
44 <% |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
45 def get_name(name,short_name=short_name): |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
46 if short_name: |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
47 return name.split('/')[-1] |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
48 else: |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
49 return name |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
50 %> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
51 <div style="white-space: nowrap"> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
52 ##TYPE OF REPO |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
53 %if h.is_hg(rtype): |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
54 <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
55 %elif h.is_git(rtype): |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
56 <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
57 %endif |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
58 |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
59 ##PRIVATE/PUBLIC |
2674
a221706dab50
merged + fixed pull request #62: Implemented metatags and visualisation options.
Marcin Kuzminski <marcin@python-works.com>
parents:
2663
diff
changeset
|
60 %if private and c.visual.show_private_icon: |
a221706dab50
merged + fixed pull request #62: Implemented metatags and visualisation options.
Marcin Kuzminski <marcin@python-works.com>
parents:
2663
diff
changeset
|
61 <img class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url('/images/icons/lock.png')}"/> |
a221706dab50
merged + fixed pull request #62: Implemented metatags and visualisation options.
Marcin Kuzminski <marcin@python-works.com>
parents:
2663
diff
changeset
|
62 %elif not private and c.visual.show_public_icon: |
a221706dab50
merged + fixed pull request #62: Implemented metatags and visualisation options.
Marcin Kuzminski <marcin@python-works.com>
parents:
2663
diff
changeset
|
63 <img class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url('/images/icons/lock_open.png')}"/> |
2304
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
64 %endif |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
65 |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
66 ##NAME |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
67 %if admin: |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
68 ${h.link_to(get_name(name),h.url('edit_repo',repo_name=name),class_="repo_name")} |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
69 %else: |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
70 ${h.link_to(get_name(name),h.url('summary_home',repo_name=name),class_="repo_name")} |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
71 %endif |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
72 %if fork_of: |
2936
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2674
diff
changeset
|
73 <a href="${h.url('summary_home',repo_name=fork_of.repo_name)}"> |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2674
diff
changeset
|
74 <img class="icon" alt="${_('fork')}" title="${_('Fork of')} ${fork_of.repo_name}" src="${h.url('/images/icons/arrow_divide.png')}"/></a> |
2304
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
75 %endif |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
76 </div> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
77 </%def> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
78 |
2937
d439d408b415
Update last_change from VCS data on request.
Marcin Kuzminski <marcin@python-works.com>
parents:
2936
diff
changeset
|
79 <%def name="last_change(last_change)"> |
d439d408b415
Update last_change from VCS data on request.
Marcin Kuzminski <marcin@python-works.com>
parents:
2936
diff
changeset
|
80 <span class="tooltip" date="${last_change}" title="${h.tooltip(h.fmt_date(last_change))}">${h.age(last_change)}</span> |
d439d408b415
Update last_change from VCS data on request.
Marcin Kuzminski <marcin@python-works.com>
parents:
2936
diff
changeset
|
81 </%def> |
2304
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
82 |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
83 <%def name="revision(name,rev,tip,author,last_msg)"> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
84 <div> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
85 %if rev >= 0: |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
86 <pre><a title="${h.tooltip('%s:\n\n%s' % (author,last_msg))}" class="tooltip" href="${h.url('changeset_home',repo_name=name,revision=tip)}">${'r%s:%s' % (rev,h.short_id(tip))}</a></pre> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
87 %else: |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
88 ${_('No changesets yet')} |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
89 %endif |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
90 </div> |
f1b76a558a66
Renaming template directory _data_table to data_table so it can be scanned by extract_messages
Vincent Duvert <vincent@duvert.net>
parents:
diff
changeset
|
91 </%def> |
2663
cc8d7d450d15
No more raw html inside users controller.
Marcin Kuzminski <marcin@python-works.com>
parents:
2304
diff
changeset
|
92 |
2936
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2674
diff
changeset
|
93 <%def name="rss(name)"> |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2674
diff
changeset
|
94 %if c.rhodecode_user.username != 'default': |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2674
diff
changeset
|
95 <a title="${_('Subscribe to %s rss feed')% name}" class="rss_icon" href="${h.url('rss_feed_home',repo_name=name,api_key=c.rhodecode_user.api_key)}"></a> |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2674
diff
changeset
|
96 %else: |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2674
diff
changeset
|
97 <a title="${_('Subscribe to %s rss feed')% name}" class="rss_icon" href="${h.url('rss_feed_home',repo_name=name)}"></a> |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2674
diff
changeset
|
98 %endif |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2674
diff
changeset
|
99 </%def> |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2674
diff
changeset
|
100 |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2674
diff
changeset
|
101 <%def name="atom(name)"> |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2674
diff
changeset
|
102 %if c.rhodecode_user.username != 'default': |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2674
diff
changeset
|
103 <a title="${_('Subscribe to %s atom feed')% name}" class="atom_icon" href="${h.url('atom_feed_home',repo_name=name,api_key=c.rhodecode_user.api_key)}"></a> |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2674
diff
changeset
|
104 %else: |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2674
diff
changeset
|
105 <a title="${_('Subscribe to %s atom feed')% name}" class="atom_icon" href="${h.url('atom_feed_home',repo_name=name)}"></a> |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2674
diff
changeset
|
106 %endif |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2674
diff
changeset
|
107 </%def> |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2674
diff
changeset
|
108 |
2663
cc8d7d450d15
No more raw html inside users controller.
Marcin Kuzminski <marcin@python-works.com>
parents:
2304
diff
changeset
|
109 <%def name="user_gravatar(email, size=24)"> |
cc8d7d450d15
No more raw html inside users controller.
Marcin Kuzminski <marcin@python-works.com>
parents:
2304
diff
changeset
|
110 <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(email, size)}"/> </div> |
cc8d7d450d15
No more raw html inside users controller.
Marcin Kuzminski <marcin@python-works.com>
parents:
2304
diff
changeset
|
111 </%def> |
cc8d7d450d15
No more raw html inside users controller.
Marcin Kuzminski <marcin@python-works.com>
parents:
2304
diff
changeset
|
112 |
3245
8f3cc21d83e6
fixes issue #739 Delete/Edit repositories should only point to admin links if the user is an super admin.
Marcin Kuzminski <marcin@python-works.com>
parents:
3168
diff
changeset
|
113 <%def name="repo_actions(repo_name, super_user=True)"> |
3154
0226b6d6b2b5
Use common function for generation of grid data
Marcin Kuzminski <marcin@python-works.com>
parents:
2937
diff
changeset
|
114 <div> |
0226b6d6b2b5
Use common function for generation of grid data
Marcin Kuzminski <marcin@python-works.com>
parents:
2937
diff
changeset
|
115 <div style="float:left"> |
3245
8f3cc21d83e6
fixes issue #739 Delete/Edit repositories should only point to admin links if the user is an super admin.
Marcin Kuzminski <marcin@python-works.com>
parents:
3168
diff
changeset
|
116 %if super_user: |
8f3cc21d83e6
fixes issue #739 Delete/Edit repositories should only point to admin links if the user is an super admin.
Marcin Kuzminski <marcin@python-works.com>
parents:
3168
diff
changeset
|
117 <a href="${h.url('edit_repo',repo_name=repo_name)}" title="${_('edit')}"> |
8f3cc21d83e6
fixes issue #739 Delete/Edit repositories should only point to admin links if the user is an super admin.
Marcin Kuzminski <marcin@python-works.com>
parents:
3168
diff
changeset
|
118 ${h.submit('edit_%s' % repo_name,_('edit'),class_="edit_icon action_button")} |
8f3cc21d83e6
fixes issue #739 Delete/Edit repositories should only point to admin links if the user is an super admin.
Marcin Kuzminski <marcin@python-works.com>
parents:
3168
diff
changeset
|
119 </a> |
8f3cc21d83e6
fixes issue #739 Delete/Edit repositories should only point to admin links if the user is an super admin.
Marcin Kuzminski <marcin@python-works.com>
parents:
3168
diff
changeset
|
120 %else: |
8f3cc21d83e6
fixes issue #739 Delete/Edit repositories should only point to admin links if the user is an super admin.
Marcin Kuzminski <marcin@python-works.com>
parents:
3168
diff
changeset
|
121 <a href="${h.url('repo_settings_home',repo_name=repo_name)}" title="${_('edit')}"> |
8f3cc21d83e6
fixes issue #739 Delete/Edit repositories should only point to admin links if the user is an super admin.
Marcin Kuzminski <marcin@python-works.com>
parents:
3168
diff
changeset
|
122 ${h.submit('edit_%s' % repo_name,_('edit'),class_="edit_icon action_button")} |
8f3cc21d83e6
fixes issue #739 Delete/Edit repositories should only point to admin links if the user is an super admin.
Marcin Kuzminski <marcin@python-works.com>
parents:
3168
diff
changeset
|
123 </a> |
8f3cc21d83e6
fixes issue #739 Delete/Edit repositories should only point to admin links if the user is an super admin.
Marcin Kuzminski <marcin@python-works.com>
parents:
3168
diff
changeset
|
124 %endif |
3154
0226b6d6b2b5
Use common function for generation of grid data
Marcin Kuzminski <marcin@python-works.com>
parents:
2937
diff
changeset
|
125 </div> |
0226b6d6b2b5
Use common function for generation of grid data
Marcin Kuzminski <marcin@python-works.com>
parents:
2937
diff
changeset
|
126 <div style="float:left"> |
3245
8f3cc21d83e6
fixes issue #739 Delete/Edit repositories should only point to admin links if the user is an super admin.
Marcin Kuzminski <marcin@python-works.com>
parents:
3168
diff
changeset
|
127 %if super_user: |
8f3cc21d83e6
fixes issue #739 Delete/Edit repositories should only point to admin links if the user is an super admin.
Marcin Kuzminski <marcin@python-works.com>
parents:
3168
diff
changeset
|
128 ${h.form(h.url('repo', repo_name=repo_name),method='delete')} |
8f3cc21d83e6
fixes issue #739 Delete/Edit repositories should only point to admin links if the user is an super admin.
Marcin Kuzminski <marcin@python-works.com>
parents:
3168
diff
changeset
|
129 ${h.submit('remove_%s' % repo_name,_('delete'),class_="delete_icon action_button",onclick="return confirm('"+_('Confirm to delete this repository: %s') % repo_name+"');")} |
8f3cc21d83e6
fixes issue #739 Delete/Edit repositories should only point to admin links if the user is an super admin.
Marcin Kuzminski <marcin@python-works.com>
parents:
3168
diff
changeset
|
130 ${h.end_form()} |
8f3cc21d83e6
fixes issue #739 Delete/Edit repositories should only point to admin links if the user is an super admin.
Marcin Kuzminski <marcin@python-works.com>
parents:
3168
diff
changeset
|
131 %else: |
8f3cc21d83e6
fixes issue #739 Delete/Edit repositories should only point to admin links if the user is an super admin.
Marcin Kuzminski <marcin@python-works.com>
parents:
3168
diff
changeset
|
132 ${h.form(h.url('repo_settings_delete', repo_name=repo_name),method='delete')} |
8f3cc21d83e6
fixes issue #739 Delete/Edit repositories should only point to admin links if the user is an super admin.
Marcin Kuzminski <marcin@python-works.com>
parents:
3168
diff
changeset
|
133 ${h.submit('remove_%s' % repo_name,_('delete'),class_="delete_icon action_button",onclick="return confirm('"+_('Confirm to delete this repository: %s') % repo_name+"');")} |
3267
7b74079beec9
coding style: fix trailing and leading spaces and tabs
Mads Kiilerich <madski@unity3d.com>
parents:
3245
diff
changeset
|
134 ${h.end_form()} |
3245
8f3cc21d83e6
fixes issue #739 Delete/Edit repositories should only point to admin links if the user is an super admin.
Marcin Kuzminski <marcin@python-works.com>
parents:
3168
diff
changeset
|
135 %endif |
3154
0226b6d6b2b5
Use common function for generation of grid data
Marcin Kuzminski <marcin@python-works.com>
parents:
2937
diff
changeset
|
136 </div> |
3168
2fb94c52e20e
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3154
diff
changeset
|
137 </div> |
3154
0226b6d6b2b5
Use common function for generation of grid data
Marcin Kuzminski <marcin@python-works.com>
parents:
2937
diff
changeset
|
138 </%def> |
0226b6d6b2b5
Use common function for generation of grid data
Marcin Kuzminski <marcin@python-works.com>
parents:
2937
diff
changeset
|
139 |
2663
cc8d7d450d15
No more raw html inside users controller.
Marcin Kuzminski <marcin@python-works.com>
parents:
2304
diff
changeset
|
140 <%def name="user_actions(user_id, username)"> |
cc8d7d450d15
No more raw html inside users controller.
Marcin Kuzminski <marcin@python-works.com>
parents:
2304
diff
changeset
|
141 ${h.form(h.url('delete_user', id=user_id),method='delete')} |
cc8d7d450d15
No more raw html inside users controller.
Marcin Kuzminski <marcin@python-works.com>
parents:
2304
diff
changeset
|
142 ${h.submit('remove_',_('delete'),id="remove_user_%s" % user_id, |
cc8d7d450d15
No more raw html inside users controller.
Marcin Kuzminski <marcin@python-works.com>
parents:
2304
diff
changeset
|
143 class_="delete_icon action_button",onclick="return confirm('"+_('Confirm to delete this user: %s') % username+"');")} |
cc8d7d450d15
No more raw html inside users controller.
Marcin Kuzminski <marcin@python-works.com>
parents:
2304
diff
changeset
|
144 ${h.end_form()} |
cc8d7d450d15
No more raw html inside users controller.
Marcin Kuzminski <marcin@python-works.com>
parents:
2304
diff
changeset
|
145 </%def> |
cc8d7d450d15
No more raw html inside users controller.
Marcin Kuzminski <marcin@python-works.com>
parents:
2304
diff
changeset
|
146 |
cc8d7d450d15
No more raw html inside users controller.
Marcin Kuzminski <marcin@python-works.com>
parents:
2304
diff
changeset
|
147 <%def name="user_name(user_id, username)"> |
cc8d7d450d15
No more raw html inside users controller.
Marcin Kuzminski <marcin@python-works.com>
parents:
2304
diff
changeset
|
148 ${h.link_to(username,h.url('edit_user', id=user_id))} |
cc8d7d450d15
No more raw html inside users controller.
Marcin Kuzminski <marcin@python-works.com>
parents:
2304
diff
changeset
|
149 </%def> |
3154
0226b6d6b2b5
Use common function for generation of grid data
Marcin Kuzminski <marcin@python-works.com>
parents:
2937
diff
changeset
|
150 |
0226b6d6b2b5
Use common function for generation of grid data
Marcin Kuzminski <marcin@python-works.com>
parents:
2937
diff
changeset
|
151 <%def name="toggle_follow(repo_id)"> |
0226b6d6b2b5
Use common function for generation of grid data
Marcin Kuzminski <marcin@python-works.com>
parents:
2937
diff
changeset
|
152 <span id="follow_toggle_${repo_id}" class="following" title="${_('Stop following this repository')}" |
0226b6d6b2b5
Use common function for generation of grid data
Marcin Kuzminski <marcin@python-works.com>
parents:
2937
diff
changeset
|
153 onclick="javascript:toggleFollowingRepo(this, ${repo_id},'${str(h.get_token())}')"> |
0226b6d6b2b5
Use common function for generation of grid data
Marcin Kuzminski <marcin@python-works.com>
parents:
2937
diff
changeset
|
154 </span> |
0226b6d6b2b5
Use common function for generation of grid data
Marcin Kuzminski <marcin@python-works.com>
parents:
2937
diff
changeset
|
155 </%def> |