mirror of
https://github.com/go-gitea/gitea
synced 2024-06-03 03:46:51 +02:00
28350dc0b5
This reverts commit 57653ac0a1
.
73 lines
2.9 KiB
Handlebars
73 lines
2.9 KiB
Handlebars
<div class="ui ignored info message project-column-header" >
|
|
<span class="ui left floated text middle">{{ctx.Locale.Tr "actions.workflow.has_workflow_dispatch"}}</span>
|
|
<button class="ui right floated mini button show-modal" data-modal="#runWorkflowDispatchModal">{{ctx.Locale.Tr "actions.workflow.run"}}{{svg "octicon-triangle-down" 14 "dropdown icon"}}</button>
|
|
</div>
|
|
<div id="runWorkflowDispatchModal" class="ui mini modal">
|
|
<div class="content">
|
|
<form id="runWorkflowDispatchForm" class="ui form" action="{{$.Link}}/run?workflow={{$.CurWorkflow}}&actor={{$.CurActor}}&status={{.Status}}" method="post">
|
|
{{.CsrfTokenHtml}}
|
|
<div class="ui inline field required">
|
|
<label>{{ctx.Locale.Tr "actions.workflow.from_ref"}} :</label>
|
|
<div class="ui floating dropdown icon button">
|
|
<input type="hidden" name="ref" value="refs/heads/{{index .Branches 0}}">
|
|
<i>{{svg "octicon-git-branch"}}</i>
|
|
<span class="text">{{index .Branches 0}}</span>
|
|
<div class="menu">
|
|
<div class="ui icon search input">
|
|
<i class="search icon">{{svg "octicon-search" 16 "search icon"}}</i>
|
|
<input type="text" placeholder="{{ctx.Locale.Tr "repo.filter_branch_and_tag"}}">
|
|
</div>
|
|
<div class="scrolling menu">
|
|
<div class="header">
|
|
{{svg "octicon-git-branch"}}
|
|
Branches
|
|
</div>
|
|
{{range $key, $item := .Branches}}
|
|
<div class="item {{if eq $key 0}}active selected{{end}}" data-value="refs/heads/{{.}}">{{.}}</div>
|
|
{{end}}
|
|
<div class="divider"></div>
|
|
<div class="header">
|
|
{{svg "octicon-tag"}}
|
|
Tags
|
|
</div>
|
|
{{range $key, $item := .Tags}}
|
|
<div class="item" data-value="refs/tags/{{.}}">{{.}}</div>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="divider"></div>
|
|
{{range $key, $item := .WorkflowDispatchConfig.Inputs}}
|
|
<div class="ui field {{if .Required}}required{{end}}">
|
|
{{if eq .Type "choice"}}
|
|
<label>{{$key}} :</label>
|
|
<select class="ui fluid dropdown" name="{{$key}}">
|
|
{{range .Options}}
|
|
<option value="{{.}}" {{if eq $item.Default .}}selected{{end}} >{{.}}</option>
|
|
{{end}}
|
|
</select>
|
|
<span class="help">{{.Description}}</span>
|
|
{{else if eq .Type "boolean"}}
|
|
<div class="ui inline toggle checkbox">
|
|
<label>{{$key}}</label>
|
|
<input type="checkbox" name="{{$key}}" {{if eq .Default "true"}}checked{{end}}>
|
|
<span class="help">{{.Description}}</span>
|
|
</div>
|
|
{{else if eq .Type "number"}}
|
|
<label>{{$key}} :</label>
|
|
<input name="{{$key}}" value="{{.Default}}" {{if .Required}}required{{end}}>
|
|
<span class="help">{{.Description}}</span>
|
|
{{else}}
|
|
<label>{{$key}} :</label>
|
|
<input name="{{$key}}" value="{{.Default}}" {{if .Required}}required{{end}}>
|
|
<span class="help">{{.Description}}</span>
|
|
{{end}}
|
|
</div>
|
|
{{end}}
|
|
<button class="ui tiny primary button" type="submit">Submit</button>
|
|
</form>
|
|
</div>
|
|
</div>
|