mirror of https://github.com/go-gitea/gitea
parent
cb01b8691d
commit
3780795b93
@ -1,53 +1,53 @@ |
||||
{{template "base/alert" .}} |
||||
<form class="ui form ignore-dirty"> |
||||
<div class="ui fluid action input"> |
||||
{{template "shared/searchinput" dict "locale" .locale "Value" .Query "AutoFocus" true}} |
||||
<select class="ui dropdown" name="type"> |
||||
<option value="">{{.locale.Tr "packages.filter.type"}}</option> |
||||
<option value="all">{{.locale.Tr "packages.filter.type.all"}}</option> |
||||
{{range $type := .AvailableTypes}} |
||||
<option{{if eq $.PackageType $type}} selected="selected"{{end}} value="{{$type}}">{{$type.Name}}</option> |
||||
{{end}} |
||||
</select> |
||||
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button> |
||||
</div> |
||||
</form> |
||||
<div class="ui {{if .PackageDescriptors}}issue list{{end}}"> |
||||
{{range .PackageDescriptors}} |
||||
<li class="item gt-df gt-py-3"> |
||||
<div class="issue-item-main"> |
||||
<div class="issue-item-top-row"> |
||||
<a class="title" href="{{.FullWebLink}}">{{.Package.Name}}</a> |
||||
<span class="ui label">{{svg .Package.Type.SVGName 16}} {{.Package.Type.Name}}</span> |
||||
</div> |
||||
<div class="desc issue-item-bottom-row"> |
||||
{{$timeStr := TimeSinceUnix .Version.CreatedUnix $.locale}} |
||||
{{$hasRepositoryAccess := false}} |
||||
{{if .Repository}} |
||||
{{$hasRepositoryAccess = index $.RepositoryAccessMap .Repository.ID}} |
||||
{{end}} |
||||
{{if $hasRepositoryAccess}} |
||||
{{$.locale.Tr "packages.published_by_in" $timeStr .Creator.HomeLink (.Creator.GetDisplayName | Escape) .Repository.Link (.Repository.FullName | Escape) | Safe}} |
||||
{{else}} |
||||
{{$.locale.Tr "packages.published_by" $timeStr .Creator.HomeLink (.Creator.GetDisplayName | Escape) | Safe}} |
||||
{{end}} |
||||
</div> |
||||
{{template "base/alert" .}} |
||||
<form class="ui form ignore-dirty"> |
||||
<div class="ui fluid action input"> |
||||
{{template "shared/searchinput" dict "locale" .locale "Value" .Query "AutoFocus" true}} |
||||
<select class="ui dropdown" name="type"> |
||||
<option value="">{{.locale.Tr "packages.filter.type"}}</option> |
||||
<option value="all">{{.locale.Tr "packages.filter.type.all"}}</option> |
||||
{{range $type := .AvailableTypes}} |
||||
<option{{if eq $.PackageType $type}} selected="selected"{{end}} value="{{$type}}">{{$type.Name}}</option> |
||||
{{end}} |
||||
</select> |
||||
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button> |
||||
</div> |
||||
</form> |
||||
<div class="ui {{if .PackageDescriptors}}issue list{{end}}"> |
||||
{{range .PackageDescriptors}} |
||||
<li class="item gt-df gt-py-3"> |
||||
<div class="issue-item-main"> |
||||
<div class="issue-item-top-row"> |
||||
<a class="title" href="{{.FullWebLink}}">{{.Package.Name}}</a> |
||||
<span class="ui label">{{svg .Package.Type.SVGName 16}} {{.Package.Type.Name}}</span> |
||||
</div> |
||||
</li> |
||||
{{else}} |
||||
{{if not .HasPackages}} |
||||
<div class="gt-pt-5 empty center"> |
||||
{{svg "octicon-package" 48}} |
||||
<h2>{{.locale.Tr "packages.empty"}}</h2> |
||||
{{if and .Repository .CanWritePackages}} |
||||
{{$packagesUrl := URLJoin .Owner.HomeLink "-" "packages"}} |
||||
<p>{{.locale.Tr "packages.empty.repo" $packagesUrl | Safe}}</p> |
||||
<div class="desc issue-item-bottom-row"> |
||||
{{$timeStr := TimeSinceUnix .Version.CreatedUnix $.locale}} |
||||
{{$hasRepositoryAccess := false}} |
||||
{{if .Repository}} |
||||
{{$hasRepositoryAccess = index $.RepositoryAccessMap .Repository.ID}} |
||||
{{end}} |
||||
{{if $hasRepositoryAccess}} |
||||
{{$.locale.Tr "packages.published_by_in" $timeStr .Creator.HomeLink (.Creator.GetDisplayName | Escape) .Repository.Link (.Repository.FullName | Escape) | Safe}} |
||||
{{else}} |
||||
{{$.locale.Tr "packages.published_by" $timeStr .Creator.HomeLink (.Creator.GetDisplayName | Escape) | Safe}} |
||||
{{end}} |
||||
<p>{{.locale.Tr "packages.empty.documentation" "https://docs.gitea.io/en-us/usage/packages/overview/" | Safe}}</p> |
||||
</div> |
||||
{{else}} |
||||
<p>{{.locale.Tr "packages.filter.no_result"}}</p> |
||||
{{end}} |
||||
</div> |
||||
</li> |
||||
{{else}} |
||||
{{if not .HasPackages}} |
||||
<div class="gt-pt-5 empty center"> |
||||
{{svg "octicon-package" 48}} |
||||
<h2>{{.locale.Tr "packages.empty"}}</h2> |
||||
{{if and .Repository .CanWritePackages}} |
||||
{{$packagesUrl := URLJoin .Owner.HomeLink "-" "packages"}} |
||||
<p>{{.locale.Tr "packages.empty.repo" $packagesUrl | Safe}}</p> |
||||
{{end}} |
||||
<p>{{.locale.Tr "packages.empty.documentation" "https://docs.gitea.io/en-us/usage/packages/overview/" | Safe}}</p> |
||||
</div> |
||||
{{else}} |
||||
<p>{{.locale.Tr "packages.filter.no_result"}}</p> |
||||
{{end}} |
||||
{{template "base/paginate" .}} |
||||
</div> |
||||
{{end}} |
||||
{{template "base/paginate" .}} |
||||
</div> |
||||
|
@ -1,37 +1,37 @@ |
||||
<p><a href="{{.PackageDescriptor.PackageWebLink}}">{{.PackageDescriptor.Package.Name}}</a> / <strong>{{.locale.Tr "packages.versions"}}</strong></p> |
||||
<form class="ui form ignore-dirty"> |
||||
<div class="ui fluid action input"> |
||||
{{template "shared/searchinput" dict "locale" .locale "Value" .Query "AutoFocus" true}} |
||||
<select class="ui dropdown" name="sort"> |
||||
<option value="version_asc"{{if eq .Sort "version_asc"}} selected="selected"{{end}}>{{.locale.Tr "filter.string.asc"}}</option> |
||||
<option value="version_desc"{{if eq .Sort "version_desc"}} selected="selected"{{end}}>{{.locale.Tr "filter.string.desc"}}</option> |
||||
<option value="created_asc"{{if eq .Sort "created_asc"}} selected="selected"{{end}}>{{.locale.Tr "repo.issues.filter_sort.oldest"}}</option> |
||||
<option value="created_desc"{{if or (eq .Sort "") (eq .Sort "created_desc")}} selected="selected"{{end}}>{{.locale.Tr "repo.issues.filter_sort.latest"}}</option> |
||||
</select> |
||||
{{if eq .PackageDescriptor.Package.Type "container"}} |
||||
<select class="ui dropdown" name="tagged"> |
||||
{{$isTagged := or (eq .Tagged "") (eq .Tagged "tagged")}} |
||||
<option value="tagged"{{if $isTagged}} selected="selected"{{end}}>{{.locale.Tr "packages.filter.container.tagged"}}</option> |
||||
<option value="untagged"{{if not $isTagged}} selected="selected"{{end}}>{{.locale.Tr "packages.filter.container.untagged"}}</option> |
||||
</select> |
||||
{{end}} |
||||
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button> |
||||
</div> |
||||
</form> |
||||
<div class="ui {{if .PackageDescriptors}}issue list{{end}}"> |
||||
{{range .PackageDescriptors}} |
||||
<li class="item gt-df gt-py-3"> |
||||
<div class="issue-item-main"> |
||||
<div class="issue-item-top-row"> |
||||
<a class="title" href="{{.FullWebLink}}">{{.Version.LowerVersion}}</a> |
||||
</div> |
||||
<div class="desc issue-item-bottom-row"> |
||||
{{$.locale.Tr "packages.published_by" (TimeSinceUnix .Version.CreatedUnix $.locale) .Creator.HomeLink (.Creator.GetDisplayName | Escape) | Safe}} |
||||
</div> |
||||
</div> |
||||
</li> |
||||
{{else}} |
||||
<p>{{.locale.Tr "packages.filter.no_result"}}</p> |
||||
<p><a href="{{.PackageDescriptor.PackageWebLink}}">{{.PackageDescriptor.Package.Name}}</a> / <strong>{{.locale.Tr "packages.versions"}}</strong></p> |
||||
<form class="ui form ignore-dirty"> |
||||
<div class="ui fluid action input"> |
||||
{{template "shared/searchinput" dict "locale" .locale "Value" .Query "AutoFocus" true}} |
||||
<select class="ui dropdown" name="sort"> |
||||
<option value="version_asc"{{if eq .Sort "version_asc"}} selected="selected"{{end}}>{{.locale.Tr "filter.string.asc"}}</option> |
||||
<option value="version_desc"{{if eq .Sort "version_desc"}} selected="selected"{{end}}>{{.locale.Tr "filter.string.desc"}}</option> |
||||
<option value="created_asc"{{if eq .Sort "created_asc"}} selected="selected"{{end}}>{{.locale.Tr "repo.issues.filter_sort.oldest"}}</option> |
||||
<option value="created_desc"{{if or (eq .Sort "") (eq .Sort "created_desc")}} selected="selected"{{end}}>{{.locale.Tr "repo.issues.filter_sort.latest"}}</option> |
||||
</select> |
||||
{{if eq .PackageDescriptor.Package.Type "container"}} |
||||
<select class="ui dropdown" name="tagged"> |
||||
{{$isTagged := or (eq .Tagged "") (eq .Tagged "tagged")}} |
||||
<option value="tagged"{{if $isTagged}} selected="selected"{{end}}>{{.locale.Tr "packages.filter.container.tagged"}}</option> |
||||
<option value="untagged"{{if not $isTagged}} selected="selected"{{end}}>{{.locale.Tr "packages.filter.container.untagged"}}</option> |
||||
</select> |
||||
{{end}} |
||||
{{template "base/paginate" .}} |
||||
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button> |
||||
</div> |
||||
</form> |
||||
<div class="ui {{if .PackageDescriptors}}issue list{{end}}"> |
||||
{{range .PackageDescriptors}} |
||||
<li class="item gt-df gt-py-3"> |
||||
<div class="issue-item-main"> |
||||
<div class="issue-item-top-row"> |
||||
<a class="title" href="{{.FullWebLink}}">{{.Version.LowerVersion}}</a> |
||||
</div> |
||||
<div class="desc issue-item-bottom-row"> |
||||
{{$.locale.Tr "packages.published_by" (TimeSinceUnix .Version.CreatedUnix $.locale) .Creator.HomeLink (.Creator.GetDisplayName | Escape) | Safe}} |
||||
</div> |
||||
</div> |
||||
</li> |
||||
{{else}} |
||||
<p>{{.locale.Tr "packages.filter.no_result"}}</p> |
||||
{{end}} |
||||
{{template "base/paginate" .}} |
||||
</div> |
||||
|
@ -1,66 +1,66 @@ |
||||
<h2 class="ui dividing header"> |
||||
{{if .PageIsEditProjects}} |
||||
<h2 class="ui dividing header"> |
||||
{{if .PageIsEditProjects}} |
||||
{{.locale.Tr "repo.projects.edit"}} |
||||
<div class="sub header">{{.locale.Tr "repo.projects.edit_subheader"}}</div> |
||||
{{else}} |
||||
{{.locale.Tr "repo.projects.new"}} |
||||
<div class="sub header">{{.locale.Tr "repo.projects.new_subheader"}}</div> |
||||
{{end}} |
||||
</h2> |
||||
{{template "base/alert" .}} |
||||
<form class="ui form grid" action="{{.Link}}" method="post"> |
||||
{{.CsrfTokenHtml}} |
||||
<div class="eleven wide column"> |
||||
<input type="hidden" id="redirect" name="redirect" value="{{.redirect}}"> |
||||
<div class="field {{if .Err_Title}}error{{end}}"> |
||||
<label>{{.locale.Tr "repo.projects.title"}}</label> |
||||
<input name="title" placeholder="{{.locale.Tr "repo.projects.title"}}" value="{{.title}}" autofocus required> |
||||
</div> |
||||
<div class="field"> |
||||
<label>{{.locale.Tr "repo.projects.description"}}</label> |
||||
<textarea name="content" placeholder="{{.locale.Tr "repo.projects.description_placeholder"}}">{{.content}}</textarea> |
||||
</div> |
||||
|
||||
{{if not .PageIsEditProjects}} |
||||
<div class="field"> |
||||
<label>{{.locale.Tr "repo.projects.template.desc"}}</label> |
||||
<div class="ui selection dropdown"> |
||||
<input type="hidden" name="board_type" value="{{.type}}"> |
||||
<div class="default text">{{.locale.Tr "repo.projects.template.desc_helper"}}</div> |
||||
<div class="menu"> |
||||
{{range $element := .BoardTypes}} |
||||
<div class="item" data-id="{{$element.BoardType}}" data-value="{{$element.BoardType}}">{{$.locale.Tr $element.Translation}}</div> |
||||
{{end}} |
||||
</div> |
||||
</div> |
||||
</div> |
||||
{{end}} |
||||
{{else}} |
||||
{{.locale.Tr "repo.projects.new"}} |
||||
<div class="sub header">{{.locale.Tr "repo.projects.new_subheader"}}</div> |
||||
{{end}} |
||||
</h2> |
||||
{{template "base/alert" .}} |
||||
<form class="ui form grid" action="{{.Link}}" method="post"> |
||||
{{.CsrfTokenHtml}} |
||||
<div class="eleven wide column"> |
||||
<input type="hidden" id="redirect" name="redirect" value="{{.redirect}}"> |
||||
<div class="field {{if .Err_Title}}error{{end}}"> |
||||
<label>{{.locale.Tr "repo.projects.title"}}</label> |
||||
<input name="title" placeholder="{{.locale.Tr "repo.projects.title"}}" value="{{.title}}" autofocus required> |
||||
</div> |
||||
<div class="field"> |
||||
<label>{{.locale.Tr "repo.projects.description"}}</label> |
||||
<textarea name="content" placeholder="{{.locale.Tr "repo.projects.description_placeholder"}}">{{.content}}</textarea> |
||||
</div> |
||||
|
||||
{{if not .PageIsEditProjects}} |
||||
<div class="field"> |
||||
<label>{{.locale.Tr "repo.projects.card_type.desc"}}</label> |
||||
<label>{{.locale.Tr "repo.projects.template.desc"}}</label> |
||||
<div class="ui selection dropdown"> |
||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}} |
||||
{{range $element := .CardTypes}} |
||||
{{if or (eq $.card_type $element.CardType) (and (not $.PageIsEditProjects) (eq $element.CardType 1))}} |
||||
<input type="hidden" name="card_type" value="{{$element.CardType}}"> |
||||
<div class="default text">{{$.locale.Tr $element.Translation}}</div> |
||||
{{end}} |
||||
{{end}} |
||||
<input type="hidden" name="board_type" value="{{.type}}"> |
||||
<div class="default text">{{.locale.Tr "repo.projects.template.desc_helper"}}</div> |
||||
<div class="menu"> |
||||
{{range $element := .CardTypes}} |
||||
<div class="item" data-id="{{$element.CardType}}" data-value="{{$element.CardType}}">{{$.locale.Tr $element.Translation}}</div> |
||||
{{range $element := .BoardTypes}} |
||||
<div class="item" data-id="{{$element.BoardType}}" data-value="{{$element.BoardType}}">{{$.locale.Tr $element.Translation}}</div> |
||||
{{end}} |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="divider"></div> |
||||
<div class="ui left"> |
||||
<a class="ui cancel button" href="{{$.CancelLink}}"> |
||||
{{.locale.Tr "repo.milestones.cancel"}} |
||||
</a> |
||||
<button class="ui primary button"> |
||||
{{if .PageIsEditProjects}}{{.locale.Tr "repo.projects.modify"}}{{else}}{{.locale.Tr "repo.projects.create"}}{{end}} |
||||
</button> |
||||
{{end}} |
||||
|
||||
<div class="field"> |
||||
<label>{{.locale.Tr "repo.projects.card_type.desc"}}</label> |
||||
<div class="ui selection dropdown"> |
||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}} |
||||
{{range $element := .CardTypes}} |
||||
{{if or (eq $.card_type $element.CardType) (and (not $.PageIsEditProjects) (eq $element.CardType 1))}} |
||||
<input type="hidden" name="card_type" value="{{$element.CardType}}"> |
||||
<div class="default text">{{$.locale.Tr $element.Translation}}</div> |
||||
{{end}} |
||||
{{end}} |
||||
<div class="menu"> |
||||
{{range $element := .CardTypes}} |
||||
<div class="item" data-id="{{$element.CardType}}" data-value="{{$element.CardType}}">{{$.locale.Tr $element.Translation}}</div> |
||||
{{end}} |
||||
</div> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
</div> |
||||
<div class="divider"></div> |
||||
<div class="ui left"> |
||||
<a class="ui cancel button" href="{{$.CancelLink}}"> |
||||
{{.locale.Tr "repo.milestones.cancel"}} |
||||
</a> |
||||
<button class="ui primary button"> |
||||
{{if .PageIsEditProjects}}{{.locale.Tr "repo.projects.modify"}}{{else}}{{.locale.Tr "repo.projects.create"}}{{end}} |
||||
</button> |
||||
</div> |
||||
</form> |
||||
|
Loading…
Reference in new issue