|
| 1 | +<div class="require-actions-container"> |
| 2 | + <h4 class="ui top attached header"> |
| 3 | + {{ctx.Locale.Tr "actions.require_actions.require_actions_manage_panel"}} ({{ctx.Locale.Tr "admin.total" .Total}}) |
| 4 | + <div class="ui right"> |
| 5 | + <div class="ui top right"> |
| 6 | + <button class="ui primary tiny button show-modal" |
| 7 | + data-modal="#add-require-actions-modal" |
| 8 | + data-modal-form.action="{{.Link}}" |
| 9 | + data-modal-header="{{ctx.Locale.Tr "actions.require_actions.add"}}" |
| 10 | + > |
| 11 | + {{ctx.Locale.Tr "actions.require_actions.add"}} |
| 12 | + </button> |
| 13 | + </div> |
| 14 | + |
| 15 | + </div> |
| 16 | + </h4> |
| 17 | + <div class="ui attached segment"> |
| 18 | + <form class="ui form ignore-dirty" id="require-action-list-search-form" action="{{$.Link}}"> |
| 19 | + <!-- Search Text --> |
| 20 | + <div class="ui fluid action input"> |
| 21 | + {{template "shared/search/combo" dict "Value" .Keyword}} |
| 22 | + <button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button> |
| 23 | + </div> |
| 24 | + </form> |
| 25 | + </div> |
| 26 | + <div class="ui attached table segment"> |
| 27 | + <table class="ui very basic striped table unstackable"> |
| 28 | + <thead> |
| 29 | + <tr> |
| 30 | + <th data-sortt-asc="online" data-sortt-desc="offline"> |
| 31 | + {{ctx.Locale.Tr "actions.require_actions.status"}} |
| 32 | + </th> |
| 33 | + <th data-sortt-asc="newest" data-sortt-desc="oldest"> |
| 34 | + {{ctx.Locale.Tr "actions.require_actions.id"}} |
| 35 | + </th> |
| 36 | + <th data-sortt-asc="alphabetically" data-sortt-desc="reversealphabetically"> |
| 37 | + {{ctx.Locale.Tr "actions.require_actions.name"}} |
| 38 | + </th> |
| 39 | + <th>{{ctx.Locale.Tr "actions.require_actions.version"}}</th> |
| 40 | + <th>{{ctx.Locale.Tr "actions.require_actions.repo"}}</th> |
| 41 | + <th>{{ctx.Locale.Tr "actions.require_actions.link"}}</th> |
| 42 | + <th>{{ctx.Locale.Tr "edit"}}</th> |
| 43 | + </tr> |
| 44 | + </thead> |
| 45 | + <tbody> |
| 46 | + {{if .RequireActionList}} |
| 47 | + {{range .RequireActionList}} |
| 48 | + <tr> |
| 49 | + <td> |
| 50 | + <span class="ui {{if .IsOnline}}green{{else}}basic{{end}} label">{{.StatusLocaleName ctx.Locale}}</span> |
| 51 | + </td> |
| 52 | + <td>{{.ID}}</td> |
| 53 | + <td><p data-tooltip-content="{{.Description}}">{{.Name}}</p></td> |
| 54 | + <td>{{if .Version}}{{.Version}}{{else}}{{ctx.Locale.Tr "unknown"}}{{end}}</td> |
| 55 | + <td><span data-tooltip-content="{{.BelongsToOwnerName}}">{{.BelongsToOwnerType.LocaleString ctx.Locale}}</span></td> |
| 56 | + <td class="require_action-tags"> |
| 57 | + {{range .AgentLabels}}<span class="ui label">{{.}}</span>{{end}} |
| 58 | + </td> |
| 59 | + <td>{{if .LastOnline}}{{TimeSinceUnix .LastOnline ctx.Locale}}{{else}}{{ctx.Locale.Tr "never"}}{{end}}</td> |
| 60 | + <td class="require_action-ops"> |
| 61 | + {{if .Editable $.RequireActionOwnerID $.RequireApoID}} |
| 62 | + <a href="{{$.Link}}/{{.ID}}">{{svg "octicon-pencil"}}</a> |
| 63 | + {{end}}" |
| 64 | + </td> |
| 65 | + </tr> |
| 66 | + {{end}} |
| 67 | + {{else}} |
| 68 | + <tr> |
| 69 | + <td class="center aligned" colspan="8">{{ctx.Locale.Tr "actions.require_actions.none"}}</td> |
| 70 | + </tr> |
| 71 | + {{end}} |
| 72 | + </tbody> |
| 73 | + </table> |
| 74 | + </div> |
| 75 | + {{template "base/paginate" .}} |
| 76 | +</div> |
| 77 | + |
| 78 | + |
| 79 | + |
| 80 | +{{/* Add RequireAction dialog */}} |
| 81 | +<div class="ui small modal" id="add-require-actions-modal"> |
| 82 | + <div class="header"> |
| 83 | + <span id="actions-modal-header">Availble Enable Workflows</span> |
| 84 | + </div> |
| 85 | + <form class="ui form form-fetch-action" method="post"> |
| 86 | + <div class="content"> |
| 87 | + <div class="item"> |
| 88 | + <a href="https://docs.gitea.com/usage/actions/require-action">{{ctx.Locale.Tr "actions.require_actions.enable_global_workflow"}}</a> |
| 89 | + </div> |
| 90 | + <div class="divider"></div> |
| 91 | + <!-- <div class="ui input"> --> |
| 92 | + <table class="ui very basic striped table unstackable"> |
| 93 | + <thead> |
| 94 | + <tr> |
| 95 | + <th data-sortt-asc="alphabetically" data-sortt-desc="reversealphabetically"> |
| 96 | + {{ctx.Locale.Tr "actions.require_actions.workflow"}} |
| 97 | + </th> |
| 98 | + <th> |
| 99 | + {{ctx.Locale.Tr "actions.require_actions.repo"}} |
| 100 | + </th> |
| 101 | + </tr> |
| 102 | + </thead> |
| 103 | + <tbody> |
| 104 | + {{if .GlobalEnableWorkflows}} |
| 105 | + {{range .GlobalEnableWorkflows}} |
| 106 | + <tr> |
| 107 | + <td><div class="field"> |
| 108 | + <div class="ui radio checkbox"> |
| 109 | + <input class="select-org-radio" name="enable_global_workflow" type="radio" value="{{.Filename}}"> |
| 110 | + <label>{{.Filename}}</label> |
| 111 | + </div> |
| 112 | + </div></td> |
| 113 | + <td><div class="field"> |
| 114 | + <input class="" name="RepoID" type="hidden" value="{{.RepoName}}"> |
| 115 | + <a href="/{{$.OrgName}}/{{.RepoName}}"> |
| 116 | + <label>{{.RepoName}}</label> |
| 117 | + </a> |
| 118 | + </div></td> |
| 119 | + </tr> |
| 120 | + {{ end }} |
| 121 | + {{else}} |
| 122 | + <tr> |
| 123 | + <td class="center aligned" colspan="8">{{ctx.Locale.Tr "actions.require_actions.none"}}</td> |
| 124 | + </tr> |
| 125 | + {{ end }} |
| 126 | + </tbody> |
| 127 | + </table> |
| 128 | + <div class="divider"></div> |
| 129 | + <div class="item"> |
| 130 | + <a href="{{$.Link}}/add">{{ctx.Locale.Tr "actions.require_actions.add_require_actions"}}</a> |
| 131 | + </div> |
| 132 | + </div> |
| 133 | + {{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}} |
| 134 | + </form> |
| 135 | +</div> |
0 commit comments