Show More
@@ -1,259 +1,257 b'' | |||||
|
1 | <%namespace name="base" file="/base/base.mako"/> | |||
|
2 | ||||
1 | <%def name="refs_counters(branches, closed_branches, tags, bookmarks)"> |
|
3 | <%def name="refs_counters(branches, closed_branches, tags, bookmarks)"> | |
2 | <span class="branchtag tag"> |
|
4 | <span class="branchtag tag"> | |
3 | <a href="${h.route_path('branches_home',repo_name=c.repo_name)}" class="childs"> |
|
5 | <a href="${h.route_path('branches_home',repo_name=c.repo_name)}" class="childs"> | |
4 | <i class="icon-branch"></i> |
|
6 | <i class="icon-branch"></i> | |
5 | % if len(branches) == 1: |
|
7 | % if len(branches) == 1: | |
6 | <span>${len(branches)}</span> ${_('Branch')} |
|
8 | <span>${len(branches)}</span> ${_('Branch')} | |
7 | % else: |
|
9 | % else: | |
8 | <span>${len(branches)}</span> ${_('Branches')} |
|
10 | <span>${len(branches)}</span> ${_('Branches')} | |
9 | % endif |
|
11 | % endif | |
10 | </a> |
|
12 | </a> | |
11 | </span> |
|
13 | </span> | |
12 |
|
14 | |||
13 | %if closed_branches: |
|
15 | %if closed_branches: | |
14 | <span class="branchtag tag"> |
|
16 | <span class="branchtag tag"> | |
15 | <a href="${h.route_path('branches_home',repo_name=c.repo_name)}" class="childs"> |
|
17 | <a href="${h.route_path('branches_home',repo_name=c.repo_name)}" class="childs"> | |
16 | <i class="icon-branch"></i> |
|
18 | <i class="icon-branch"></i> | |
17 | % if len(closed_branches) == 1: |
|
19 | % if len(closed_branches) == 1: | |
18 | <span>${len(closed_branches)}</span> ${_('Closed Branch')} |
|
20 | <span>${len(closed_branches)}</span> ${_('Closed Branch')} | |
19 | % else: |
|
21 | % else: | |
20 | <span>${len(closed_branches)}</span> ${_('Closed Branches')} |
|
22 | <span>${len(closed_branches)}</span> ${_('Closed Branches')} | |
21 | % endif |
|
23 | % endif | |
22 | </a> |
|
24 | </a> | |
23 | </span> |
|
25 | </span> | |
24 | %endif |
|
26 | %endif | |
25 |
|
27 | |||
26 | <span class="tagtag tag"> |
|
28 | <span class="tagtag tag"> | |
27 | <a href="${h.route_path('tags_home',repo_name=c.repo_name)}" class="childs"> |
|
29 | <a href="${h.route_path('tags_home',repo_name=c.repo_name)}" class="childs"> | |
28 | <i class="icon-tag"></i> |
|
30 | <i class="icon-tag"></i> | |
29 | % if len(tags) == 1: |
|
31 | % if len(tags) == 1: | |
30 | <span>${len(tags)}</span> ${_('Tag')} |
|
32 | <span>${len(tags)}</span> ${_('Tag')} | |
31 | % else: |
|
33 | % else: | |
32 | <span>${len(tags)}</span> ${_('Tags')} |
|
34 | <span>${len(tags)}</span> ${_('Tags')} | |
33 | % endif |
|
35 | % endif | |
34 | </a> |
|
36 | </a> | |
35 | </span> |
|
37 | </span> | |
36 |
|
38 | |||
37 | %if bookmarks: |
|
39 | %if bookmarks: | |
38 | <span class="booktag tag"> |
|
40 | <span class="booktag tag"> | |
39 | <a href="${h.route_path('bookmarks_home',repo_name=c.repo_name)}" class="childs"> |
|
41 | <a href="${h.route_path('bookmarks_home',repo_name=c.repo_name)}" class="childs"> | |
40 | <i class="icon-bookmark"></i> |
|
42 | <i class="icon-bookmark"></i> | |
41 | % if len(bookmarks) == 1: |
|
43 | % if len(bookmarks) == 1: | |
42 | <span>${len(bookmarks)}</span> ${_('Bookmark')} |
|
44 | <span>${len(bookmarks)}</span> ${_('Bookmark')} | |
43 | % else: |
|
45 | % else: | |
44 | <span>${len(bookmarks)}</span> ${_('Bookmarks')} |
|
46 | <span>${len(bookmarks)}</span> ${_('Bookmarks')} | |
45 | % endif |
|
47 | % endif | |
46 | </a> |
|
48 | </a> | |
47 | </span> |
|
49 | </span> | |
48 | %endif |
|
50 | %endif | |
49 | </%def> |
|
51 | </%def> | |
50 |
|
52 | |||
51 | <%def name="summary_detail(breadcrumbs_links, show_downloads=True)"> |
|
53 | <%def name="summary_detail(breadcrumbs_links, show_downloads=True)"> | |
52 | <% summary = lambda n:{False:'summary-short'}.get(n) %> |
|
54 | <% summary = lambda n:{False:'summary-short'}.get(n) %> | |
53 |
|
55 | |||
54 | <div id="summary-menu-stats" class="summary-detail"> |
|
56 | <div id="summary-menu-stats" class="summary-detail"> | |
55 | <div class="fieldset"> |
|
57 | <div class="fieldset"> | |
56 | <div class="left-content"> |
|
58 | <div class="left-content"> | |
57 | <div class="left-clone"> |
|
59 | <div class="left-clone"> | |
58 | <select id="clone_option" name="clone_option"> |
|
60 | <select id="clone_option" name="clone_option"> | |
59 | <option value="http" selected="selected">HTTP</option> |
|
61 | <option value="http" selected="selected">HTTP</option> | |
60 | <option value="http_id">HTTP UID</option> |
|
62 | <option value="http_id">HTTP UID</option> | |
61 | % if c.ssh_enabled: |
|
63 | % if c.ssh_enabled: | |
62 | <option value="ssh">SSH</option> |
|
64 | <option value="ssh">SSH</option> | |
63 | % endif |
|
65 | % endif | |
64 | </select> |
|
66 | </select> | |
65 | </div> |
|
67 | </div> | |
66 |
|
68 | |||
67 | <div class="right-clone"> |
|
69 | <div class="right-clone"> | |
68 | <% |
|
70 | <% | |
69 | maybe_disabled = '' |
|
71 | maybe_disabled = '' | |
70 | if h.is_svn_without_proxy(c.rhodecode_db_repo): |
|
72 | if h.is_svn_without_proxy(c.rhodecode_db_repo): | |
71 | maybe_disabled = 'disabled' |
|
73 | maybe_disabled = 'disabled' | |
72 | %> |
|
74 | %> | |
73 |
|
75 | |||
74 | <span id="clone_option_http"> |
|
76 | <span id="clone_option_http"> | |
75 | <input type="text" class="input-monospace clone_url_input" ${maybe_disabled} readonly="readonly" value="${c.clone_repo_url}"/> |
|
77 | <input type="text" class="input-monospace clone_url_input" ${maybe_disabled} readonly="readonly" value="${c.clone_repo_url}"/> | |
76 | <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.clone_repo_url}" title="${_('Copy the clone url')}"></i> |
|
78 | <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.clone_repo_url}" title="${_('Copy the clone url')}"></i> | |
77 | </span> |
|
79 | </span> | |
78 |
|
80 | |||
79 | <span style="display: none;" id="clone_option_http_id"> |
|
81 | <span style="display: none;" id="clone_option_http_id"> | |
80 | <input type="text" class="input-monospace clone_url_input" ${maybe_disabled} readonly="readonly" value="${c.clone_repo_url_id}"/> |
|
82 | <input type="text" class="input-monospace clone_url_input" ${maybe_disabled} readonly="readonly" value="${c.clone_repo_url_id}"/> | |
81 | <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.clone_repo_url_id}" title="${_('Copy the clone by id url')}"></i> |
|
83 | <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.clone_repo_url_id}" title="${_('Copy the clone by id url')}"></i> | |
82 | </span> |
|
84 | </span> | |
83 |
|
85 | |||
84 | <span style="display: none;" id="clone_option_ssh"> |
|
86 | <span style="display: none;" id="clone_option_ssh"> | |
85 | <input type="text" class="input-monospace clone_url_input" ${maybe_disabled} readonly="readonly" value="${c.clone_repo_url_ssh}"/> |
|
87 | <input type="text" class="input-monospace clone_url_input" ${maybe_disabled} readonly="readonly" value="${c.clone_repo_url_ssh}"/> | |
86 | <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.clone_repo_url_ssh}" title="${_('Copy the clone by ssh url')}"></i> |
|
88 | <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.clone_repo_url_ssh}" title="${_('Copy the clone by ssh url')}"></i> | |
87 | </span> |
|
89 | </span> | |
88 |
|
90 | |||
89 | % if maybe_disabled: |
|
91 | % if maybe_disabled: | |
90 | <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> |
|
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> | |
91 | % endif |
|
93 | % endif | |
92 | </div> |
|
94 | </div> | |
93 | </div> |
|
95 | </div> | |
94 |
|
96 | |||
95 | <div class="right-content"> |
|
97 | <div class="right-content"> | |
96 | <div class="commit-info"> |
|
98 | <div class="commit-info"> | |
97 | <div class="tags"> |
|
99 | <div class="tags"> | |
98 | <% commit_rev = c.rhodecode_db_repo.changeset_cache.get('revision') %> |
|
100 | <% commit_rev = c.rhodecode_db_repo.changeset_cache.get('revision') %> | |
99 | % if c.rhodecode_repo: |
|
101 | % if c.rhodecode_repo: | |
100 | ${refs_counters( |
|
102 | ${refs_counters( | |
101 | c.rhodecode_repo.branches, |
|
103 | c.rhodecode_repo.branches, | |
102 | c.rhodecode_repo.branches_closed, |
|
104 | c.rhodecode_repo.branches_closed, | |
103 | c.rhodecode_repo.tags, |
|
105 | c.rhodecode_repo.tags, | |
104 | c.rhodecode_repo.bookmarks)} |
|
106 | c.rhodecode_repo.bookmarks)} | |
105 | % else: |
|
107 | % else: | |
106 | ## missing requirements can make c.rhodecode_repo None |
|
108 | ## missing requirements can make c.rhodecode_repo None | |
107 | ${refs_counters([], [], [], [])} |
|
109 | ${refs_counters([], [], [], [])} | |
108 | % endif |
|
110 | % endif | |
109 |
|
111 | |||
110 | ## commits |
|
112 | ## commits | |
111 | <span class="tag"> |
|
113 | <span class="tag"> | |
112 | % if commit_rev == -1: |
|
114 | % if commit_rev == -1: | |
113 | <i class="icon-tag"></i> |
|
115 | <i class="icon-tag"></i> | |
114 | % if commit_rev == -1: |
|
116 | % if commit_rev == -1: | |
115 | <span>0</span> ${_('Commit')} |
|
117 | <span>0</span> ${_('Commit')} | |
116 | % else: |
|
118 | % else: | |
117 | <span>0</span> ${_('Commits')} |
|
119 | <span>0</span> ${_('Commits')} | |
118 | % endif |
|
120 | % endif | |
119 | % else: |
|
121 | % else: | |
120 | <a href="${h.route_path('repo_changelog', repo_name=c.repo_name)}"> |
|
122 | <a href="${h.route_path('repo_changelog', repo_name=c.repo_name)}"> | |
121 | <i class="icon-tag"></i> |
|
123 | <i class="icon-tag"></i> | |
122 | % if commit_rev == 1: |
|
124 | % if commit_rev == 1: | |
123 | <span>${commit_rev}</span> ${_('Commit')} |
|
125 | <span>${commit_rev}</span> ${_('Commit')} | |
124 | % else: |
|
126 | % else: | |
125 | <span>${commit_rev}</span> ${_('Commits')} |
|
127 | <span>${commit_rev}</span> ${_('Commits')} | |
126 | % endif |
|
128 | % endif | |
127 | </a> |
|
129 | </a> | |
128 | % endif |
|
130 | % endif | |
129 | </span> |
|
131 | </span> | |
130 |
|
132 | |||
131 | ## forks |
|
133 | ## forks | |
132 | <span class="tag"> |
|
134 | <span class="tag"> | |
133 | <a title="${_('Number of Repository Forks')}" href="${h.route_path('repo_forks_show_all', repo_name=c.repo_name)}"> |
|
135 | <a title="${_('Number of Repository Forks')}" href="${h.route_path('repo_forks_show_all', repo_name=c.repo_name)}"> | |
134 | <i class="icon-code-fork"></i> |
|
136 | <i class="icon-code-fork"></i> | |
135 | <span>${c.repository_forks}</span> ${_ungettext('Fork', 'Forks', c.repository_forks)}</a> |
|
137 | <span>${c.repository_forks}</span> ${_ungettext('Fork', 'Forks', c.repository_forks)}</a> | |
136 | </span> |
|
138 | </span> | |
137 | </div> |
|
139 | </div> | |
138 | </div> |
|
140 | </div> | |
139 | </div> |
|
141 | </div> | |
140 | </div> |
|
142 | </div> | |
141 |
|
143 | |||
142 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
144 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> | |
143 | <div class="left-label-summary"> |
|
145 | <div class="left-label-summary"> | |
144 | <p>${_('Repository size')}</p> |
|
146 | <p>${_('Repository size')}</p> | |
145 |
|
147 | |||
146 | <div class="commit-info"> |
|
148 | <div class="commit-info"> | |
147 | <div class="tags"> |
|
149 | <div class="tags"> | |
148 | ## repo size |
|
150 | ## repo size | |
149 | % if commit_rev == -1: |
|
151 | % if commit_rev == -1: | |
150 | <span class="stats-bullet">0 B</span> |
|
152 | <span class="stats-bullet">0 B</span> | |
151 | % else: |
|
153 | % else: | |
152 | <span> |
|
154 | <span> | |
153 | <a href="#showSize" onclick="calculateSize(); $(this).hide(); return false" id="show-repo-size">Show repository size</a> |
|
155 | <a href="#showSize" onclick="calculateSize(); $(this).hide(); return false" id="show-repo-size">Show repository size</a> | |
154 | </span> |
|
156 | </span> | |
155 | <span class="stats-bullet" id="repo_size_container" style="display:none"> |
|
157 | <span class="stats-bullet" id="repo_size_container" style="display:none"> | |
156 | ${_('Calculating Repository Size...')} |
|
158 | ${_('Calculating Repository Size...')} | |
157 | </span> |
|
159 | </span> | |
158 | % endif |
|
160 | % endif | |
159 | </div> |
|
161 | </div> | |
160 | </div> |
|
162 | </div> | |
161 | </div> |
|
163 | </div> | |
162 | </div> |
|
164 | </div> | |
163 |
|
165 | |||
164 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
166 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> | |
165 | <div class="left-label-summary"> |
|
167 | <div class="left-label-summary"> | |
166 | <p>${_('Description')}</p> |
|
168 | <p>${_('Description')}</p> | |
167 |
|
169 | |||
168 | <div class="input ${summary(c.show_stats)}"> |
|
170 | <div class="input ${summary(c.show_stats)}"> | |
169 | <%namespace name="dt" file="/data_table/_dt_elements.mako"/> |
|
171 | <%namespace name="dt" file="/data_table/_dt_elements.mako"/> | |
170 | ${dt.repo_desc(c.rhodecode_db_repo.description_safe, c.visual.stylify_metatags)} |
|
172 | ${dt.repo_desc(c.rhodecode_db_repo.description_safe, c.visual.stylify_metatags)} | |
171 | </div> |
|
173 | </div> | |
172 | </div> |
|
174 | </div> | |
173 | </div> |
|
175 | </div> | |
174 |
|
176 | |||
175 | % if show_downloads: |
|
177 | % if show_downloads: | |
176 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
178 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> | |
177 | <div class="left-label-summary"> |
|
179 | <div class="left-label-summary"> | |
178 | <p>${_('Downloads')}</p> |
|
180 | <p>${_('Downloads')}</p> | |
179 |
|
181 | |||
180 | <div class="input ${summary(c.show_stats)} downloads"> |
|
182 | <div class="input ${summary(c.show_stats)} downloads"> | |
181 | % if c.rhodecode_repo and len(c.rhodecode_repo.commit_ids) == 0: |
|
183 | % if c.rhodecode_repo and len(c.rhodecode_repo.commit_ids) == 0: | |
182 | <span class="disabled"> |
|
184 | <span class="disabled"> | |
183 | ${_('There are no downloads yet')} |
|
185 | ${_('There are no downloads yet')} | |
184 | </span> |
|
186 | </span> | |
185 | % elif not c.enable_downloads: |
|
187 | % elif not c.enable_downloads: | |
186 | <span class="disabled"> |
|
188 | <span class="disabled"> | |
187 | ${_('Downloads are disabled for this repository')}. |
|
189 | ${_('Downloads are disabled for this repository')}. | |
188 | </span> |
|
190 | </span> | |
189 | % if c.is_super_admin: |
|
191 | % if c.is_super_admin: | |
190 | ${h.link_to(_('Enable downloads'),h.route_path('edit_repo',repo_name=c.repo_name, _anchor='repo_enable_downloads'))} |
|
192 | ${h.link_to(_('Enable downloads'),h.route_path('edit_repo',repo_name=c.repo_name, _anchor='repo_enable_downloads'))} | |
191 | % endif |
|
193 | % endif | |
192 | % else: |
|
194 | % else: | |
193 | <span class="enabled"> |
|
195 | <span class="enabled"> | |
194 | <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')}"> |
|
196 | <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')}"> | |
195 | <i class="icon-archive"></i> tip.zip |
|
197 | <i class="icon-archive"></i> tip.zip | |
196 | ## replaced by some JS on select |
|
198 | ## replaced by some JS on select | |
197 | </a> |
|
199 | </a> | |
198 | </span> |
|
200 | </span> | |
199 | ${h.hidden('download_options')} |
|
201 | ${h.hidden('download_options')} | |
200 | % endif |
|
202 | % endif | |
201 | </div> |
|
203 | </div> | |
202 | </div> |
|
204 | </div> | |
203 | </div> |
|
205 | </div> | |
204 | % endif |
|
206 | % endif | |
205 |
|
207 | |||
206 | ## Statistics |
|
208 | ## Statistics | |
207 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
209 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> | |
208 | <div class="left-label-summary"> |
|
210 | <div class="left-label-summary"> | |
209 | <p>${_('Statistics')}</p> |
|
211 | <p>${_('Statistics')}</p> | |
210 |
|
212 | |||
211 | <div class="input ${summary(c.show_stats)} statistics"> |
|
213 | <div class="input ${summary(c.show_stats)} statistics"> | |
212 | % if c.show_stats: |
|
214 | % if c.show_stats: | |
213 | <div id="lang_stats" class="enabled"> |
|
215 | <div id="lang_stats" class="enabled"> | |
214 | ${_('Calculating Code Statistics...')} |
|
216 | ${_('Calculating Code Statistics...')} | |
215 | </div> |
|
217 | </div> | |
216 | % else: |
|
218 | % else: | |
217 | <span class="disabled"> |
|
219 | <span class="disabled"> | |
218 | ${_('Statistics are disabled for this repository')}. |
|
220 | ${_('Statistics are disabled for this repository')}. | |
219 | </span> |
|
221 | </span> | |
220 | % if c.is_super_admin: |
|
222 | % if c.is_super_admin: | |
221 | ${h.link_to(_('Enable statistics'),h.route_path('edit_repo',repo_name=c.repo_name, _anchor='repo_enable_statistics'))} |
|
223 | ${h.link_to(_('Enable statistics'),h.route_path('edit_repo',repo_name=c.repo_name, _anchor='repo_enable_statistics'))} | |
222 | % endif |
|
224 | % endif | |
223 | % endif |
|
225 | % endif | |
224 | </div> |
|
226 | </div> | |
225 |
|
227 | |||
226 | </div> |
|
228 | </div> | |
227 | </div> |
|
229 | </div> | |
228 |
|
230 | |||
229 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
231 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> | |
230 | <div class="left-label-summary"> |
|
232 | <div class="left-label-summary"> | |
231 | <p>${_('Owner')}</p> |
|
233 | <p>${_('Owner')}</p> | |
232 |
|
234 | <div class=""> | ||
|
235 | ${base.gravatar_with_user(c.rhodecode_db_repo.user.email, 16)} | |||
|
236 | </div> | |||
233 |
|
237 | |||
234 | </div> |
|
238 | </div> | |
235 | </div> |
|
239 | </div> | |
236 |
|
240 | |||
237 | ## Context Action |
|
241 | ## Context Action | |
238 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
242 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> | |
239 | <div class="left-label-summary"> |
|
243 | <div class="left-label-summary"> | |
240 | %if c.rhodecode_user.username != h.DEFAULT_USER: |
|
244 | %if c.rhodecode_user.username != h.DEFAULT_USER: | |
241 | <a href="${h.route_path('atom_feed_home', repo_name=c.rhodecode_db_repo.repo_name, _query=dict(auth_token=c.rhodecode_user.feed_token))}" title="${_('RSS Feed')}" class="btn btn-sm"><i class="icon-rss-sign"></i>RSS</a> |
|
245 | <a href="${h.route_path('atom_feed_home', repo_name=c.rhodecode_db_repo.repo_name, _query=dict(auth_token=c.rhodecode_user.feed_token))}" title="${_('RSS Feed')}" class="btn btn-sm"><i class="icon-rss-sign"></i>RSS</a> | |
242 | %else: |
|
246 | %else: | |
243 | <a href="${h.route_path('atom_feed_home', repo_name=c.rhodecode_db_repo.repo_name)}" title="${_('RSS Feed')}" class="btn btn-sm"><i class="icon-rss-sign"></i>RSS</a> |
|
247 | <a href="${h.route_path('atom_feed_home', repo_name=c.rhodecode_db_repo.repo_name)}" title="${_('RSS Feed')}" class="btn btn-sm"><i class="icon-rss-sign"></i>RSS</a> | |
244 | %endif |
|
248 | %endif | |
245 | </div> |
|
249 | </div> | |
246 | </div> |
|
250 | </div> | |
247 |
|
251 | |||
248 | </div><!--end summary-detail--> |
|
252 | </div><!--end summary-detail--> | |
249 |
|
253 | |||
250 | <div id="summary_details_expand" class="btn-collapse" data-toggle="summary-details"> |
|
254 | <div id="summary_details_expand" class="btn-collapse" data-toggle="summary-details"> | |
251 | ${_('Show More')} |
|
255 | ${_('Show More')} | |
252 | </div> |
|
256 | </div> | |
253 | </%def> |
|
257 | </%def> | |
254 |
|
||||
255 | <%def name="summary_stats(gravatar_function)"> |
|
|||
256 | <div class=""> |
|
|||
257 | ${gravatar_function(c.rhodecode_db_repo.user.email, 16)} |
|
|||
258 | </div> |
|
|||
259 | </%def> |
|
@@ -1,115 +1,114 b'' | |||||
1 | <%inherit file="/summary/summary_base.mako"/> |
|
1 | <%inherit file="/summary/summary_base.mako"/> | |
2 |
|
2 | |||
3 | <%namespace name="components" file="/summary/components.mako"/> |
|
3 | <%namespace name="components" file="/summary/components.mako"/> | |
4 |
|
4 | |||
5 |
|
5 | |||
6 | <%def name="menu_bar_subnav()"> |
|
6 | <%def name="menu_bar_subnav()"> | |
7 | ${self.repo_menu(active='summary')} |
|
7 | ${self.repo_menu(active='summary')} | |
8 | </%def> |
|
8 | </%def> | |
9 |
|
9 | |||
10 | <%def name="main()"> |
|
10 | <%def name="main()"> | |
11 |
|
11 | |||
12 | <div id="repo-summary" class="summary"> |
|
12 | <div id="repo-summary" class="summary"> | |
13 | ${components.summary_detail(breadcrumbs_links=self.breadcrumbs_links(), show_downloads=True)} |
|
13 | ${components.summary_detail(breadcrumbs_links=self.breadcrumbs_links(), show_downloads=True)} | |
14 | ${components.summary_stats(gravatar_function=self.gravatar_with_user)} |
|
|||
15 | </div><!--end repo-summary--> |
|
14 | </div><!--end repo-summary--> | |
16 |
|
15 | |||
17 |
|
16 | |||
18 | <div class="box"> |
|
17 | <div class="box"> | |
19 | %if not c.repo_commits: |
|
18 | %if not c.repo_commits: | |
20 | <div class="empty-repo"> |
|
19 | <div class="empty-repo"> | |
21 | <div class="title"> |
|
20 | <div class="title"> | |
22 | <h3>${_('Quick start')}</h3> |
|
21 | <h3>${_('Quick start')}</h3> | |
23 | </div> |
|
22 | </div> | |
24 | <div class="clearfix"></div> |
|
23 | <div class="clearfix"></div> | |
25 | </div> |
|
24 | </div> | |
26 | %endif |
|
25 | %endif | |
27 | <div class="table"> |
|
26 | <div class="table"> | |
28 | <div id="shortlog_data"> |
|
27 | <div id="shortlog_data"> | |
29 | <%include file='summary_commits.mako'/> |
|
28 | <%include file='summary_commits.mako'/> | |
30 | </div> |
|
29 | </div> | |
31 | </div> |
|
30 | </div> | |
32 | </div> |
|
31 | </div> | |
33 |
|
32 | |||
34 | %if c.readme_data: |
|
33 | %if c.readme_data: | |
35 | <div id="readme" class="anchor"> |
|
34 | <div id="readme" class="anchor"> | |
36 | <div class="box"> |
|
35 | <div class="box"> | |
37 | <div class="title" title="${h.tooltip(_('Readme file from commit %s:%s') % (c.rhodecode_db_repo.landing_rev[0], c.rhodecode_db_repo.landing_rev[1]))}"> |
|
36 | <div class="title" title="${h.tooltip(_('Readme file from commit %s:%s') % (c.rhodecode_db_repo.landing_rev[0], c.rhodecode_db_repo.landing_rev[1]))}"> | |
38 | <h3 class="breadcrumbs"> |
|
37 | <h3 class="breadcrumbs"> | |
39 | <a href="${h.route_path('repo_files',repo_name=c.repo_name,commit_id=c.rhodecode_db_repo.landing_rev[1],f_path=c.readme_file)}">${c.readme_file}</a> |
|
38 | <a href="${h.route_path('repo_files',repo_name=c.repo_name,commit_id=c.rhodecode_db_repo.landing_rev[1],f_path=c.readme_file)}">${c.readme_file}</a> | |
40 | </h3> |
|
39 | </h3> | |
41 | </div> |
|
40 | </div> | |
42 | <div class="readme codeblock"> |
|
41 | <div class="readme codeblock"> | |
43 | <div class="readme_box"> |
|
42 | <div class="readme_box"> | |
44 | ${c.readme_data|n} |
|
43 | ${c.readme_data|n} | |
45 | </div> |
|
44 | </div> | |
46 | </div> |
|
45 | </div> | |
47 | </div> |
|
46 | </div> | |
48 | </div> |
|
47 | </div> | |
49 | %endif |
|
48 | %endif | |
50 |
|
49 | |||
51 | <script type="text/javascript"> |
|
50 | <script type="text/javascript"> | |
52 | $(document).ready(function(){ |
|
51 | $(document).ready(function(){ | |
53 |
|
52 | |||
54 | var showCloneField = function(clone_url_format){ |
|
53 | var showCloneField = function(clone_url_format){ | |
55 | $.each(['http', 'http_id', 'ssh'], function (idx, val) { |
|
54 | $.each(['http', 'http_id', 'ssh'], function (idx, val) { | |
56 | if(val === clone_url_format){ |
|
55 | if(val === clone_url_format){ | |
57 | $('#clone_option_' + val).show(); |
|
56 | $('#clone_option_' + val).show(); | |
58 | $('#clone_option').val(val) |
|
57 | $('#clone_option').val(val) | |
59 | } else { |
|
58 | } else { | |
60 | $('#clone_option_' + val).hide(); |
|
59 | $('#clone_option_' + val).hide(); | |
61 | } |
|
60 | } | |
62 | }); |
|
61 | }); | |
63 | }; |
|
62 | }; | |
64 | // default taken from session |
|
63 | // default taken from session | |
65 | showCloneField(templateContext.session_attrs.clone_url_format); |
|
64 | showCloneField(templateContext.session_attrs.clone_url_format); | |
66 |
|
65 | |||
67 | $('#clone_option').on('change', function(e) { |
|
66 | $('#clone_option').on('change', function(e) { | |
68 | var selected = $(this).val(); |
|
67 | var selected = $(this).val(); | |
69 |
|
68 | |||
70 | storeUserSessionAttr('rc_user_session_attr.clone_url_format', selected); |
|
69 | storeUserSessionAttr('rc_user_session_attr.clone_url_format', selected); | |
71 | showCloneField(selected) |
|
70 | showCloneField(selected) | |
72 | }); |
|
71 | }); | |
73 |
|
72 | |||
74 | var initialCommitData = { |
|
73 | var initialCommitData = { | |
75 | id: null, |
|
74 | id: null, | |
76 | text: 'tip', |
|
75 | text: 'tip', | |
77 | type: 'tag', |
|
76 | type: 'tag', | |
78 | raw_id: null, |
|
77 | raw_id: null, | |
79 | files_url: null |
|
78 | files_url: null | |
80 | }; |
|
79 | }; | |
81 |
|
80 | |||
82 | select2RefSwitcher('#download_options', initialCommitData); |
|
81 | select2RefSwitcher('#download_options', initialCommitData); | |
83 |
|
82 | |||
84 | // on change of download options |
|
83 | // on change of download options | |
85 | $('#download_options').on('change', function(e) { |
|
84 | $('#download_options').on('change', function(e) { | |
86 | // format of Object {text: "v0.0.3", type: "tag", id: "rev"} |
|
85 | // format of Object {text: "v0.0.3", type: "tag", id: "rev"} | |
87 | var ext = '.zip'; |
|
86 | var ext = '.zip'; | |
88 | var selected_cs = e.added; |
|
87 | var selected_cs = e.added; | |
89 | var fname = e.added.raw_id + ext; |
|
88 | var fname = e.added.raw_id + ext; | |
90 | var href = pyroutes.url('repo_archivefile', {'repo_name': templateContext.repo_name, 'fname':fname}); |
|
89 | var href = pyroutes.url('repo_archivefile', {'repo_name': templateContext.repo_name, 'fname':fname}); | |
91 | // set new label |
|
90 | // set new label | |
92 | $('#archive_link').html('<i class="icon-archive"></i> {0}{1}'.format(escapeHtml(e.added.text), ext)); |
|
91 | $('#archive_link').html('<i class="icon-archive"></i> {0}{1}'.format(escapeHtml(e.added.text), ext)); | |
93 |
|
92 | |||
94 | // set new url to button, |
|
93 | // set new url to button, | |
95 | $('#archive_link').attr('href', href) |
|
94 | $('#archive_link').attr('href', href) | |
96 | }); |
|
95 | }); | |
97 |
|
96 | |||
98 |
|
97 | |||
99 | // calculate size of repository |
|
98 | // calculate size of repository | |
100 | calculateSize = function () { |
|
99 | calculateSize = function () { | |
101 |
|
100 | |||
102 | var callback = function (data) { |
|
101 | var callback = function (data) { | |
103 | % if c.show_stats: |
|
102 | % if c.show_stats: | |
104 | showRepoStats('lang_stats', data); |
|
103 | showRepoStats('lang_stats', data); | |
105 | % endif |
|
104 | % endif | |
106 | }; |
|
105 | }; | |
107 |
|
106 | |||
108 | showRepoSize('repo_size_container', templateContext.repo_name, templateContext.repo_landing_commit, callback); |
|
107 | showRepoSize('repo_size_container', templateContext.repo_name, templateContext.repo_landing_commit, callback); | |
109 |
|
108 | |||
110 | } |
|
109 | } | |
111 |
|
110 | |||
112 | }) |
|
111 | }) | |
113 | </script> |
|
112 | </script> | |
114 |
|
113 | |||
115 | </%def> |
|
114 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now