Show More
@@ -1,123 +1,123 b'' | |||||
1 |
|
1 | |||
2 | <div id="codeblock" class="browserblock"> |
|
2 | <div id="codeblock" class="browserblock"> | |
3 | <div class="browser-header"> |
|
3 | <div class="browser-header"> | |
4 | <div class="browser-nav"> |
|
4 | <div class="browser-nav"> | |
5 |
|
5 | |||
6 | <div class="info_box"> |
|
6 | <div class="info_box"> | |
7 |
|
7 | |||
8 | <div class="info_box_elem previous"> |
|
8 | <div class="info_box_elem previous"> | |
9 | <a id="prev_commit_link" data-commit-id="${c.prev_commit.raw_id}" class=" ${('disabled' if c.url_prev == '#' else '')}" href="${c.url_prev}" title="${_('Previous commit')}"><i class="icon-left"></i></a> |
|
9 | <a id="prev_commit_link" data-commit-id="${c.prev_commit.raw_id}" class=" ${('disabled' if c.url_prev == '#' else '')}" href="${c.url_prev}" title="${_('Previous commit')}"><i class="icon-left"></i></a> | |
10 | </div> |
|
10 | </div> | |
11 |
|
11 | |||
12 | ${h.hidden('refs_filter')} |
|
12 | ${h.hidden('refs_filter')} | |
13 |
|
13 | |||
14 | <div class="info_box_elem next"> |
|
14 | <div class="info_box_elem next"> | |
15 | <a id="next_commit_link" data-commit-id="${c.next_commit.raw_id}" class=" ${('disabled' if c.url_next == '#' else '')}" href="${c.url_next}" title="${_('Next commit')}"><i class="icon-right"></i></a> |
|
15 | <a id="next_commit_link" data-commit-id="${c.next_commit.raw_id}" class=" ${('disabled' if c.url_next == '#' else '')}" href="${c.url_next}" title="${_('Next commit')}"><i class="icon-right"></i></a> | |
16 | </div> |
|
16 | </div> | |
17 | </div> |
|
17 | </div> | |
18 |
|
18 | |||
19 | % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): |
|
19 | % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): | |
20 |
|
20 | |||
21 | <div class="new-file"> |
|
21 | <div class="new-file"> | |
22 | <div class="btn-group btn-group-actions"> |
|
22 | <div class="btn-group btn-group-actions"> | |
23 | <a class="btn btn-primary no-margin" href="${h.route_path('repo_files_add_file',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path)}"> |
|
23 | <a class="btn btn-primary no-margin" href="${h.route_path('repo_files_add_file',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path)}"> | |
24 | ${_('Add File')} |
|
24 | ${_('Add File')} | |
25 | </a> |
|
25 | </a> | |
26 |
|
26 | |||
27 | <a class="tooltip btn btn-primary btn-more-option" data-toggle="dropdown" aria-pressed="false" role="button" title="${_('more options')}"> |
|
27 | <a class="tooltip btn btn-primary btn-more-option" data-toggle="dropdown" aria-pressed="false" role="button" title="${_('more options')}"> | |
28 | <i class="icon-down"></i> |
|
28 | <i class="icon-down"></i> | |
29 | </a> |
|
29 | </a> | |
30 |
|
30 | |||
31 | <div class="btn-action-switcher-container right-align"> |
|
31 | <div class="btn-action-switcher-container right-align"> | |
32 | <ul class="btn-action-switcher" role="menu" style="min-width: 200px; width: max-content"> |
|
32 | <ul class="btn-action-switcher" role="menu" style="min-width: 200px; width: max-content"> | |
33 | <li> |
|
33 | <li> | |
34 | <a class="action_button" href="${h.route_path('repo_files_upload_file',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path)}"> |
|
34 | <a class="action_button" href="${h.route_path('repo_files_upload_file',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path)}"> | |
35 | <i class="icon-upload"></i> |
|
35 | <i class="icon-upload"></i> | |
36 | ${_('Upload File')} |
|
36 | ${_('Upload File')} | |
37 | </a> |
|
37 | </a> | |
38 | </li> |
|
38 | </li> | |
39 | </ul> |
|
39 | </ul> | |
40 | </div> |
|
40 | </div> | |
41 | </div> |
|
41 | </div> | |
42 | </div> |
|
42 | </div> | |
43 |
|
43 | |||
44 | % endif |
|
44 | % endif | |
45 |
|
45 | |||
46 | % if c.enable_downloads: |
|
46 | % if c.enable_downloads: | |
47 | <% |
|
47 | <% | |
48 | at_path = '{}'.format(request.GET.get('at') or c.commit.raw_id[:6]) |
|
48 | at_path = '{}'.format(request.GET.get('at') or c.commit.raw_id[:6]) | |
49 | if c.f_path == '/': |
|
49 | if c.f_path == '/': | |
50 | label = _('Full tree as {}') |
|
50 | label = _('Full tree as {}') | |
51 | _query = {'with_hash': '1'} |
|
51 | _query = {'with_hash': '1'} | |
52 | else: |
|
52 | else: | |
53 | label = _('This tree as {}') |
|
53 | label = _('This tree as {}') | |
54 | _query = {'at_path':c.f_path, 'with_hash': '1'} |
|
54 | _query = {'at_path':c.f_path, 'with_hash': '1'} | |
55 | %> |
|
55 | %> | |
56 |
|
56 | |||
57 | <div class="btn-group btn-group-actions new-file"> |
|
57 | <div class="btn-group btn-group-actions new-file"> | |
58 | <a class="archive_link btn btn-default" data-ext=".zip" href="${h.route_path('repo_archivefile',repo_name=c.rhodecode_db_repo.repo_name, fname='{}{}'.format(c.commit.raw_id, '.zip'), _query=_query)}"> |
|
58 | <a class="archive_link btn btn-default" data-ext=".zip" href="${h.route_path('repo_archivefile',repo_name=c.rhodecode_db_repo.repo_name, fname='{}{}'.format(c.commit.raw_id, '.zip'), _query=_query)}" rel="nofollow"> | |
59 | <i class="icon-download"></i> |
|
59 | <i class="icon-download"></i> | |
60 | ${label.format('.zip')} |
|
60 | ${label.format('.zip')} | |
61 | </a> |
|
61 | </a> | |
62 |
|
62 | |||
63 | <a class="tooltip btn btn-default btn-more-option" data-toggle="dropdown" aria-pressed="false" role="button" title="${_('more download options')}"> |
|
63 | <a class="tooltip btn btn-default btn-more-option" data-toggle="dropdown" aria-pressed="false" role="button" title="${_('more download options')}"> | |
64 | <i class="icon-down"></i> |
|
64 | <i class="icon-down"></i> | |
65 | </a> |
|
65 | </a> | |
66 |
|
66 | |||
67 | <div class="btn-action-switcher-container left-align"> |
|
67 | <div class="btn-action-switcher-container left-align"> | |
68 | <ul class="btn-action-switcher" role="menu" style="min-width: 200px; width: max-content"> |
|
68 | <ul class="btn-action-switcher" role="menu" style="min-width: 200px; width: max-content"> | |
69 | % for a_type, content_type, extension in h.ARCHIVE_SPECS: |
|
69 | % for a_type, content_type, extension in h.ARCHIVE_SPECS: | |
70 | % if extension not in ['.zip']: |
|
70 | % if extension not in ['.zip']: | |
71 | <li> |
|
71 | <li> | |
72 | <a class="archive_link" data-ext="${extension}" href="${h.route_path('repo_archivefile',repo_name=c.rhodecode_db_repo.repo_name, fname='{}{}'.format(c.commit.raw_id, extension), _query=_query)}"> |
|
72 | <a class="archive_link" data-ext="${extension}" href="${h.route_path('repo_archivefile',repo_name=c.rhodecode_db_repo.repo_name, fname='{}{}'.format(c.commit.raw_id, extension), _query=_query)}" rel="nofollow"> | |
73 | <i class="icon-download"></i> |
|
73 | <i class="icon-download"></i> | |
74 | ${label.format(extension)} |
|
74 | ${label.format(extension)} | |
75 | </a> |
|
75 | </a> | |
76 | </li> |
|
76 | </li> | |
77 | % endif |
|
77 | % endif | |
78 | % endfor |
|
78 | % endfor | |
79 | </ul> |
|
79 | </ul> | |
80 | </div> |
|
80 | </div> | |
81 | </div> |
|
81 | </div> | |
82 | % endif |
|
82 | % endif | |
83 |
|
83 | |||
84 | <div class="files-quick-filter"> |
|
84 | <div class="files-quick-filter"> | |
85 | <ul class="files-filter-box"> |
|
85 | <ul class="files-filter-box"> | |
86 | <li class="files-filter-box-path"> |
|
86 | <li class="files-filter-box-path"> | |
87 | <i class="icon-search"></i> |
|
87 | <i class="icon-search"></i> | |
88 | </li> |
|
88 | </li> | |
89 | <li class="files-filter-box-input"> |
|
89 | <li class="files-filter-box-input"> | |
90 | <input onkeydown="NodeFilter.initFilter(event)" class="init" type="text" placeholder="Quick filter" name="filter" size="25" id="node_filter" autocomplete="off"> |
|
90 | <input onkeydown="NodeFilter.initFilter(event)" class="init" type="text" placeholder="Quick filter" name="filter" size="25" id="node_filter" autocomplete="off"> | |
91 | </li> |
|
91 | </li> | |
92 | </ul> |
|
92 | </ul> | |
93 | </div> |
|
93 | </div> | |
94 | </div> |
|
94 | </div> | |
95 |
|
95 | |||
96 | </div> |
|
96 | </div> | |
97 |
|
97 | |||
98 | ## file tree is computed from caches, and filled in |
|
98 | ## file tree is computed from caches, and filled in | |
99 | <div id="file-tree"> |
|
99 | <div id="file-tree"> | |
100 | ${c.file_tree |n} |
|
100 | ${c.file_tree |n} | |
101 | </div> |
|
101 | </div> | |
102 |
|
102 | |||
103 | %if c.readme_data: |
|
103 | %if c.readme_data: | |
104 | <div id="readme" class="anchor"> |
|
104 | <div id="readme" class="anchor"> | |
105 | <div class="box"> |
|
105 | <div class="box"> | |
106 | <div class="readme-title" title="${h.tooltip(_('Readme file from commit %s:%s') % (c.rhodecode_db_repo.landing_ref_type, c.rhodecode_db_repo.landing_ref_name))}"> |
|
106 | <div class="readme-title" title="${h.tooltip(_('Readme file from commit %s:%s') % (c.rhodecode_db_repo.landing_ref_type, c.rhodecode_db_repo.landing_ref_name))}"> | |
107 | <div> |
|
107 | <div> | |
108 | <i class="icon-file-text"></i> |
|
108 | <i class="icon-file-text"></i> | |
109 | <a href="${h.route_path('repo_files',repo_name=c.repo_name,commit_id=c.rhodecode_db_repo.landing_ref_name,f_path=c.readme_file)}"> |
|
109 | <a href="${h.route_path('repo_files',repo_name=c.repo_name,commit_id=c.rhodecode_db_repo.landing_ref_name,f_path=c.readme_file)}"> | |
110 | ${c.readme_file} |
|
110 | ${c.readme_file} | |
111 | </a> |
|
111 | </a> | |
112 | </div> |
|
112 | </div> | |
113 | </div> |
|
113 | </div> | |
114 | <div class="readme codeblock"> |
|
114 | <div class="readme codeblock"> | |
115 | <div class="readme_box"> |
|
115 | <div class="readme_box"> | |
116 | ${c.readme_data|n} |
|
116 | ${c.readme_data|n} | |
117 | </div> |
|
117 | </div> | |
118 | </div> |
|
118 | </div> | |
119 | </div> |
|
119 | </div> | |
120 | </div> |
|
120 | </div> | |
121 | %endif |
|
121 | %endif | |
122 |
|
122 | |||
123 | </div> |
|
123 | </div> |
@@ -1,282 +1,282 b'' | |||||
1 | <%namespace name="base" file="/base/base.mako"/> |
|
1 | <%namespace name="base" file="/base/base.mako"/> | |
2 |
|
2 | |||
3 | <%def name="refs_counters(branches, closed_branches, tags, bookmarks)"> |
|
3 | <%def name="refs_counters(branches, closed_branches, tags, bookmarks)"> | |
4 | <span class="summary-branchtag summary-tag"> |
|
4 | <span class="summary-branchtag summary-tag"> | |
5 | <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"> | |
6 | <i class="icon-branch"></i> |
|
6 | <i class="icon-branch"></i> | |
7 | % if len(branches) == 1: |
|
7 | % if len(branches) == 1: | |
8 | <span>${len(branches)}</span> ${_('Branch')} |
|
8 | <span>${len(branches)}</span> ${_('Branch')} | |
9 | % else: |
|
9 | % else: | |
10 | <span>${len(branches)}</span> ${_('Branches')} |
|
10 | <span>${len(branches)}</span> ${_('Branches')} | |
11 | % endif |
|
11 | % endif | |
12 | </a> |
|
12 | </a> | |
13 | </span> |
|
13 | </span> | |
14 |
|
14 | |||
15 | %if closed_branches: |
|
15 | %if closed_branches: | |
16 | <span class="summary-branchtag summary-tag"> |
|
16 | <span class="summary-branchtag summary-tag"> | |
17 | <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"> | |
18 | <i class="icon-branch"></i> |
|
18 | <i class="icon-branch"></i> | |
19 | % if len(closed_branches) == 1: |
|
19 | % if len(closed_branches) == 1: | |
20 | <span>${len(closed_branches)}</span> ${_('Closed Branch')} |
|
20 | <span>${len(closed_branches)}</span> ${_('Closed Branch')} | |
21 | % else: |
|
21 | % else: | |
22 | <span>${len(closed_branches)}</span> ${_('Closed Branches')} |
|
22 | <span>${len(closed_branches)}</span> ${_('Closed Branches')} | |
23 | % endif |
|
23 | % endif | |
24 | </a> |
|
24 | </a> | |
25 | </span> |
|
25 | </span> | |
26 | %endif |
|
26 | %endif | |
27 |
|
27 | |||
28 | <span class="summary-tagtag summary-tag"> |
|
28 | <span class="summary-tagtag summary-tag"> | |
29 | <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"> | |
30 | <i class="icon-tag"></i> |
|
30 | <i class="icon-tag"></i> | |
31 | % if len(tags) == 1: |
|
31 | % if len(tags) == 1: | |
32 | <span>${len(tags)}</span> ${_('Tag')} |
|
32 | <span>${len(tags)}</span> ${_('Tag')} | |
33 | % else: |
|
33 | % else: | |
34 | <span>${len(tags)}</span> ${_('Tags')} |
|
34 | <span>${len(tags)}</span> ${_('Tags')} | |
35 | % endif |
|
35 | % endif | |
36 | </a> |
|
36 | </a> | |
37 | </span> |
|
37 | </span> | |
38 |
|
38 | |||
39 | %if bookmarks: |
|
39 | %if bookmarks: | |
40 | <span class="summary-booktag summary-tag"> |
|
40 | <span class="summary-booktag summary-tag"> | |
41 | <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"> | |
42 | <i class="icon-bookmark"></i> |
|
42 | <i class="icon-bookmark"></i> | |
43 | % if len(bookmarks) == 1: |
|
43 | % if len(bookmarks) == 1: | |
44 | <span>${len(bookmarks)}</span> ${_('Bookmark')} |
|
44 | <span>${len(bookmarks)}</span> ${_('Bookmark')} | |
45 | % else: |
|
45 | % else: | |
46 | <span>${len(bookmarks)}</span> ${_('Bookmarks')} |
|
46 | <span>${len(bookmarks)}</span> ${_('Bookmarks')} | |
47 | % endif |
|
47 | % endif | |
48 | </a> |
|
48 | </a> | |
49 | </span> |
|
49 | </span> | |
50 | %endif |
|
50 | %endif | |
51 | </%def> |
|
51 | </%def> | |
52 |
|
52 | |||
53 | <%def name="summary_detail(breadcrumbs_links, show_downloads=True, simplified=False)"> |
|
53 | <%def name="summary_detail(breadcrumbs_links, show_downloads=True, simplified=False)"> | |
54 | <% summary = lambda n:{False:'summary-short'}.get(n) %> |
|
54 | <% summary = lambda n:{False:'summary-short'}.get(n) %> | |
55 |
|
55 | |||
56 | <div id="summary-menu-stats" class="summary-detail"> |
|
56 | <div id="summary-menu-stats" class="summary-detail"> | |
57 | <div class="fieldset"> |
|
57 | <div class="fieldset"> | |
58 | <div class="left-content"> |
|
58 | <div class="left-content"> | |
59 | <div class="left-clone"> |
|
59 | <div class="left-clone"> | |
60 | <select id="clone_option" name="clone_option"> |
|
60 | <select id="clone_option" name="clone_option"> | |
61 | <option value="http" selected="selected">HTTP</option> |
|
61 | <option value="http" selected="selected">HTTP</option> | |
62 | <option value="http_id">HTTP UID</option> |
|
62 | <option value="http_id">HTTP UID</option> | |
63 | % if c.ssh_enabled: |
|
63 | % if c.ssh_enabled: | |
64 | <option value="ssh">SSH</option> |
|
64 | <option value="ssh">SSH</option> | |
65 | % endif |
|
65 | % endif | |
66 | </select> |
|
66 | </select> | |
67 | </div> |
|
67 | </div> | |
68 |
|
68 | |||
69 | <div class="right-clone"> |
|
69 | <div class="right-clone"> | |
70 | <% |
|
70 | <% | |
71 | maybe_disabled = '' |
|
71 | maybe_disabled = '' | |
72 | if h.is_svn_without_proxy(c.rhodecode_db_repo): |
|
72 | if h.is_svn_without_proxy(c.rhodecode_db_repo): | |
73 | maybe_disabled = 'disabled' |
|
73 | maybe_disabled = 'disabled' | |
74 | %> |
|
74 | %> | |
75 |
|
75 | |||
76 | <span id="clone_option_http"> |
|
76 | <span id="clone_option_http"> | |
77 | <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}"/> | |
78 | <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> | |
79 | </span> |
|
79 | </span> | |
80 |
|
80 | |||
81 | <span style="display: none;" id="clone_option_http_id"> |
|
81 | <span style="display: none;" id="clone_option_http_id"> | |
82 | <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}"/> | |
83 | <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> | |
84 | </span> |
|
84 | </span> | |
85 |
|
85 | |||
86 | <span style="display: none;" id="clone_option_ssh"> |
|
86 | <span style="display: none;" id="clone_option_ssh"> | |
87 | <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}"/> | |
88 | <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> | |
89 | </span> |
|
89 | </span> | |
90 |
|
90 | |||
91 | % if maybe_disabled: |
|
91 | % if maybe_disabled: | |
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> |
|
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 | % endif |
|
93 | % endif | |
94 | </div> |
|
94 | </div> | |
95 | </div> |
|
95 | </div> | |
96 |
|
96 | |||
97 | <div class="right-content"> |
|
97 | <div class="right-content"> | |
98 | <div class="commit-info"> |
|
98 | <div class="commit-info"> | |
99 | <div class="tags"> |
|
99 | <div class="tags"> | |
100 | <% commit_rev = h.safe_int(c.rhodecode_db_repo.changeset_cache.get('revision'), 0) + 1 %> |
|
100 | <% commit_rev = h.safe_int(c.rhodecode_db_repo.changeset_cache.get('revision'), 0) + 1 %> | |
101 | % if c.rhodecode_repo: |
|
101 | % if c.rhodecode_repo: | |
102 | ${refs_counters( |
|
102 | ${refs_counters( | |
103 | c.rhodecode_repo.branches, |
|
103 | c.rhodecode_repo.branches, | |
104 | c.rhodecode_repo.branches_closed, |
|
104 | c.rhodecode_repo.branches_closed, | |
105 | c.rhodecode_repo.tags, |
|
105 | c.rhodecode_repo.tags, | |
106 | c.rhodecode_repo.bookmarks)} |
|
106 | c.rhodecode_repo.bookmarks)} | |
107 | % else: |
|
107 | % else: | |
108 | ## missing requirements can make c.rhodecode_repo None |
|
108 | ## missing requirements can make c.rhodecode_repo None | |
109 | ${refs_counters([], [], [], [])} |
|
109 | ${refs_counters([], [], [], [])} | |
110 | % endif |
|
110 | % endif | |
111 |
|
111 | |||
112 | ## commits |
|
112 | ## commits | |
113 | <span class="summary-tag"> |
|
113 | <span class="summary-tag"> | |
114 | % if commit_rev == -1: |
|
114 | % if commit_rev == -1: | |
115 | <i class="icon-history"></i> |
|
115 | <i class="icon-history"></i> | |
116 | % if commit_rev == -1: |
|
116 | % if commit_rev == -1: | |
117 | <span>0</span> ${_('Commit')} |
|
117 | <span>0</span> ${_('Commit')} | |
118 | % else: |
|
118 | % else: | |
119 | <span>0</span> ${_('Commits')} |
|
119 | <span>0</span> ${_('Commits')} | |
120 | % endif |
|
120 | % endif | |
121 | % else: |
|
121 | % else: | |
122 | <a href="${h.route_path('repo_commits', repo_name=c.repo_name)}"> |
|
122 | <a href="${h.route_path('repo_commits', repo_name=c.repo_name)}"> | |
123 | <i class="icon-history"></i> |
|
123 | <i class="icon-history"></i> | |
124 | % if commit_rev == 1: |
|
124 | % if commit_rev == 1: | |
125 | <span>${commit_rev}</span> ${_('Commit')} |
|
125 | <span>${commit_rev}</span> ${_('Commit')} | |
126 | % else: |
|
126 | % else: | |
127 | <span>${commit_rev}</span> ${_('Commits')} |
|
127 | <span>${commit_rev}</span> ${_('Commits')} | |
128 | % endif |
|
128 | % endif | |
129 | </a> |
|
129 | </a> | |
130 | % endif |
|
130 | % endif | |
131 | </span> |
|
131 | </span> | |
132 |
|
132 | |||
133 | ## forks |
|
133 | ## forks | |
134 | <span class="summary-tag"> |
|
134 | <span class="summary-tag"> | |
135 | <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)}"> | |
136 | <i class="icon-code-fork"></i> |
|
136 | <i class="icon-code-fork"></i> | |
137 | <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> | |
138 | </span> |
|
138 | </span> | |
139 | </div> |
|
139 | </div> | |
140 | </div> |
|
140 | </div> | |
141 | </div> |
|
141 | </div> | |
142 | </div> |
|
142 | </div> | |
143 |
|
143 | |||
144 | % if not simplified: |
|
144 | % if not simplified: | |
145 | ## owner, description, downloads, statistics |
|
145 | ## owner, description, downloads, statistics | |
146 |
|
146 | |||
147 | ## Owner |
|
147 | ## Owner | |
148 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
148 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> | |
149 | <div class="left-label-summary"> |
|
149 | <div class="left-label-summary"> | |
150 | <p>${_('Owner')}</p> |
|
150 | <p>${_('Owner')}</p> | |
151 | <div class="right-label-summary"> |
|
151 | <div class="right-label-summary"> | |
152 | ${base.gravatar_with_user(c.rhodecode_db_repo.user.email, 16, tooltip=True)} |
|
152 | ${base.gravatar_with_user(c.rhodecode_db_repo.user.email, 16, tooltip=True)} | |
153 | </div> |
|
153 | </div> | |
154 |
|
154 | |||
155 | </div> |
|
155 | </div> | |
156 | </div> |
|
156 | </div> | |
157 |
|
157 | |||
158 | ## Description |
|
158 | ## Description | |
159 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
159 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> | |
160 | <div class="left-label-summary"> |
|
160 | <div class="left-label-summary"> | |
161 | <p>${_('Description')}</p> |
|
161 | <p>${_('Description')}</p> | |
162 |
|
162 | |||
163 | <div class="right-label-summary input ${summary(c.show_stats)}"> |
|
163 | <div class="right-label-summary input ${summary(c.show_stats)}"> | |
164 | <%namespace name="dt" file="/data_table/_dt_elements.mako"/> |
|
164 | <%namespace name="dt" file="/data_table/_dt_elements.mako"/> | |
165 | ${dt.repo_desc(c.rhodecode_db_repo.description_safe, c.visual.stylify_metatags)} |
|
165 | ${dt.repo_desc(c.rhodecode_db_repo.description_safe, c.visual.stylify_metatags)} | |
166 | </div> |
|
166 | </div> | |
167 | </div> |
|
167 | </div> | |
168 | </div> |
|
168 | </div> | |
169 |
|
169 | |||
170 | ## Downloads |
|
170 | ## Downloads | |
171 | % if show_downloads: |
|
171 | % if show_downloads: | |
172 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
172 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> | |
173 | <div class="left-label-summary"> |
|
173 | <div class="left-label-summary"> | |
174 | <p>${_('Downloads')}</p> |
|
174 | <p>${_('Downloads')}</p> | |
175 |
|
175 | |||
176 | <div class="right-label-summary input ${summary(c.show_stats)} downloads"> |
|
176 | <div class="right-label-summary input ${summary(c.show_stats)} downloads"> | |
177 | % if c.rhodecode_repo and len(c.rhodecode_repo.commit_ids) == 0: |
|
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 c.is_super_admin: |
|
185 | % if c.is_super_admin: | |
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 | <div class="enabled pull-left" style="margin-right: 10px"> |
|
189 | <div class="enabled pull-left" style="margin-right: 10px"> | |
190 |
|
190 | |||
191 | <div class="btn-group btn-group-actions"> |
|
191 | <div class="btn-group btn-group-actions"> | |
192 | <a class="archive_link btn btn-small" data-ext=".zip" href="${h.route_path('repo_archivefile',repo_name=c.rhodecode_db_repo.repo_name, fname=c.rhodecode_db_repo.landing_ref_name+'.zip', _query={'with_hash': '1'})}"> |
|
192 | <a class="archive_link btn btn-small" data-ext=".zip" href="${h.route_path('repo_archivefile',repo_name=c.rhodecode_db_repo.repo_name, fname=c.rhodecode_db_repo.landing_ref_name+'.zip', _query={'with_hash': '1'})}" rel="nofollow"> | |
193 | <i class="icon-download"></i> |
|
193 | <i class="icon-download"></i> | |
194 | ${c.rhodecode_db_repo.landing_ref_name}.zip |
|
194 | ${c.rhodecode_db_repo.landing_ref_name}.zip | |
195 | ## replaced by some JS on select |
|
195 | ## replaced by some JS on select | |
196 | </a> |
|
196 | </a> | |
197 |
|
197 | |||
198 | <a class="tooltip btn btn-primary btn-more-option" data-toggle="dropdown" aria-pressed="false" role="button" title="${_('more download options')}"> |
|
198 | <a class="tooltip btn btn-primary btn-more-option" data-toggle="dropdown" aria-pressed="false" role="button" title="${_('more download options')}"> | |
199 | <i class="icon-down"></i> |
|
199 | <i class="icon-down"></i> | |
200 | </a> |
|
200 | </a> | |
201 |
|
201 | |||
202 | <div class="btn-action-switcher-container left-align"> |
|
202 | <div class="btn-action-switcher-container left-align"> | |
203 | <ul class="btn-action-switcher" role="menu" style="min-width: 200px; width: max-content"> |
|
203 | <ul class="btn-action-switcher" role="menu" style="min-width: 200px; width: max-content"> | |
204 | % for a_type, content_type, extension in h.ARCHIVE_SPECS: |
|
204 | % for a_type, content_type, extension in h.ARCHIVE_SPECS: | |
205 | % if extension not in ['.zip']: |
|
205 | % if extension not in ['.zip']: | |
206 | <li> |
|
206 | <li> | |
207 | <a class="archive_link" data-ext="${extension}" href="${h.route_path('repo_archivefile',repo_name=c.rhodecode_db_repo.repo_name, fname=c.rhodecode_db_repo.landing_ref_name+extension, _query={'with_hash': '1'})}"> |
|
207 | <a class="archive_link" data-ext="${extension}" href="${h.route_path('repo_archivefile',repo_name=c.rhodecode_db_repo.repo_name, fname=c.rhodecode_db_repo.landing_ref_name+extension, _query={'with_hash': '1'})}" rel="nofollow"> | |
208 | <i class="icon-download"></i> |
|
208 | <i class="icon-download"></i> | |
209 | ${c.rhodecode_db_repo.landing_ref_name+extension} |
|
209 | ${c.rhodecode_db_repo.landing_ref_name+extension} | |
210 | </a> |
|
210 | </a> | |
211 | </li> |
|
211 | </li> | |
212 | % endif |
|
212 | % endif | |
213 | % endfor |
|
213 | % endfor | |
214 | </ul> |
|
214 | </ul> | |
215 | </div> |
|
215 | </div> | |
216 | </div> |
|
216 | </div> | |
217 |
|
217 | |||
218 | </div> |
|
218 | </div> | |
219 | ${h.hidden('download_options')} |
|
219 | ${h.hidden('download_options')} | |
220 | % endif |
|
220 | % endif | |
221 | </div> |
|
221 | </div> | |
222 | </div> |
|
222 | </div> | |
223 | </div> |
|
223 | </div> | |
224 | % endif |
|
224 | % endif | |
225 |
|
225 | |||
226 | ## Repo size |
|
226 | ## Repo size | |
227 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
227 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> | |
228 | <div class="left-label-summary"> |
|
228 | <div class="left-label-summary"> | |
229 | <p>${_('Repository size')}</p> |
|
229 | <p>${_('Repository size')}</p> | |
230 |
|
230 | |||
231 | <div class="right-label-summary"> |
|
231 | <div class="right-label-summary"> | |
232 | <div class="tags"> |
|
232 | <div class="tags"> | |
233 | ## repo size |
|
233 | ## repo size | |
234 | % if commit_rev == -1: |
|
234 | % if commit_rev == -1: | |
235 | <span class="stats-bullet">0 B</span> |
|
235 | <span class="stats-bullet">0 B</span> | |
236 | % else: |
|
236 | % else: | |
237 | <span> |
|
237 | <span> | |
238 | <a href="#showSize" onclick="calculateSize(); $(this).hide(); return false" id="show-repo-size">Show repository size</a> |
|
238 | <a href="#showSize" onclick="calculateSize(); $(this).hide(); return false" id="show-repo-size">Show repository size</a> | |
239 | </span> |
|
239 | </span> | |
240 | <span class="stats-bullet" id="repo_size_container" style="display:none"> |
|
240 | <span class="stats-bullet" id="repo_size_container" style="display:none"> | |
241 | ${_('Calculating Repository Size...')} |
|
241 | ${_('Calculating Repository Size...')} | |
242 | </span> |
|
242 | </span> | |
243 | % endif |
|
243 | % endif | |
244 | </div> |
|
244 | </div> | |
245 | </div> |
|
245 | </div> | |
246 | </div> |
|
246 | </div> | |
247 | </div> |
|
247 | </div> | |
248 |
|
248 | |||
249 | ## Statistics |
|
249 | ## Statistics | |
250 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
250 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> | |
251 | <div class="left-label-summary"> |
|
251 | <div class="left-label-summary"> | |
252 | <p>${_('Code Statistics')}</p> |
|
252 | <p>${_('Code Statistics')}</p> | |
253 |
|
253 | |||
254 | <div class="right-label-summary input ${summary(c.show_stats)} statistics"> |
|
254 | <div class="right-label-summary input ${summary(c.show_stats)} statistics"> | |
255 | % if c.show_stats: |
|
255 | % if c.show_stats: | |
256 | <div id="lang_stats" class="enabled"> |
|
256 | <div id="lang_stats" class="enabled"> | |
257 | <a href="#showSize" onclick="calculateSize(); $('#show-repo-size').hide(); $(this).hide(); return false" id="show-repo-size">Show code statistics</a> |
|
257 | <a href="#showSize" onclick="calculateSize(); $('#show-repo-size').hide(); $(this).hide(); return false" id="show-repo-size">Show code statistics</a> | |
258 | </div> |
|
258 | </div> | |
259 | % else: |
|
259 | % else: | |
260 | <span class="disabled"> |
|
260 | <span class="disabled"> | |
261 | ${_('Statistics are disabled for this repository')}. |
|
261 | ${_('Statistics are disabled for this repository')}. | |
262 | </span> |
|
262 | </span> | |
263 | % if c.is_super_admin: |
|
263 | % if c.is_super_admin: | |
264 | ${h.link_to(_('Enable statistics'),h.route_path('edit_repo',repo_name=c.repo_name, _anchor='repo_enable_statistics'))} |
|
264 | ${h.link_to(_('Enable statistics'),h.route_path('edit_repo',repo_name=c.repo_name, _anchor='repo_enable_statistics'))} | |
265 | % endif |
|
265 | % endif | |
266 | % endif |
|
266 | % endif | |
267 | </div> |
|
267 | </div> | |
268 |
|
268 | |||
269 | </div> |
|
269 | </div> | |
270 | </div> |
|
270 | </div> | |
271 | % endif |
|
271 | % endif | |
272 |
|
272 | |||
273 | </div><!--end summary-detail--> |
|
273 | </div><!--end summary-detail--> | |
274 |
|
274 | |||
275 | % if simplified: |
|
275 | % if simplified: | |
276 | <div style="height: 25px"></div> |
|
276 | <div style="height: 25px"></div> | |
277 | %else: |
|
277 | %else: | |
278 | <div id="summary_details_expand" class="btn-collapse" data-toggle="summary-details"> |
|
278 | <div id="summary_details_expand" class="btn-collapse" data-toggle="summary-details"> | |
279 | ${_('Show More')} |
|
279 | ${_('Show More')} | |
280 | </div> |
|
280 | </div> | |
281 | % endif |
|
281 | % endif | |
282 | </%def> |
|
282 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now