Show More
@@ -917,7 +917,7 b' def changed_tooltip(nodes):' | |||
|
917 | 917 | return ': ' + _('No Files') |
|
918 | 918 | |
|
919 | 919 | |
|
920 |
def repo_link(groups_and_repos |
|
|
920 | def repo_link(groups_and_repos): | |
|
921 | 921 | """ |
|
922 | 922 | Makes a breadcrumbs link to repo within a group |
|
923 | 923 | joins » on each group to create a fancy link |
@@ -928,18 +928,14 b' def repo_link(groups_and_repos, last_url' | |||
|
928 | 928 | :param groups_and_repos: |
|
929 | 929 | :param last_url: |
|
930 | 930 | """ |
|
931 | groups, repo_name = groups_and_repos | |
|
932 | last_link = link_to(repo_name, last_url) if last_url else repo_name | |
|
931 | groups, just_name, repo_name = groups_and_repos | |
|
932 | last_url = url('summary_home', repo_name=repo_name) | |
|
933 | last_link = link_to(just_name, last_url) | |
|
933 | 934 | |
|
934 |
|
|
|
935 | if last_url: | |
|
936 | return literal('<span>%s</span>' % last_link) | |
|
937 | return literal('<span>%s</span>' % repo_name) | |
|
938 | else: | |
|
939 | def make_link(group): | |
|
940 | return link_to(group.name, | |
|
941 | url('repos_group_home', group_name=group.group_name)) | |
|
942 | return literal(' » '.join(map(make_link, groups) + ['<span>' + last_link + '</span>'])) | |
|
935 | def make_link(group): | |
|
936 | return link_to(group.name, | |
|
937 | url('repos_group_home', group_name=group.group_name)) | |
|
938 | return literal(' » '.join(map(make_link, groups) + ['<span>%s</span>' % last_link])) | |
|
943 | 939 | |
|
944 | 940 | |
|
945 | 941 | def fancy_file_stats(stats): |
@@ -887,7 +887,7 b' class Repository(Base, BaseModel):' | |||
|
887 | 887 | |
|
888 | 888 | @property |
|
889 | 889 | def groups_and_repo(self): |
|
890 | return self.groups_with_parents, self.just_name | |
|
890 | return self.groups_with_parents, self.just_name, self.repo_name | |
|
891 | 891 | |
|
892 | 892 | @LazyProperty |
|
893 | 893 | def repo_path(self): |
@@ -240,7 +240,7 b' class RepoModel(BaseModel):' | |||
|
240 | 240 | return None |
|
241 | 241 | |
|
242 | 242 | defaults = repo_info.get_dict() |
|
243 | group, repo_name = repo_info.groups_and_repo | |
|
243 | group, repo_name, repo_name_full = repo_info.groups_and_repo | |
|
244 | 244 | defaults['repo_name'] = repo_name |
|
245 | 245 | defaults['repo_group'] = getattr(group[-1] if group else None, |
|
246 | 246 | 'group_id', None) |
@@ -106,7 +106,7 b'' | |||
|
106 | 106 | <div id="context-top"> |
|
107 | 107 | <div id="breadcrumbs"> |
|
108 | 108 | ${h.link_to(_(u'Repositories'),h.url('home'))} |
|
109 |
|
|
|
109 | » | |
|
110 | 110 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} |
|
111 | 111 | </div> |
|
112 | 112 | ## TODO: this check feels wrong, it would be better to have a check for permissions |
General Comments 0
You need to be logged in to leave comments.
Login now