mirror of
https://github.com/go-gitea/gitea
synced 2024-11-05 01:34:25 +00:00
75c62054a6
Follow #24097 and #24285 And add a devtest page for modal action button testing. http://localhost:3000/devtest/fomantic-modal Now the `modal_actions_confirm.tmpl` could support: green / blue / yellow positive buttons, the negative button is "secondary". ps: this PR is only a small improvement, there are still a lot of buttons not having proper colors. In the future these buttons could be improved by this approach. These buttons could also be improved according to the conclusion of #24285 in the future. ![image](https://user-images.githubusercontent.com/2114189/233847773-a6d6b29b-7b5c-490e-8425-40dfd0ad2529.png) And add GitHub-like single danger button (context: https://github.com/go-gitea/gitea/issues/24285#issuecomment-1519100312) ![image](https://user-images.githubusercontent.com/2114189/233891566-055d7611-894d-4d5a-baf5-f6369180bf8d.png) --------- Co-authored-by: silverwind <me@silverwind.io>
56 lines
2.1 KiB
Handlebars
56 lines
2.1 KiB
Handlebars
{{template "base/head" .}}
|
|
<div role="main" aria-label="{{.Title}}" class="page-content organization teams">
|
|
{{template "org/header" .}}
|
|
<div class="ui container">
|
|
{{template "base/alert" .}}
|
|
{{if .IsOrganizationOwner}}
|
|
<div class="text right">
|
|
<a class="ui green button" href="{{.OrgLink}}/teams/new">{{svg "octicon-plus"}} {{.locale.Tr "org.create_new_team"}}</a>
|
|
</div>
|
|
<div class="ui divider"></div>
|
|
{{end}}
|
|
|
|
<div class="ui two column grid">
|
|
{{range .Teams}}
|
|
<div class="column">
|
|
<div class="ui top attached header">
|
|
<a class="text black" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}"><strong>{{.Name}}</strong></a>
|
|
<div class="ui right">
|
|
{{if .IsMember $.SignedUser.ID}}
|
|
<form>
|
|
<button class="ui red tiny button delete-button" data-modal-id="leave-team"
|
|
data-url="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/action/leave" data-datauid="{{$.SignedUser.ID}}"
|
|
data-name="{{.Name}}">{{$.locale.Tr "org.teams.leave"}}</button>
|
|
</form>
|
|
{{else if $.IsOrganizationOwner}}
|
|
<form method="post" action="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/action/join">
|
|
{{$.CsrfTokenHtml}}
|
|
<button type="submit" class="ui primary small button" name="uid" value="{{$.SignedUser.ID}}">{{$.locale.Tr "org.teams.join"}}</button>
|
|
</form>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
<div class="ui attached segment members">
|
|
{{range .Members}}
|
|
{{template "shared/user/avatarlink" dict "Context" $.Context "user" .}}
|
|
{{end}}
|
|
</div>
|
|
<div class="ui bottom attached header">
|
|
<p class="team-meta">{{.NumMembers}} {{$.locale.Tr "org.lower_members"}} · {{.NumRepos}} {{$.locale.Tr "org.lower_repositories"}}</p>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="ui g-modal-confirm delete modal" id="leave-team">
|
|
<div class="header">
|
|
{{$.locale.Tr "org.teams.leave"}}
|
|
</div>
|
|
<div class="content">
|
|
<p>{{$.locale.Tr "org.teams.leave.detail" `<span class="name"></span>` | Safe}}</p>
|
|
</div>
|
|
{{template "base/modal_actions_confirm" .}}
|
|
</div>
|
|
{{template "base/footer" .}}
|