Show More
@@ -1,254 +1,254 b'' | |||
|
1 | 1 | <%namespace name="base" file="/base/base.mako"/> |
|
2 | 2 | |
|
3 | 3 | <%def name="refs_counters(branches, closed_branches, tags, bookmarks)"> |
|
4 | 4 | <span class="summary-branchtag summary-tag"> |
|
5 | 5 | <a href="${h.route_path('branches_home',repo_name=c.repo_name)}" class="childs"> |
|
6 | 6 | <i class="icon-branch"></i> |
|
7 | 7 | % if len(branches) == 1: |
|
8 | 8 | <span>${len(branches)}</span> ${_('Branch')} |
|
9 | 9 | % else: |
|
10 | 10 | <span>${len(branches)}</span> ${_('Branches')} |
|
11 | 11 | % endif |
|
12 | 12 | </a> |
|
13 | 13 | </span> |
|
14 | 14 | |
|
15 | 15 | %if closed_branches: |
|
16 | 16 | <span class="summary-branchtag summary-tag"> |
|
17 | 17 | <a href="${h.route_path('branches_home',repo_name=c.repo_name)}" class="childs"> |
|
18 | 18 | <i class="icon-branch"></i> |
|
19 | 19 | % if len(closed_branches) == 1: |
|
20 | 20 | <span>${len(closed_branches)}</span> ${_('Closed Branch')} |
|
21 | 21 | % else: |
|
22 | 22 | <span>${len(closed_branches)}</span> ${_('Closed Branches')} |
|
23 | 23 | % endif |
|
24 | 24 | </a> |
|
25 | 25 | </span> |
|
26 | 26 | %endif |
|
27 | 27 | |
|
28 | 28 | <span class="summary-tagtag summary-tag"> |
|
29 | 29 | <a href="${h.route_path('tags_home',repo_name=c.repo_name)}" class="childs"> |
|
30 | 30 | <i class="icon-tag"></i> |
|
31 | 31 | % if len(tags) == 1: |
|
32 | 32 | <span>${len(tags)}</span> ${_('Tag')} |
|
33 | 33 | % else: |
|
34 | 34 | <span>${len(tags)}</span> ${_('Tags')} |
|
35 | 35 | % endif |
|
36 | 36 | </a> |
|
37 | 37 | </span> |
|
38 | 38 | |
|
39 | 39 | %if bookmarks: |
|
40 | 40 | <span class="summary-booktag summary-tag"> |
|
41 | 41 | <a href="${h.route_path('bookmarks_home',repo_name=c.repo_name)}" class="childs"> |
|
42 | 42 | <i class="icon-bookmark"></i> |
|
43 | 43 | % if len(bookmarks) == 1: |
|
44 | 44 | <span>${len(bookmarks)}</span> ${_('Bookmark')} |
|
45 | 45 | % else: |
|
46 | 46 | <span>${len(bookmarks)}</span> ${_('Bookmarks')} |
|
47 | 47 | % endif |
|
48 | 48 | </a> |
|
49 | 49 | </span> |
|
50 | 50 | %endif |
|
51 | 51 | </%def> |
|
52 | 52 | |
|
53 | 53 | <%def name="summary_detail(breadcrumbs_links, show_downloads=True)"> |
|
54 | 54 | <% summary = lambda n:{False:'summary-short'}.get(n) %> |
|
55 | 55 | |
|
56 | 56 | <div id="summary-menu-stats" class="summary-detail"> |
|
57 | 57 | <div class="fieldset"> |
|
58 | 58 | <div class="left-content"> |
|
59 | 59 | <div class="left-clone"> |
|
60 | 60 | <select id="clone_option" name="clone_option"> |
|
61 | 61 | <option value="http" selected="selected">HTTP</option> |
|
62 | 62 | <option value="http_id">HTTP UID</option> |
|
63 | 63 | % if c.ssh_enabled: |
|
64 | 64 | <option value="ssh">SSH</option> |
|
65 | 65 | % endif |
|
66 | 66 | </select> |
|
67 | 67 | </div> |
|
68 | 68 | |
|
69 | 69 | <div class="right-clone"> |
|
70 | 70 | <% |
|
71 | 71 | maybe_disabled = '' |
|
72 | 72 | if h.is_svn_without_proxy(c.rhodecode_db_repo): |
|
73 | 73 | maybe_disabled = 'disabled' |
|
74 | 74 | %> |
|
75 | 75 | |
|
76 | 76 | <span id="clone_option_http"> |
|
77 | 77 | <input type="text" class="input-monospace clone_url_input" ${maybe_disabled} readonly="readonly" value="${c.clone_repo_url}"/> |
|
78 | 78 | <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.clone_repo_url}" title="${_('Copy the clone url')}"></i> |
|
79 | 79 | </span> |
|
80 | 80 | |
|
81 | 81 | <span style="display: none;" id="clone_option_http_id"> |
|
82 | 82 | <input type="text" class="input-monospace clone_url_input" ${maybe_disabled} readonly="readonly" value="${c.clone_repo_url_id}"/> |
|
83 | 83 | <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.clone_repo_url_id}" title="${_('Copy the clone by id url')}"></i> |
|
84 | 84 | </span> |
|
85 | 85 | |
|
86 | 86 | <span style="display: none;" id="clone_option_ssh"> |
|
87 | 87 | <input type="text" class="input-monospace clone_url_input" ${maybe_disabled} readonly="readonly" value="${c.clone_repo_url_ssh}"/> |
|
88 | 88 | <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.clone_repo_url_ssh}" title="${_('Copy the clone by ssh url')}"></i> |
|
89 | 89 | </span> |
|
90 | 90 | |
|
91 | 91 | % if maybe_disabled: |
|
92 | 92 | <p class="help-block">${_('SVN Protocol is disabled. To enable it, see the')} <a href="${h.route_url('enterprise_svn_setup')}" target="_blank">${_('documentation here')}</a>.</p> |
|
93 | 93 | % endif |
|
94 | 94 | </div> |
|
95 | 95 | </div> |
|
96 | 96 | |
|
97 | 97 | <div class="right-content"> |
|
98 | 98 | <div class="commit-info"> |
|
99 | 99 | <div class="tags"> |
|
100 | <% commit_rev = c.rhodecode_db_repo.changeset_cache.get('revision') %> | |
|
100 | <% commit_rev = h.safe_int(c.rhodecode_db_repo.changeset_cache.get('revision'), 0) + 1 %> | |
|
101 | 101 | % if c.rhodecode_repo: |
|
102 | 102 | ${refs_counters( |
|
103 | 103 | c.rhodecode_repo.branches, |
|
104 | 104 | c.rhodecode_repo.branches_closed, |
|
105 | 105 | c.rhodecode_repo.tags, |
|
106 | 106 | c.rhodecode_repo.bookmarks)} |
|
107 | 107 | % else: |
|
108 | 108 | ## missing requirements can make c.rhodecode_repo None |
|
109 | 109 | ${refs_counters([], [], [], [])} |
|
110 | 110 | % endif |
|
111 | 111 | |
|
112 | 112 | ## commits |
|
113 | 113 | <span class="summary-tag"> |
|
114 | 114 | % if commit_rev == -1: |
|
115 | 115 | <i class="icon-history"></i> |
|
116 | 116 | % if commit_rev == -1: |
|
117 | 117 | <span>0</span> ${_('Commit')} |
|
118 | 118 | % else: |
|
119 | 119 | <span>0</span> ${_('Commits')} |
|
120 | 120 | % endif |
|
121 | 121 | % else: |
|
122 | 122 | <a href="${h.route_path('repo_commits', repo_name=c.repo_name)}"> |
|
123 | 123 | <i class="icon-history"></i> |
|
124 | 124 | % if commit_rev == 1: |
|
125 | 125 | <span>${commit_rev}</span> ${_('Commit')} |
|
126 | 126 | % else: |
|
127 | 127 | <span>${commit_rev}</span> ${_('Commits')} |
|
128 | 128 | % endif |
|
129 | 129 | </a> |
|
130 | 130 | % endif |
|
131 | 131 | </span> |
|
132 | 132 | |
|
133 | 133 | ## forks |
|
134 | 134 | <span class="summary-tag"> |
|
135 | 135 | <a title="${_('Number of Repository Forks')}" href="${h.route_path('repo_forks_show_all', repo_name=c.repo_name)}"> |
|
136 | 136 | <i class="icon-code-fork"></i> |
|
137 | 137 | <span>${c.repository_forks}</span> ${_ungettext('Fork', 'Forks', c.repository_forks)}</a> |
|
138 | 138 | </span> |
|
139 | 139 | </div> |
|
140 | 140 | </div> |
|
141 | 141 | </div> |
|
142 | 142 | </div> |
|
143 | 143 | ## owner, description, downloads, statistics |
|
144 | 144 | |
|
145 | 145 | ## Owner |
|
146 | 146 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
147 | 147 | <div class="left-label-summary"> |
|
148 | 148 | <p>${_('Owner')}</p> |
|
149 | 149 | <div class="right-label-summary"> |
|
150 | 150 | ${base.gravatar_with_user(c.rhodecode_db_repo.user.email, 16, tooltip=True)} |
|
151 | 151 | </div> |
|
152 | 152 | |
|
153 | 153 | </div> |
|
154 | 154 | </div> |
|
155 | 155 | |
|
156 | 156 | ## Description |
|
157 | 157 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
158 | 158 | <div class="left-label-summary"> |
|
159 | 159 | <p>${_('Description')}</p> |
|
160 | 160 | |
|
161 | 161 | <div class="right-label-summary input ${summary(c.show_stats)}"> |
|
162 | 162 | <%namespace name="dt" file="/data_table/_dt_elements.mako"/> |
|
163 | 163 | ${dt.repo_desc(c.rhodecode_db_repo.description_safe, c.visual.stylify_metatags)} |
|
164 | 164 | </div> |
|
165 | 165 | </div> |
|
166 | 166 | </div> |
|
167 | 167 | |
|
168 | 168 | ## Downloads |
|
169 | 169 | % if show_downloads: |
|
170 | 170 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
171 | 171 | <div class="left-label-summary"> |
|
172 | 172 | <p>${_('Downloads')}</p> |
|
173 | 173 | |
|
174 | 174 | <div class="right-label-summary input ${summary(c.show_stats)} downloads"> |
|
175 | 175 | % if c.rhodecode_repo and len(c.rhodecode_repo.commit_ids) == 0: |
|
176 | 176 | <span class="disabled"> |
|
177 | 177 | ${_('There are no downloads yet')} |
|
178 | 178 | </span> |
|
179 | 179 | % elif not c.enable_downloads: |
|
180 | 180 | <span class="disabled"> |
|
181 | 181 | ${_('Downloads are disabled for this repository')}. |
|
182 | 182 | </span> |
|
183 | 183 | % if c.is_super_admin: |
|
184 | 184 | ${h.link_to(_('Enable downloads'),h.route_path('edit_repo',repo_name=c.repo_name, _anchor='repo_enable_downloads'))} |
|
185 | 185 | % endif |
|
186 | 186 | % else: |
|
187 | 187 | <span class="enabled"> |
|
188 | 188 | |
|
189 | 189 | <a id="archive_link" class="btn btn-small" href="${h.route_path('repo_archivefile',repo_name=c.rhodecode_db_repo.repo_name, fname=c.rhodecode_db_repo.landing_ref_name+'.zip')}"> |
|
190 | 190 | <i class="icon-download"></i> |
|
191 | 191 | ${c.rhodecode_db_repo.landing_ref_name}.zip |
|
192 | 192 | ## replaced by some JS on select |
|
193 | 193 | </a> |
|
194 | 194 | </span> |
|
195 | 195 | ${h.hidden('download_options')} |
|
196 | 196 | % endif |
|
197 | 197 | </div> |
|
198 | 198 | </div> |
|
199 | 199 | </div> |
|
200 | 200 | % endif |
|
201 | 201 | |
|
202 | 202 | ## Repo size |
|
203 | 203 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
204 | 204 | <div class="left-label-summary"> |
|
205 | 205 | <p>${_('Repository size')}</p> |
|
206 | 206 | |
|
207 | 207 | <div class="right-label-summary"> |
|
208 | 208 | <div class="tags"> |
|
209 | 209 | ## repo size |
|
210 | 210 | % if commit_rev == -1: |
|
211 | 211 | <span class="stats-bullet">0 B</span> |
|
212 | 212 | % else: |
|
213 | 213 | <span> |
|
214 | 214 | <a href="#showSize" onclick="calculateSize(); $(this).hide(); return false" id="show-repo-size">Show repository size</a> |
|
215 | 215 | </span> |
|
216 | 216 | <span class="stats-bullet" id="repo_size_container" style="display:none"> |
|
217 | 217 | ${_('Calculating Repository Size...')} |
|
218 | 218 | </span> |
|
219 | 219 | % endif |
|
220 | 220 | </div> |
|
221 | 221 | </div> |
|
222 | 222 | </div> |
|
223 | 223 | </div> |
|
224 | 224 | |
|
225 | 225 | ## Statistics |
|
226 | 226 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
227 | 227 | <div class="left-label-summary"> |
|
228 | 228 | <p>${_('Code Statistics')}</p> |
|
229 | 229 | |
|
230 | 230 | <div class="right-label-summary input ${summary(c.show_stats)} statistics"> |
|
231 | 231 | % if c.show_stats: |
|
232 | 232 | <div id="lang_stats" class="enabled"> |
|
233 | 233 | <a href="#showSize" onclick="calculateSize(); $('#show-repo-size').hide(); $(this).hide(); return false" id="show-repo-size">Show code statistics</a> |
|
234 | 234 | </div> |
|
235 | 235 | % else: |
|
236 | 236 | <span class="disabled"> |
|
237 | 237 | ${_('Statistics are disabled for this repository')}. |
|
238 | 238 | </span> |
|
239 | 239 | % if c.is_super_admin: |
|
240 | 240 | ${h.link_to(_('Enable statistics'),h.route_path('edit_repo',repo_name=c.repo_name, _anchor='repo_enable_statistics'))} |
|
241 | 241 | % endif |
|
242 | 242 | % endif |
|
243 | 243 | </div> |
|
244 | 244 | |
|
245 | 245 | </div> |
|
246 | 246 | </div> |
|
247 | 247 | |
|
248 | 248 | |
|
249 | 249 | </div><!--end summary-detail--> |
|
250 | 250 | |
|
251 | 251 | <div id="summary_details_expand" class="btn-collapse" data-toggle="summary-details"> |
|
252 | 252 | ${_('Show More')} |
|
253 | 253 | </div> |
|
254 | 254 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now