##// END OF EJS Templates
make user listing have edit button to be consistent...
marcink -
r3800:6e38d107 beta
parent child Browse files
Show More
@@ -1,143 +1,150 b''
1 1 ## DATA TABLE RE USABLE ELEMENTS
2 2 ## usage:
3 3 ## <%namespace name="dt" file="/data_table/_dt_elements.html"/>
4 4
5 5 <%def name="quick_menu(repo_name)">
6 6 <ul class="menu_items hidden">
7 7 <li style="border-top:1px solid #003367;margin-left:18px;padding-left:-99px"></li>
8 8 <li>
9 9 <a title="${_('Summary')}" href="${h.url('summary_home',repo_name=repo_name)}">
10 10 <span class="icon">
11 11 <img src="${h.url('/images/icons/clipboard_16.png')}" alt="${_('Summary')}" />
12 12 </span>
13 13 <span>${_('Summary')}</span>
14 14 </a>
15 15 </li>
16 16 <li>
17 17 <a title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=repo_name)}">
18 18 <span class="icon">
19 19 <img src="${h.url('/images/icons/time.png')}" alt="${_('Changelog')}" />
20 20 </span>
21 21 <span>${_('Changelog')}</span>
22 22 </a>
23 23 </li>
24 24 <li>
25 25 <a title="${_('Files')}" href="${h.url('files_home',repo_name=repo_name)}">
26 26 <span class="icon">
27 27 <img src="${h.url('/images/icons/file.png')}" alt="${_('Files')}" />
28 28 </span>
29 29 <span>${_('Files')}</span>
30 30 </a>
31 31 </li>
32 32 <li>
33 33 <a title="${_('Fork')}" href="${h.url('repo_fork_home',repo_name=repo_name)}">
34 34 <span class="icon">
35 35 <img src="${h.url('/images/icons/arrow_divide.png')}" alt="${_('Fork')}" />
36 36 </span>
37 37 <span>${_('Fork')}</span>
38 38 </a>
39 39 </li>
40 40 </ul>
41 41 </%def>
42 42
43 43 <%def name="repo_name(name,rtype,private,fork_of,short_name=False,admin=False)">
44 44 <%
45 45 def get_name(name,short_name=short_name):
46 46 if short_name:
47 47 return name.split('/')[-1]
48 48 else:
49 49 return name
50 50 %>
51 51 <div style="white-space: nowrap">
52 52 ##TYPE OF REPO
53 53 %if h.is_hg(rtype):
54 54 <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/>
55 55 %elif h.is_git(rtype):
56 56 <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/>
57 57 %endif
58 58
59 59 ##PRIVATE/PUBLIC
60 60 %if private and c.visual.show_private_icon:
61 61 <img class="icon" title="${_('Private repository')}" alt="${_('Private repository')}" src="${h.url('/images/icons/lock.png')}"/>
62 62 %elif not private and c.visual.show_public_icon:
63 63 <img class="icon" title="${_('Public repository')}" alt="${_('Public repository')}" src="${h.url('/images/icons/lock_open.png')}"/>
64 64 %endif
65 65
66 66 ##NAME
67 67 %if admin:
68 68 ${h.link_to(get_name(name),h.url('edit_repo',repo_name=name),class_="repo_name")}
69 69 %else:
70 70 ${h.link_to(get_name(name),h.url('summary_home',repo_name=name),class_="repo_name")}
71 71 %endif
72 72 %if fork_of:
73 73 <a href="${h.url('summary_home',repo_name=fork_of.repo_name)}">
74 74 <img class="icon" alt="${_('Fork')}" title="${_('Fork of %s') % fork_of.repo_name}" src="${h.url('/images/icons/arrow_divide.png')}"/></a>
75 75 %endif
76 76 </div>
77 77 </%def>
78 78
79 79 <%def name="last_change(last_change)">
80 80 <span class="tooltip" date="${last_change}" title="${h.tooltip(h.fmt_date(last_change))}">${h.age(last_change)}</span>
81 81 </%def>
82 82
83 83 <%def name="revision(name,rev,tip,author,last_msg)">
84 84 <div>
85 85 %if rev >= 0:
86 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>
87 87 %else:
88 88 ${_('No changesets yet')}
89 89 %endif
90 90 </div>
91 91 </%def>
92 92
93 93 <%def name="rss(name)">
94 94 %if c.rhodecode_user.username != 'default':
95 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>
96 96 %else:
97 97 <a title="${_('Subscribe to %s rss feed')% name}" class="rss_icon" href="${h.url('rss_feed_home',repo_name=name)}"></a>
98 98 %endif
99 99 </%def>
100 100
101 101 <%def name="atom(name)">
102 102 %if c.rhodecode_user.username != 'default':
103 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>
104 104 %else:
105 105 <a title="${_('Subscribe to %s atom feed')% name}" class="atom_icon" href="${h.url('atom_feed_home',repo_name=name)}"></a>
106 106 %endif
107 107 </%def>
108 108
109 109 <%def name="user_gravatar(email, size=24)">
110 110 <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(email, size)}"/> </div>
111 111 </%def>
112 112
113 113 <%def name="repo_actions(repo_name, super_user=True)">
114 114 <div>
115 115 <div style="float:left">
116 116 <a href="${h.url('edit_repo',repo_name=repo_name)}" title="${_('edit')}">
117 117 ${h.submit('edit_%s' % repo_name,_('edit'),class_="edit_icon action_button")}
118 118 </a>
119 119 </div>
120 120 <div style="float:left">
121 121 ${h.form(h.url('repo', repo_name=repo_name),method='delete')}
122 122 ${h.submit('remove_%s' % repo_name,_('delete'),class_="delete_icon action_button",onclick="return confirm('"+_('Confirm to delete this repository: %s') % repo_name+"');")}
123 123 ${h.end_form()}
124 124 </div>
125 125 </div>
126 126 </%def>
127 127
128 128 <%def name="user_actions(user_id, username)">
129 <div style="float:left">
130 <a href="${h.url('edit_user',id=user_id)}" title="${_('edit')}">
131 ${h.submit('edit_%s' % username,_('edit'),class_="edit_icon action_button")}
132 </a>
133 </div>
134 <div style="float:left">
129 135 ${h.form(h.url('delete_user', id=user_id),method='delete')}
130 136 ${h.submit('remove_',_('delete'),id="remove_user_%s" % user_id,
131 137 class_="delete_icon action_button",onclick="return confirm('"+_('Confirm to delete this user: %s') % username+"');")}
132 138 ${h.end_form()}
139 </div>
133 140 </%def>
134 141
135 142 <%def name="user_name(user_id, username)">
136 143 ${h.link_to(username,h.url('edit_user', id=user_id))}
137 144 </%def>
138 145
139 146 <%def name="toggle_follow(repo_id)">
140 147 <span id="follow_toggle_${repo_id}" class="following" title="${_('Stop following this repository')}"
141 148 onclick="javascript:toggleFollowingRepo(this, ${repo_id},'${str(h.get_token())}')">
142 149 </span>
143 150 </%def>
General Comments 0
You need to be logged in to leave comments. Login now