comparison rhodecode/templates/data_table/_dt_elements.html @ 4116:ffd45b185016 rhodecode-2.2.5-gpl

Imported some of the GPLv3'd changes from RhodeCode v2.2.5. This imports changes between changesets 21af6c4eab3d and 6177597791c2 in RhodeCode's original repository, including only changes to Python files and HTML. RhodeCode clearly licensed its changes to these files under GPLv3 in their /LICENSE file, which states the following: The Python code and integrated HTML are licensed under the GPLv3 license. (See: https://code.rhodecode.com/rhodecode/files/v2.2.5/LICENSE or http://web.archive.org/web/20140512193334/https://code.rhodecode.com/rhodecode/files/f3b123159901f15426d18e3dc395e8369f70ebe0/LICENSE for an online copy of that LICENSE file) Conservancy reviewed these changes and confirmed that they can be licensed as a whole to the Kallithea project under GPLv3-only. While some of the contents committed herein are clearly licensed GPLv3-or-later, on the whole we must assume the are GPLv3-only, since the statement above from RhodeCode indicates that they intend GPLv3-only as their license, per GPLv3ยง14 and other relevant sections of GPLv3.
author Bradley M. Kuhn <bkuhn@sfconservancy.org>
date Wed, 02 Jul 2014 19:03:13 -0400
parents 867a7dffc424
children
comparison
equal deleted inserted replaced
4115:8b7294a804a0 4116:ffd45b185016
2 ## usage: 2 ## usage:
3 ## <%namespace name="dt" file="/data_table/_dt_elements.html"/> 3 ## <%namespace name="dt" file="/data_table/_dt_elements.html"/>
4 4
5 <%def name="quick_menu(repo_name)"> 5 <%def name="quick_menu(repo_name)">
6 <ul class="menu_items hidden"> 6 <ul class="menu_items hidden">
7 ##<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
8
7 <li style="border-top:1px solid #003367;margin-left:18px;padding-left:-99px"></li> 9 <li style="border-top:1px solid #003367;margin-left:18px;padding-left:-99px"></li>
8 <li> 10 <li>
9 <a title="${_('Summary')}" href="${h.url('summary_home',repo_name=repo_name)}"> 11 <a title="${_('Summary')}" href="${h.url('summary_home',repo_name=repo_name)}">
10 <span class="icon"> 12 <span class="icon">
11 <img src="${h.url('/images/icons/clipboard_16.png')}" alt="${_('Summary')}" /> 13 <i class="icon-file-text"></i>
12 </span> 14 </span>
13 <span>${_('Summary')}</span> 15 <span>${_('Summary')}</span>
14 </a> 16 </a>
15 </li> 17 </li>
16 <li> 18 <li>
17 <a title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=repo_name)}"> 19 <a title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=repo_name)}">
18 <span class="icon"> 20 <span class="icon">
19 <img src="${h.url('/images/icons/time.png')}" alt="${_('Changelog')}" /> 21 <i class="icon-list-alt"></i>
20 </span> 22 </span>
21 <span>${_('Changelog')}</span> 23 <span>${_('Changelog')}</span>
22 </a> 24 </a>
23 </li> 25 </li>
24 <li> 26 <li>
25 <a title="${_('Files')}" href="${h.url('files_home',repo_name=repo_name)}"> 27 <a title="${_('Files')}" href="${h.url('files_home',repo_name=repo_name)}">
26 <span class="icon"> 28 <span class="icon">
27 <img src="${h.url('/images/icons/file.png')}" alt="${_('Files')}" /> 29 <i class="icon-file-alt"></i>
28 </span> 30 </span>
29 <span>${_('Files')}</span> 31 <span>${_('Files')}</span>
30 </a> 32 </a>
31 </li> 33 </li>
32 <li> 34 <li>
33 <a title="${_('Fork')}" href="${h.url('repo_fork_home',repo_name=repo_name)}"> 35 <a title="${_('Fork')}" href="${h.url('repo_fork_home',repo_name=repo_name)}">
34 <span class="icon"> 36 <span class="icon">
35 <img src="${h.url('/images/icons/arrow_divide.png')}" alt="${_('Fork')}" /> 37 <i class="icon-code-fork"></i>
36 </span> 38 </span>
37 <span>${_('Fork')}</span> 39 <span>${_('Fork')}</span>
38 </a> 40 </a>
39 </li> 41 </li>
40 </ul> 42 </ul>
41 </%def> 43 </%def>
42 44
43 <%def name="repo_name(name,rtype,private,fork_of,short_name=False,admin=False)"> 45 <%def name="repo_name(name,rtype,rstate,private,fork_of,short_name=False,admin=False)">
44 <% 46 <%
45 def get_name(name,short_name=short_name): 47 def get_name(name,short_name=short_name):
46 if short_name: 48 if short_name:
47 return name.split('/')[-1] 49 return name.split('/')[-1]
48 else: 50 else:
49 return name 51 return name
50 %> 52 %>
51 <div style="white-space: nowrap"> 53 <div style="white-space: nowrap; ${'opacity: 0.5' if rstate == 'repo_state_pending' else ''}}">
52 ##TYPE OF REPO 54 ##NAME
53 %if h.is_hg(rtype): 55 %if admin:
54 <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/> 56 <a href="${h.url('edit_repo',repo_name=name)}">
55 %elif h.is_git(rtype): 57 %else:
56 <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/> 58 <a href="${h.url('summary_home',repo_name=name)}">
57 %endif 59 %endif
58 60
59 ##PRIVATE/PUBLIC 61 ##TYPE OF REPO
60 %if private and c.visual.show_private_icon: 62 %if h.is_hg(rtype):
61 <img class="icon" title="${_('Private repository')}" alt="${_('Private repository')}" src="${h.url('/images/icons/private_repo.png')}"/> 63 <span title="${_('Mercurial repository')}"><i class="icon-hg" style="color: #316293; font-size: 14px;"></i></span>
62 %elif not private and c.visual.show_public_icon: 64 %elif h.is_git(rtype):
63 <img class="icon" title="${_('Public repository')}" alt="${_('Public repository')}" src="${h.url('/images/icons/public_repo.png')}"/> 65 <span title="${_('Git repository')}"><i class="icon-git" style="color: #e85634; font-size: 14px;"></i></span>
64 %endif 66 %endif
65 67
66 ##NAME 68 ##PRIVATE/PUBLIC
67 %if admin: 69 %if private and c.visual.show_private_icon:
68 ${h.link_to(get_name(name),h.url('edit_repo',repo_name=name),class_="repo_name")} 70 <i class="icon-lock" style="color: #e85634; font-size: 16px; vertical-align: -2px; margin: 0px 1px 0px 3px" title="${_('Private repository')}"></i>
69 %else: 71 %elif not private and c.visual.show_public_icon:
70 ${h.link_to(get_name(name),h.url('summary_home',repo_name=name),class_="repo_name")} 72 <i class="icon-unlock-alt" style="color: #999999; font-size: 16px; vertical-align: -2px; margin: 0px 1px 0px 3px" title="${_('Public repository')}"></i>
71 %endif 73 %else:
72 %if fork_of: 74 <span style="margin: 0px 8px 0px 8px"></span>
73 <a href="${h.url('summary_home',repo_name=fork_of.repo_name)}"> 75 %endif
74 <img class="icon" alt="${_('Fork')}" title="${_('Fork of %s') % fork_of.repo_name}" src="${h.url('/images/icons/arrow_divide.png')}"/></a> 76 ${get_name(name)}
75 %endif 77 </a>
78 %if fork_of:
79 <a href="${h.url('summary_home',repo_name=fork_of.repo_name)}"><i class="icon-code-fork"></i></a>
80 %endif
81 %if rstate == 'repo_state_pending':
82 <i class="icon-cogs" style="color: #036185;" title="${_('Repository creating in progress...')}"></i>
83 %endif
76 </div> 84 </div>
77 </%def> 85 </%def>
78 86
79 <%def name="last_change(last_change)"> 87 <%def name="last_change(last_change)">
80 <span class="tooltip" date="${last_change}" title="${h.tooltip(h.fmt_date(last_change))}">${h.age(last_change)}</span> 88 <span class="tooltip" date="${last_change}" title="${h.tooltip(h.fmt_date(last_change))}">${h.age(last_change)}</span>
90 </div> 98 </div>
91 </%def> 99 </%def>
92 100
93 <%def name="rss(name)"> 101 <%def name="rss(name)">
94 %if c.rhodecode_user.username != 'default': 102 %if c.rhodecode_user.username != 'default':
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> 103 <a title="${_('Subscribe to %s rss feed')% name}" href="${h.url('rss_feed_home',repo_name=name,api_key=c.rhodecode_user.api_key)}"><i class="icon-rss-sign" style="color: #fa9b39"></i></a>
96 %else: 104 %else:
97 <a title="${_('Subscribe to %s rss feed')% name}" class="rss_icon" href="${h.url('rss_feed_home',repo_name=name)}"></a> 105 <a title="${_('Subscribe to %s rss feed')% name}" href="${h.url('rss_feed_home',repo_name=name)}"><i class="icon-rss-sign" style="color: #fa9b39"></i></a>
98 %endif 106 %endif
99 </%def> 107 </%def>
100 108
101 <%def name="atom(name)"> 109 <%def name="atom(name)">
102 %if c.rhodecode_user.username != 'default': 110 %if c.rhodecode_user.username != 'default':
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> 111 <a title="${_('Subscribe to %s atom feed')% name}" href="${h.url('atom_feed_home',repo_name=name,api_key=c.rhodecode_user.api_key)}"><i class="icon-rss-sign" style="color: #fa9b39"></i></a>
104 %else: 112 %else:
105 <a title="${_('Subscribe to %s atom feed')% name}" class="atom_icon" href="${h.url('atom_feed_home',repo_name=name)}"></a> 113 <a title="${_('Subscribe to %s atom feed')% name}" href="${h.url('atom_feed_home',repo_name=name)}"><i class="icon-rss-sign" style="color: #fa9b39"></i></a>
106 %endif 114 %endif
107 </%def> 115 </%def>
108 116
109 <%def name="user_gravatar(email, size=24)"> 117 <%def name="user_gravatar(email, size=24)">
110 <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(email, size)}"/> </div> 118 <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(email, size)}"/> </div>
111 </%def> 119 </%def>
112 120
113 <%def name="repo_actions(repo_name, super_user=True)"> 121 <%def name="repo_actions(repo_name, super_user=True)">
114 <div> 122 <div>
115 <div style="float:left"> 123 <div style="float:left; margin-right:5px;" class="grid_edit">
116 <a href="${h.url('edit_repo',repo_name=repo_name)}" title="${_('edit')}"> 124 <a href="${h.url('edit_repo',repo_name=repo_name)}" title="${_('edit')}">
117 ${h.submit('edit_%s' % repo_name,_('edit'),class_="edit_icon action_button")} 125 <i class="icon-pencil"></i> ${h.submit('edit_%s' % repo_name,_('edit'),class_="action_button")}
118 </a> 126 </a>
119 </div> 127 </div>
120 <div style="float:left"> 128 <div style="float:left" class="grid_delete">
121 ${h.form(h.url('repo', repo_name=repo_name),method='delete')} 129 ${h.form(h.url('repo', repo_name=repo_name),method='delete')}
122 ${h.submit('remove_%s' % repo_name,_('delete'),class_="delete_icon action_button",onclick="return confirm('"+_('Confirm to delete this repository: %s') % repo_name+"');")} 130 <i class="icon-remove-sign" style="color:#FF4444"></i>
131 ${h.submit('remove_%s' % repo_name,_('delete'),class_="action_button",
132 onclick="return confirm('"+_('Confirm to delete this repository: %s') % repo_name+"');")}
123 ${h.end_form()} 133 ${h.end_form()}
124 </div> 134 </div>
125 </div> 135 </div>
126 </%def> 136 </%def>
127 137
138 <%def name="repo_state(repo_state)">
139 <div>
140 %if repo_state == 'repo_state_pending':
141 <div class="btn btn-mini btn-info disabled">${_('Creating')}</div>
142 %elif repo_state == 'repo_state_created':
143 <div class="btn btn-mini btn-success disabled">${_('Created')}</div>
144 %else:
145 <div class="btn btn-mini btn-danger disabled" title="${repo_state}">invalid</div>
146 %endif
147 </div>
148 </%def>
149
128 <%def name="user_actions(user_id, username)"> 150 <%def name="user_actions(user_id, username)">
129 <div style="float:left"> 151 <div style="float:left" class="grid_edit">
130 <a href="${h.url('edit_user',id=user_id)}" title="${_('edit')}"> 152 <a href="${h.url('edit_user',id=user_id)}" title="${_('edit')}">
131 ${h.submit('edit_%s' % username,_('edit'),class_="edit_icon action_button")} 153 <i class="icon-pencil"></i> ${h.submit('edit_%s' % username,_('edit'),class_="action_button")}
132 </a> 154 </a>
133 </div> 155 </div>
134 <div style="float:left"> 156 <div style="float:left" class="grid_delete">
135 ${h.form(h.url('delete_user', id=user_id),method='delete')} 157 ${h.form(h.url('delete_user', id=user_id),method='delete')}
136 ${h.submit('remove_',_('delete'),id="remove_user_%s" % user_id, 158 <i class="icon-remove-sign" style="color:#FF4444"></i>
137 class_="delete_icon action_button",onclick="return confirm('"+_('Confirm to delete this user: %s') % username+"');")} 159 ${h.submit('remove_',_('delete'),id="remove_user_%s" % user_id, class_="action_button",
160 onclick="return confirm('"+_('Confirm to delete this user: %s') % username+"');")}
138 ${h.end_form()} 161 ${h.end_form()}
162 </div>
163 </%def>
164
165 <%def name="user_group_actions(user_group_id, user_group_name)">
166 <div style="float:left" class="grid_edit">
167 <a href="${h.url('edit_users_group', id=user_group_id)}" title="${_('Edit')}">
168 <i class="icon-pencil"></i>
169 ${h.submit('edit_%s' % user_group_name,_('edit'),class_="action_button", id_="submit_user_group_edit")}
170 </a>
171 </div>
172 <div style="float:left" class="grid_delete">
173 ${h.form(h.url('users_group', id=user_group_id),method='delete')}
174 <i class="icon-remove-sign" style="color:#FF4444"></i>
175 ${h.submit('remove_',_('delete'),id="remove_group_%s" % user_group_id, class_="action_button",
176 onclick="return confirm('"+_('Confirm to delete this user group: %s') % user_group_name+"');")}
177 ${h.end_form()}
178 </div>
179 </%def>
180
181 <%def name="repo_group_actions(repo_group_id, repo_group_name, gr_count)">
182 <div style="float:left" class="grid_edit">
183 <a href="${h.url('edit_repo_group',group_name=repo_group_name)}" title="${_('Edit')}">
184 <i class="icon-pencil"></i>
185 ${h.submit('edit_%s' % repo_group_name, _('edit'),class_="action_button")}
186 </a>
187 </div>
188 <div style="float:left" class="grid_delete">
189 ${h.form(h.url('repos_group', group_name=repo_group_name),method='delete')}
190 <i class="icon-remove-sign" style="color:#FF4444"></i>
191 ${h.submit('remove_%s' % repo_group_name,_('delete'),class_="action_button",
192 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)+"');")}
193 ${h.end_form()}
139 </div> 194 </div>
140 </%def> 195 </%def>
141 196
142 <%def name="user_name(user_id, username)"> 197 <%def name="user_name(user_id, username)">
143 ${h.link_to(username,h.url('edit_user', id=user_id))} 198 ${h.link_to(username,h.url('edit_user', id=user_id))}
199 </%def>
200
201 <%def name="repo_group_name(repo_group_name, children_groups)">
202 <div style="white-space: nowrap">
203 <a href="${h.url('repos_group_home',group_name=repo_group_name)}">
204 <i class="icon-folder-close" title="${_('Repository group')}"></i> ${h.literal(' &raquo; '.join(children_groups))}</a>
205 </div>
206 </%def>
207
208 <%def name="user_group_name(user_group_id, user_group_name)">
209 <div style="white-space: nowrap">
210 <a href="${h.url('edit_users_group', id=user_group_id)}">
211 <i class="icon-group" title="${_('User group')}"></i> ${user_group_name}</a>
212 </div>
144 </%def> 213 </%def>
145 214
146 <%def name="toggle_follow(repo_id)"> 215 <%def name="toggle_follow(repo_id)">
147 <span id="follow_toggle_${repo_id}" class="following" title="${_('Stop following this repository')}" 216 <span id="follow_toggle_${repo_id}" class="following" title="${_('Stop following this repository')}"
148 onclick="javascript:toggleFollowingRepo(this, ${repo_id},'${str(h.get_token())}')"> 217 onclick="javascript:toggleFollowingRepo(this, ${repo_id},'${str(h.get_token())}')">