-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display archived labels specially when listing labels #26820
Merged
lunny
merged 51 commits into
go-gitea:main
from
puni9869:punit/Showing-archive-label-issue-filter
Sep 18, 2023
Merged
Changes from 20 commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
530806f
Added archived label for org labels and added into issue filter list.
puni9869 9bf387a
Merge branch 'go-gitea:main' into punit/Showing-archive-label-issue-f…
puni9869 9b94b4f
Merge branch 'main' into punit/Showing-archive-label-issue-filter
puni9869 14d4646
Merge branch 'go-gitea:main' into punit/Showing-archive-label-issue-f…
puni9869 6f61aef
Merge branch 'main' into punit/Showing-archive-label-issue-filter
puni9869 404f4dd
Merge branch 'main' into punit/Showing-archive-label-issue-filter
puni9869 d8866d7
Ui fixes and changing archived label hint and ui
puni9869 fcee97b
Translations change
puni9869 f1168a4
Reordering the archive hint in org labels
puni9869 32f3917
Merge branch 'go-gitea:main' into punit/Showing-archive-label-issue-f…
puni9869 6e137e5
Merge branch 'go-gitea:main' into punit/Showing-archive-label-issue-f…
puni9869 df8ab39
Merge branch 'main' into punit/Showing-archive-label-issue-filter
puni9869 541f1a4
Styling the label in label page and issue filter
puni9869 4b51542
Linter
puni9869 7b7a140
Linter
puni9869 e21e8d8
Merge branch 'main' into punit/Showing-archive-label-issue-filter
puni9869 616eebd
Merge branch 'main' into punit/Showing-archive-label-issue-filter
puni9869 5e97317
Merge branch 'main' into punit/Showing-archive-label-issue-filter
puni9869 461c7a2
Merge branch 'main' into punit/Showing-archive-label-issue-filter
puni9869 23b085b
Merge branch 'go-gitea:main' into punit/Showing-archive-label-issue-f…
puni9869 d54b658
Merge branch 'main' into punit/Showing-archive-label-issue-filter
puni9869 a5dc43f
Merge branch 'main' into punit/Showing-archive-label-issue-filter
puni9869 c81196b
Merge branch 'go-gitea:main' into punit/Showing-archive-label-issue-f…
puni9869 8a6193d
Removing all helper classes css
puni9869 3c993c3
Fixing linter
puni9869 434d51e
Merge branch 'main' into punit/Showing-archive-label-issue-filter
puni9869 c07d039
Merge branch 'go-gitea:main' into punit/Showing-archive-label-issue-f…
puni9869 c171049
Merge branch 'main' into punit/Showing-archive-label-issue-filter
puni9869 2209ad2
Merge branch 'main' into punit/Showing-archive-label-issue-filter
puni9869 cd3aa05
Merge branch 'go-gitea:main' into punit/Showing-archive-label-issue-f…
puni9869 e3bf479
Merge branch 'main' into punit/Showing-archive-label-issue-filter
puni9869 bf2c9ba
Adding archived template
puni9869 0243ab7
Adding archived template
puni9869 2ad4b8a
Merge branch 'main' into punit/Showing-archive-label-issue-filter
puni9869 e3dd978
Adding archived template
puni9869 e538f73
Linter fix in css
puni9869 0e6ebfd
Merge branch 'main' into punit/Showing-archive-label-issue-filter
puni9869 30db06d
Merge branch 'main' into punit/Showing-archive-label-issue-filter
puni9869 0d497af
Remove the extra styles
puni9869 b0a427a
Merge branch 'main' into punit/Showing-archive-label-issue-filter
puni9869 3658703
Adding height to archived box
puni9869 5bcd313
Merge branch 'main' into punit/Showing-archive-label-issue-filter
puni9869 8687cff
Adding ui label basic mini
puni9869 bad0bd1
Merge branch 'go-gitea:main' into punit/Showing-archive-label-issue-f…
puni9869 64d0d12
Merge branch 'main' into punit/Showing-archive-label-issue-filter
puni9869 147706b
Merge branch 'main' into punit/Showing-archive-label-issue-filter
puni9869 c9516ed
Trying to add similar style in issue label filter
puni9869 3682eb8
Merge branch 'main' into punit/Showing-archive-label-issue-filter
puni9869 1e01b58
override problematic style
silverwind b5919f3
Merge branch 'main' into punit/Showing-archive-label-issue-filter
puni9869 6117f22
Merge branch 'main' into punit/Showing-archive-label-issue-filter
GiteaBot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,11 +33,6 @@ | |
<li class="item"> | ||
<div class="label-title"> | ||
{{RenderLabel $.Context .}} | ||
{{if not .ArchivedUnix.IsZero}} | ||
<span class="gt-ml-3 gt-cursor-default gt-italic" data-tooltip-content="{{$.locale.Tr "repo.issues.label_archive_tooltip"}}"> | ||
{{$.locale.Tr "home.archived"}} | ||
</span> | ||
{{end}} | ||
{{if .Description}}<br><small class="desc">{{.Description | RenderEmoji $.Context}}</small>{{end}} | ||
</div> | ||
<div class="label-issues"> | ||
|
@@ -47,14 +42,21 @@ | |
<a class="open-issues" href="{{$.RepoLink}}/issues?labels={{.ID}}">{{svg "octicon-issue-opened"}} {{$.locale.Tr "repo.issues.label_open_issues" .NumOpenIssues}}</a> | ||
{{end}} | ||
</div> | ||
<div class="label-operation"> | ||
{{if and (not $.PageIsOrgSettingsLabels) (not $.Repository.IsArchived) (or $.CanWriteIssues $.CanWritePulls)}} | ||
<a class="edit-label-button" href="#" data-id="{{.ID}}" data-title="{{.Name}}" {{if .Exclusive}}data-exclusive{{end}} {{if gt .ArchivedUnix 0}}data-is-archived{{end}} data-num-issues="{{.NumIssues}}" data-description="{{.Description}}" data-color={{.Color}}>{{svg "octicon-pencil"}} {{$.locale.Tr "repo.issues.label_edit"}}</a> | ||
<a class="delete-button" href="#" data-url="{{$.Link}}/delete" data-id="{{.ID}}">{{svg "octicon-trash"}} {{$.locale.Tr "repo.issues.label_delete"}}</a> | ||
{{else if $.PageIsOrgSettingsLabels}} | ||
<a class="edit-label-button" href="#" data-id="{{.ID}}" data-title="{{.Name}}" {{if .Exclusive}}data-exclusive{{end}} {{if gt .ArchivedUnix 0}}data-is-archived{{end}} data-num-issues="{{.NumIssues}}" data-description="{{.Description}}" data-color={{.Color}}>{{svg "octicon-pencil"}} {{$.locale.Tr "repo.issues.label_edit"}}</a> | ||
<a class="delete-button" href="#" data-url="{{$.Link}}/delete" data-id="{{.ID}}">{{svg "octicon-trash"}} {{$.locale.Tr "repo.issues.label_delete"}}</a> | ||
{{end}} | ||
<div class="label-operation gt-df"> | ||
{{if .IsArchived}} | ||
<span class="archived-label gt-font-12 gt-p-2 gt-border-secondary gt-rounded gt-jc gt-cursor-default" data-tooltip-content="{{$.locale.Tr "repo.issues.label_archive_tooltip"}}"> | ||
{{$.locale.Tr "archived"}} | ||
</span> | ||
{{end}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would be suited for a new subtemplate. |
||
<div class="gt-df gt-ml-auto"> | ||
{{if and (not $.PageIsOrgSettingsLabels) (not $.Repository.IsArchived) (or $.CanWriteIssues $.CanWritePulls)}} | ||
<a class="edit-label-button" href="#" data-id="{{.ID}}" data-title="{{.Name}}" {{if .Exclusive}}data-exclusive{{end}} {{if gt .ArchivedUnix 0}}data-is-archived{{end}} data-num-issues="{{.NumIssues}}" data-description="{{.Description}}" data-color={{.Color}}>{{svg "octicon-pencil"}} {{$.locale.Tr "repo.issues.label_edit"}}</a> | ||
<a class="delete-button" href="#" data-url="{{$.Link}}/delete" data-id="{{.ID}}">{{svg "octicon-trash"}} {{$.locale.Tr "repo.issues.label_delete"}}</a> | ||
{{else if $.PageIsOrgSettingsLabels}} | ||
<a class="edit-label-button" href="#" data-id="{{.ID}}" data-title="{{.Name}}" {{if .Exclusive}}data-exclusive{{end}} {{if gt .ArchivedUnix 0}}data-is-archived{{end}} data-num-issues="{{.NumIssues}}" data-description="{{.Description}}" data-color={{.Color}}>{{svg "octicon-pencil"}} {{$.locale.Tr "repo.issues.label_edit"}}</a> | ||
<a class="delete-button" href="#" data-url="{{$.Link}}/delete" data-id="{{.ID}}">{{svg "octicon-trash"}} {{$.locale.Tr "repo.issues.label_delete"}}</a> | ||
{{end}} | ||
</div> | ||
</div> | ||
</li> | ||
{{end}} | ||
|
@@ -78,9 +80,15 @@ | |
{{if .Description}}<br><small class="desc">{{.Description | RenderEmoji $.Context}}</small>{{end}} | ||
</div> | ||
<div class="label-issues"> | ||
<a class="open-issues" href="{{$.RepoLink}}/issues?labels={{.ID}}">{{svg "octicon-issue-opened"}} {{$.locale.Tr "repo.issues.label_open_issues" .NumOpenRepoIssues}}</a> | ||
<a class="open-issues" {{if .IsArchived}}data-is-archived{{end}} href="{{$.RepoLink}}/issues?labels={{.ID}}">{{svg "octicon-issue-opened"}} {{$.locale.Tr "repo.issues.label_open_issues" .NumOpenRepoIssues}}</a> | ||
</div> | ||
<div class="label-operation"> | ||
{{if .IsArchived}} | ||
<span class="archived-label gt-font-12 gt-p-2 gt-border-secondary gt-rounded gt-jc gt-cursor-default" data-tooltip-content="{{$.locale.Tr "repo.issues.label_archive_tooltip"}}"> | ||
{{$.locale.Tr "archived"}} | ||
</span> | ||
{{end}} | ||
</div> | ||
<div class="label-operation"></div> | ||
</li> | ||
{{end}} | ||
{{end}} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You already have a
.archived-label
CSS selector for styles, why there are so manygt-
helpers .....There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reusability of helper class.
I can put all styles in that one class.
It will more clean that wise.