forked from forgejo/forgejo
# Summary The repo information such as description, stats and topics are getting displayed in the top-bar when viewing a file. This has been fixed to display the repo information only while navigating the repo and not while viewing or blaming a file from the repo ## Before fix Screenshot from the issue  ## After the fix - **Repo homepage** The repo description, topics and summary will be displayed  - **When opening a file** The repo description, topic and summary has been conditionally hidden from the view <img width="1311" alt="image" src="https://user-images.githubusercontent.com/47709856/195278964-9479231c-62ad-4c0e-b438-2018f22289db.png"> - **When running blame on a file** > This was originally not part of the issue #21406. However the fix seems relevant for the blame view as well. <img width="1312" alt="image" src="https://user-images.githubusercontent.com/47709856/195279619-02010775-aec3-4c8d-a184-d2d838c797e8.png"> - **From within a directory** The repo description, topics and summary will not be displayed  Supporting integration tests have also been added.
This commit is contained in:
parent
cda2c38f4a
commit
c35531dd11
4 changed files with 83 additions and 2 deletions
|
@ -3,6 +3,7 @@
|
|||
{{template "repo/header" .}}
|
||||
<div class="ui container {{if .IsBlame}}fluid padded{{end}}">
|
||||
{{template "base/alert" .}}
|
||||
{{if and (not .HideRepoInfo) (not .IsBlame)}}
|
||||
<div class="ui repo-description">
|
||||
<div id="repo-desc">
|
||||
{{$description := .Repository.DescriptionHTML $.Context}}
|
||||
|
@ -31,6 +32,7 @@
|
|||
{{range .Topics}}<a class="ui repo-topic large label topic" href="{{AppSubUrl}}/explore/repos?q={{.Name}}&topic=1">{{.Name}}</a>{{end}}
|
||||
{{if and .Permission.IsAdmin (not .Repository.IsArchived)}}<a id="manage_topic" class="muted">{{.locale.Tr "repo.topic.manage_topics"}}</a>{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{if and .Permission.IsAdmin (not .Repository.IsArchived)}}
|
||||
<div class="ui repo-topic-edit grid form" id="topic_edit" style="display:none">
|
||||
<div class="fourteen wide column">
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{if and (not .HideRepoInfo) (not .IsBlame)}}
|
||||
<div class="ui segments repository-summary{{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo) .LanguageStats}} repository-summary-language-stats{{end}} mt-2 mb-0">
|
||||
<div class="ui segment sub-menu repository-menu">
|
||||
<div class="ui two horizontal center link list">
|
||||
|
@ -44,3 +45,4 @@
|
|||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue