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