Show More
@@ -736,6 +736,7 b' class _RepoChecker(object):' | |||||
736 | _type = repository |
|
736 | _type = repository | |
737 | return _type == self._backend_alias |
|
737 | return _type == self._backend_alias | |
738 |
|
738 | |||
|
739 | ||||
739 | is_git = _RepoChecker('git') |
|
740 | is_git = _RepoChecker('git') | |
740 | is_hg = _RepoChecker('hg') |
|
741 | is_hg = _RepoChecker('hg') | |
741 | is_svn = _RepoChecker('svn') |
|
742 | is_svn = _RepoChecker('svn') | |
@@ -743,7 +744,8 b" is_svn = _RepoChecker('svn')" | |||||
743 |
|
744 | |||
744 | def get_repo_type_by_name(repo_name): |
|
745 | def get_repo_type_by_name(repo_name): | |
745 | repo = Repository.get_by_repo_name(repo_name) |
|
746 | repo = Repository.get_by_repo_name(repo_name) | |
746 | return repo.repo_type |
|
747 | if repo: | |
|
748 | return repo.repo_type | |||
747 |
|
749 | |||
748 |
|
750 | |||
749 | def is_svn_without_proxy(repository): |
|
751 | def is_svn_without_proxy(repository): |
@@ -19,14 +19,15 b'' | |||||
19 | </tr> |
|
19 | </tr> | |
20 | %for entry in c.formatted_results: |
|
20 | %for entry in c.formatted_results: | |
21 | ## search results are additionally filtered, and this check is just a safe gate |
|
21 | ## search results are additionally filtered, and this check is just a safe gate | |
22 | % if h.HasRepoPermissionAny('repository.write','repository.read','repository.admin')(entry['repository'], 'search results commit check'): |
|
22 | % if c.rhodecode_user.is_admin or h.HasRepoPermissionAny('repository.write','repository.read','repository.admin')(entry['repository'], 'search results commit check'): | |
23 | <tr class="body"> |
|
23 | <tr class="body"> | |
24 | <td class="td-componentname"> |
|
24 | <td class="td-componentname"> | |
25 |
|
|
25 | <% repo_type = entry.get('repo_type') or h.get_repo_type_by_name(entry.get('repository')) %> | |
|
26 | %if repo_type == 'hg': | |||
26 | <i class="icon-hg"></i> |
|
27 | <i class="icon-hg"></i> | |
27 |
%elif |
|
28 | %elif repo_type == 'git': | |
28 | <i class="icon-git"></i> |
|
29 | <i class="icon-git"></i> | |
29 |
%elif |
|
30 | %elif repo_type == 'svn': | |
30 | <i class="icon-svn"></i> |
|
31 | <i class="icon-svn"></i> | |
31 | %endif |
|
32 | %endif | |
32 | ${h.link_to(entry['repository'], h.route_path('repo_summary',repo_name=entry['repository']))} |
|
33 | ${h.link_to(entry['repository'], h.route_path('repo_summary',repo_name=entry['repository']))} | |
@@ -77,13 +78,13 b'' | |||||
77 | var cid = target_expand.data('commit-id'); |
|
78 | var cid = target_expand.data('commit-id'); | |
78 |
|
79 | |||
79 | if (target_expand.hasClass('open')){ |
|
80 | if (target_expand.hasClass('open')){ | |
80 | $('#c-'+cid).css({'height': '1.5em', 'white-space': 'nowrap', 'text-overflow': 'ellipsis', 'overflow':'hidden'}) |
|
81 | $('#c-'+cid).css({'height': '1.5em', 'white-space': 'nowrap', 'text-overflow': 'ellipsis', 'overflow':'hidden'}); | |
81 | $('#t-'+cid).css({'height': 'auto', 'line-height': '.9em', 'text-overflow': 'ellipsis', 'overflow':'hidden'}) |
|
82 | $('#t-'+cid).css({'height': 'auto', 'line-height': '.9em', 'text-overflow': 'ellipsis', 'overflow':'hidden'}); | |
82 | target_expand.removeClass('open'); |
|
83 | target_expand.removeClass('open'); | |
83 | } |
|
84 | } | |
84 | else { |
|
85 | else { | |
85 | $('#c-'+cid).css({'height': 'auto', 'white-space': 'normal', 'text-overflow': 'initial', 'overflow':'visible'}) |
|
86 | $('#c-'+cid).css({'height': 'auto', 'white-space': 'normal', 'text-overflow': 'initial', 'overflow':'visible'}); | |
86 | $('#t-'+cid).css({'height': 'auto', 'max-height': 'none', 'text-overflow': 'initial', 'overflow':'visible'}) |
|
87 | $('#t-'+cid).css({'height': 'auto', 'max-height': 'none', 'text-overflow': 'initial', 'overflow':'visible'}); | |
87 | target_expand.addClass('open'); |
|
88 | target_expand.addClass('open'); | |
88 | } |
|
89 | } | |
89 | }); |
|
90 | }); |
@@ -56,15 +56,16 b'' | |||||
56 |
|
56 | |||
57 | %> |
|
57 | %> | |
58 | ## search results are additionally filtered, and this check is just a safe gate |
|
58 | ## search results are additionally filtered, and this check is just a safe gate | |
59 | % if h.HasRepoPermissionAny('repository.write','repository.read','repository.admin')(entry['repository'], 'search results content check'): |
|
59 | % if c.rhodecode_user.is_admin or h.HasRepoPermissionAny('repository.write','repository.read','repository.admin')(entry['repository'], 'search results content check'): | |
60 | <div id="codeblock" class="codeblock"> |
|
60 | <div id="codeblock" class="codeblock"> | |
61 | <div class="codeblock-header"> |
|
61 | <div class="codeblock-header"> | |
62 | <h1> |
|
62 | <h1> | |
63 |
|
|
63 | <% repo_type = entry.get('repo_type') or h.get_repo_type_by_name(entry.get('repository')) %> | |
|
64 | %if repo_type == 'hg': | |||
64 | <i class="icon-hg"></i> |
|
65 | <i class="icon-hg"></i> | |
65 |
%elif |
|
66 | %elif repo_type == 'git': | |
66 | <i class="icon-git"></i> |
|
67 | <i class="icon-git"></i> | |
67 |
%elif |
|
68 | %elif repo_type == 'svn': | |
68 | <i class="icon-svn"></i> |
|
69 | <i class="icon-svn"></i> | |
69 | %endif |
|
70 | %endif | |
70 | ${h.link_to(entry['repository'], h.route_path('repo_summary',repo_name=entry['repository']))} |
|
71 | ${h.link_to(entry['repository'], h.route_path('repo_summary',repo_name=entry['repository']))} |
@@ -9,14 +9,15 b'' | |||||
9 | </tr> |
|
9 | </tr> | |
10 | %for entry in c.formatted_results: |
|
10 | %for entry in c.formatted_results: | |
11 | ## search results are additionally filtered, and this check is just a safe gate |
|
11 | ## search results are additionally filtered, and this check is just a safe gate | |
12 | % if h.HasRepoPermissionAny('repository.write','repository.read','repository.admin')(entry['repository'], 'search results path check'): |
|
12 | % if c.rhodecode_user.is_admin or h.HasRepoPermissionAny('repository.write','repository.read','repository.admin')(entry['repository'], 'search results path check'): | |
13 | <tr class="body"> |
|
13 | <tr class="body"> | |
14 | <td class="td-componentname"> |
|
14 | <td class="td-componentname"> | |
15 |
|
|
15 | <% repo_type = entry.get('repo_type') or h.get_repo_type_by_name(entry.get('repository')) %> | |
|
16 | %if repo_type == 'hg': | |||
16 | <i class="icon-hg"></i> |
|
17 | <i class="icon-hg"></i> | |
17 |
%elif |
|
18 | %elif repo_type == 'git': | |
18 | <i class="icon-git"></i> |
|
19 | <i class="icon-git"></i> | |
19 |
%elif |
|
20 | %elif repo_type == 'svn': | |
20 | <i class="icon-svn"></i> |
|
21 | <i class="icon-svn"></i> | |
21 | %endif |
|
22 | %endif | |
22 | ${h.link_to(entry['repository'], h.route_path('repo_summary',repo_name=entry['repository']))} |
|
23 | ${h.link_to(entry['repository'], h.route_path('repo_summary',repo_name=entry['repository']))} |
General Comments 0
You need to be logged in to leave comments.
Login now