Show More
@@ -1,216 +1,216 b'' | |||
|
1 | 1 | <%def name="refs_counters(branches, closed_branches, tags, bookmarks)"> |
|
2 | 2 | <span class="branchtag tag"> |
|
3 | 3 | <a href="${h.route_path('branches_home',repo_name=c.repo_name)}" class="childs"> |
|
4 | 4 | <i class="icon-branch"></i>${_ungettext( |
|
5 | 5 | '%(num)s Branch','%(num)s Branches', len(branches)) % {'num': len(branches)}}</a> |
|
6 | 6 | </span> |
|
7 | 7 | |
|
8 | 8 | %if closed_branches: |
|
9 | 9 | <span class="branchtag tag"> |
|
10 | 10 | <a href="${h.route_path('branches_home',repo_name=c.repo_name)}" class="childs"> |
|
11 | 11 | <i class="icon-branch"></i>${_ungettext( |
|
12 | 12 | '%(num)s Closed Branch', '%(num)s Closed Branches', len(closed_branches)) % {'num': len(closed_branches)}}</a> |
|
13 | 13 | </span> |
|
14 | 14 | %endif |
|
15 | 15 | |
|
16 | 16 | <span class="tagtag tag"> |
|
17 | 17 | <a href="${h.route_path('tags_home',repo_name=c.repo_name)}" class="childs"> |
|
18 | 18 | <i class="icon-tag"></i>${_ungettext( |
|
19 | 19 | '%(num)s Tag', '%(num)s Tags', len(tags)) % {'num': len(tags)}}</a> |
|
20 | 20 | </span> |
|
21 | 21 | |
|
22 | 22 | %if bookmarks: |
|
23 | 23 | <span class="booktag tag"> |
|
24 | 24 | <a href="${h.route_path('bookmarks_home',repo_name=c.repo_name)}" class="childs"> |
|
25 | 25 | <i class="icon-bookmark"></i>${_ungettext( |
|
26 | 26 | '%(num)s Bookmark', '%(num)s Bookmarks', len(bookmarks)) % {'num': len(bookmarks)}}</a> |
|
27 | 27 | </span> |
|
28 | 28 | %endif |
|
29 | 29 | </%def> |
|
30 | 30 | |
|
31 | 31 | <%def name="summary_detail(breadcrumbs_links, show_downloads=True)"> |
|
32 | 32 | <% summary = lambda n:{False:'summary-short'}.get(n) %> |
|
33 | 33 | |
|
34 | 34 | <div id="summary-menu-stats" class="summary-detail"> |
|
35 | 35 | <div class="summary-detail-header"> |
|
36 | 36 | <div class="breadcrumbs files_location"> |
|
37 | 37 | <h4> |
|
38 | 38 | ${breadcrumbs_links} |
|
39 | 39 | </h4> |
|
40 | 40 | </div> |
|
41 | 41 | <div id="summary_details_expand" class="btn-collapse" data-toggle="summary-details"> |
|
42 | 42 | ${_('Show More')} |
|
43 | 43 | </div> |
|
44 | 44 | </div> |
|
45 | 45 | |
|
46 | 46 | <div class="fieldset"> |
|
47 | 47 | |
|
48 | 48 | <div class="left-clone"> |
|
49 | 49 | <select id="clone_option" name="clone_option"> |
|
50 | 50 | <option value="http" selected="selected">HTTP</option> |
|
51 | 51 | <option value="http_id">HTTP UID</option> |
|
52 | 52 | % if c.ssh_enabled: |
|
53 | 53 | <option value="ssh">SSH</option> |
|
54 | 54 | % endif |
|
55 | 55 | </select> |
|
56 | 56 | </div> |
|
57 | 57 | <div class="right-clone"> |
|
58 | 58 | <% |
|
59 | 59 | maybe_disabled = '' |
|
60 | 60 | if h.is_svn_without_proxy(c.rhodecode_db_repo): |
|
61 | 61 | maybe_disabled = 'disabled' |
|
62 | 62 | %> |
|
63 | 63 | |
|
64 | 64 | <span id="clone_option_http"> |
|
65 | 65 | <input type="text" class="input-monospace clone_url_input" ${maybe_disabled} readonly="readonly" value="${c.clone_repo_url}"/> |
|
66 | 66 | <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.clone_repo_url}" title="${_('Copy the clone url')}"></i> |
|
67 | 67 | </span> |
|
68 | 68 | |
|
69 | 69 | <span style="display: none;" id="clone_option_http_id"> |
|
70 | 70 | <input type="text" class="input-monospace clone_url_input" ${maybe_disabled} readonly="readonly" value="${c.clone_repo_url_id}"/> |
|
71 | 71 | <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.clone_repo_url_id}" title="${_('Copy the clone by id url')}"></i> |
|
72 | 72 | </span> |
|
73 | 73 | |
|
74 | 74 | <span style="display: none;" id="clone_option_ssh"> |
|
75 | 75 | <input type="text" class="input-monospace clone_url_input" ${maybe_disabled} readonly="readonly" value="${c.clone_repo_url_ssh}"/> |
|
76 | 76 | <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.clone_repo_url_ssh}" title="${_('Copy the clone by ssh url')}"></i> |
|
77 | 77 | </span> |
|
78 | 78 | |
|
79 | 79 | % if maybe_disabled: |
|
80 | 80 | <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> |
|
81 | 81 | % endif |
|
82 | 82 | |
|
83 | 83 | </div> |
|
84 | 84 | </div> |
|
85 | 85 | |
|
86 | 86 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
87 | 87 | <div class="left-label"> |
|
88 | 88 | ${_('Description')}: |
|
89 | 89 | </div> |
|
90 | 90 | <div class="right-content"> |
|
91 | 91 | <div class="input ${summary(c.show_stats)}"> |
|
92 | 92 | <%namespace name="dt" file="/data_table/_dt_elements.mako"/> |
|
93 | 93 | ${dt.repo_desc(c.rhodecode_db_repo.description_safe, c.visual.stylify_metatags)} |
|
94 | 94 | </div> |
|
95 | 95 | </div> |
|
96 | 96 | </div> |
|
97 | 97 | |
|
98 | 98 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
99 | 99 | <div class="left-label"> |
|
100 | 100 | ${_('Information')}: |
|
101 | 101 | </div> |
|
102 | 102 | <div class="right-content"> |
|
103 | 103 | |
|
104 | 104 | <div class="repo-size"> |
|
105 | 105 | <% commit_rev = c.rhodecode_db_repo.changeset_cache.get('revision') %> |
|
106 | 106 | |
|
107 | 107 | ## commits |
|
108 | 108 | % if commit_rev == -1: |
|
109 | 109 | ${_ungettext('%(num)s Commit', '%(num)s Commits', 0) % {'num': 0}}, |
|
110 | 110 | % else: |
|
111 | 111 | <a href="${h.route_path('repo_changelog', repo_name=c.repo_name)}"> |
|
112 | 112 | ${_ungettext('%(num)s Commit', '%(num)s Commits', commit_rev) % {'num': commit_rev}}</a>, |
|
113 | 113 | % endif |
|
114 | 114 | |
|
115 | 115 | ## forks |
|
116 | 116 | <a title="${_('Number of Repository Forks')}" href="${h.route_path('repo_forks_show_all', repo_name=c.repo_name)}"> |
|
117 | 117 | ${c.repository_forks} ${_ungettext('Fork', 'Forks', c.repository_forks)}</a>, |
|
118 | 118 | |
|
119 | 119 | ## repo size |
|
120 | 120 | % if commit_rev == -1: |
|
121 | 121 | <span class="stats-bullet">0 B</span> |
|
122 | 122 | % else: |
|
123 | 123 | <span class="stats-bullet" id="repo_size_container"> |
|
124 | 124 | ${_('Calculating Repository Size...')} |
|
125 | 125 | </span> |
|
126 | 126 | % endif |
|
127 | 127 | </div> |
|
128 | 128 | |
|
129 | 129 | <div class="commit-info"> |
|
130 | 130 | <div class="tags"> |
|
131 | 131 | % if c.rhodecode_repo: |
|
132 | 132 | ${refs_counters( |
|
133 | 133 | c.rhodecode_repo.branches, |
|
134 | 134 | c.rhodecode_repo.branches_closed, |
|
135 | 135 | c.rhodecode_repo.tags, |
|
136 | 136 | c.rhodecode_repo.bookmarks)} |
|
137 | 137 | % else: |
|
138 | 138 | ## missing requirements can make c.rhodecode_repo None |
|
139 | 139 | ${refs_counters([], [], [], [])} |
|
140 | 140 | % endif |
|
141 | 141 | </div> |
|
142 | 142 | </div> |
|
143 | 143 | |
|
144 | 144 | </div> |
|
145 | 145 | </div> |
|
146 | 146 | |
|
147 | 147 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
148 | 148 | <div class="left-label"> |
|
149 | 149 | ${_('Statistics')}: |
|
150 | 150 | </div> |
|
151 | 151 | <div class="right-content"> |
|
152 | 152 | <div class="input ${summary(c.show_stats)} statistics"> |
|
153 | 153 | % if c.show_stats: |
|
154 | 154 | <div id="lang_stats" class="enabled"> |
|
155 | 155 | ${_('Calculating Code Statistics...')} |
|
156 | 156 | </div> |
|
157 | 157 | % else: |
|
158 | 158 | <span class="disabled"> |
|
159 | 159 | ${_('Statistics are disabled for this repository')} |
|
160 | 160 | </span> |
|
161 | 161 | % if h.HasPermissionAll('hg.admin')('enable stats on from summary'): |
|
162 | 162 | , ${h.link_to(_('enable statistics'),h.route_path('edit_repo',repo_name=c.repo_name, _anchor='repo_enable_statistics'))} |
|
163 | 163 | % endif |
|
164 | 164 | % endif |
|
165 | 165 | </div> |
|
166 | 166 | |
|
167 | 167 | </div> |
|
168 | 168 | </div> |
|
169 | 169 | |
|
170 | 170 | % if show_downloads: |
|
171 | 171 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
172 | 172 | <div class="left-label"> |
|
173 | 173 | ${_('Downloads')}: |
|
174 | 174 | </div> |
|
175 | 175 | <div class="right-content"> |
|
176 | 176 | <div class="input ${summary(c.show_stats)} downloads"> |
|
177 |
% if c.rhodecode_repo and len(c.rhodecode_repo. |
|
|
177 | % if c.rhodecode_repo and len(c.rhodecode_repo.commit_ids) == 0: | |
|
178 | 178 | <span class="disabled"> |
|
179 | 179 | ${_('There are no downloads yet')} |
|
180 | 180 | </span> |
|
181 | 181 | % elif not c.enable_downloads: |
|
182 | 182 | <span class="disabled"> |
|
183 | 183 | ${_('Downloads are disabled for this repository')} |
|
184 | 184 | </span> |
|
185 | 185 | % if h.HasPermissionAll('hg.admin')('enable downloads on from summary'): |
|
186 | 186 | , ${h.link_to(_('enable downloads'),h.route_path('edit_repo',repo_name=c.repo_name, _anchor='repo_enable_downloads'))} |
|
187 | 187 | % endif |
|
188 | 188 | % else: |
|
189 | 189 | <span class="enabled"> |
|
190 | 190 | <a id="archive_link" class="btn btn-small" href="${h.route_path('repo_archivefile',repo_name=c.rhodecode_db_repo.repo_name,fname='tip.zip')}"> |
|
191 | 191 | <i class="icon-archive"></i> tip.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 | </div><!--end summary-detail--> |
|
203 | 203 | </%def> |
|
204 | 204 | |
|
205 | 205 | <%def name="summary_stats(gravatar_function)"> |
|
206 | 206 | <div class="sidebar-right"> |
|
207 | 207 | <div class="summary-detail-header"> |
|
208 | 208 | <h4 class="item"> |
|
209 | 209 | ${_('Owner')} |
|
210 | 210 | </h4> |
|
211 | 211 | </div> |
|
212 | 212 | <div class="sidebar-right-content"> |
|
213 | 213 | ${gravatar_function(c.rhodecode_db_repo.user.email, 16)} |
|
214 | 214 | </div> |
|
215 | 215 | </div><!--end sidebar-right--> |
|
216 | 216 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now