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