code.gitea.io/gitea@v1.22.3/templates/projects/list.tmpl (about)

     1  {{if and $.CanWriteProjects (not $.Repository.IsArchived)}}
     2  	<div class="tw-flex tw-justify-between tw-mb-4">
     3  		<div class="small-menu-items ui compact tiny menu list-header-toggle">
     4  			<a class="item{{if not .IsShowClosed}} active{{end}}" href="?state=open&q={{$.Keyword}}">
     5  				{{svg "octicon-project-symlink" 16 "tw-mr-2"}}
     6  				{{ctx.Locale.PrettyNumber .OpenCount}}&nbsp;{{ctx.Locale.Tr "repo.issues.open_title"}}
     7  			</a>
     8  			<a class="item{{if .IsShowClosed}} active{{end}}" href="?state=closed&q={{$.Keyword}}">
     9  				{{svg "octicon-check" 16 "tw-mr-2"}}
    10  				{{ctx.Locale.PrettyNumber .ClosedCount}}&nbsp;{{ctx.Locale.Tr "repo.issues.closed_title"}}
    11  			</a>
    12  		</div>
    13  		<div class="tw-text-right">
    14  			<a class="ui small primary button" href="{{$.Link}}/new">{{ctx.Locale.Tr "repo.projects.new"}}</a>
    15  		</div>
    16  	</div>
    17  {{end}}
    18  
    19  {{template "base/alert" .}}
    20  
    21  <div class="list-header">
    22  	<!-- Search -->
    23  	<form class="list-header-search ui form ignore-dirty">
    24  		<input type="hidden" name="state" value="{{$.State}}">
    25  		{{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.project_kind")}}
    26  	</form>
    27  	<!-- Sort -->
    28  	<div class="list-header-sort ui small dropdown type jump item">
    29  		<span class="text">
    30  			{{ctx.Locale.Tr "repo.issues.filter_sort"}}
    31  		</span>
    32  		{{svg "octicon-triangle-down" 14 "dropdown icon"}}
    33  		<div class="menu">
    34  			<a class="{{if eq .SortType "oldest"}}active {{end}}item" href="?q={{$.Keyword}}&sort=oldest&state={{$.State}}">{{ctx.Locale.Tr "repo.issues.filter_sort.oldest"}}</a>
    35  			<a class="{{if eq .SortType "recentupdate"}}active {{end}}item" href="?q={{$.Keyword}}&sort=recentupdate&state={{$.State}}">{{ctx.Locale.Tr "repo.issues.filter_sort.recentupdate"}}</a>
    36  			<a class="{{if eq .SortType "leastupdate"}}active {{end}}item" href="?q={{$.Keyword}}&sort=leastupdate&state={{$.State}}">{{ctx.Locale.Tr "repo.issues.filter_sort.leastupdate"}}</a>
    37  		</div>
    38  	</div>
    39  </div>
    40  
    41  <div class="milestone-list">
    42  	{{range .Projects}}
    43  		<li class="milestone-card">
    44  			<h3 class="flex-text-block tw-m-0 tw-gap-3">
    45  				{{svg .IconName 16}}
    46  				<a class="muted tw-break-anywhere" href="{{.Link ctx}}">{{.Title}}</a>
    47  			</h3>
    48  			<div class="milestone-toolbar">
    49  				<div class="group">
    50  					<div class="flex-text-block">
    51  						{{svg "octicon-issue-opened" 14}}
    52  						{{ctx.Locale.PrettyNumber (.NumOpenIssues ctx)}}&nbsp;{{ctx.Locale.Tr "repo.issues.open_title"}}
    53  					</div>
    54  					<div class="flex-text-block">
    55  						{{svg "octicon-check" 14}}
    56  						{{ctx.Locale.PrettyNumber (.NumClosedIssues ctx)}}&nbsp;{{ctx.Locale.Tr "repo.issues.closed_title"}}
    57  					</div>
    58  				</div>
    59  				{{if and $.CanWriteProjects (not $.Repository.IsArchived)}}
    60  				<div class="group">
    61  					<a class="flex-text-inline" href="{{.Link ctx}}/edit">{{svg "octicon-pencil" 14}}{{ctx.Locale.Tr "repo.issues.label_edit"}}</a>
    62  					{{if .IsClosed}}
    63  						<a class="link-action flex-text-inline" href data-url="{{.Link ctx}}/open">{{svg "octicon-check" 14}}{{ctx.Locale.Tr "repo.projects.open"}}</a>
    64  					{{else}}
    65  						<a class="link-action flex-text-inline" href data-url="{{.Link ctx}}/close">{{svg "octicon-skip" 14}}{{ctx.Locale.Tr "repo.projects.close"}}</a>
    66  					{{end}}
    67  					<a class="delete-button flex-text-inline" href="#" data-url="{{.Link ctx}}/delete">{{svg "octicon-trash" 14}}{{ctx.Locale.Tr "repo.issues.label_delete"}}</a>
    68  				</div>
    69  				{{end}}
    70  			</div>
    71  			{{if .Description}}
    72  			<div class="content">
    73  				{{.RenderedContent}}
    74  			</div>
    75  			{{end}}
    76  		</li>
    77  	{{end}}
    78  
    79  	{{template "base/paginate" .}}
    80  </div>
    81  
    82  {{if and $.CanWriteProjects (not $.Repository.IsArchived)}}
    83  <div class="ui g-modal-confirm delete modal">
    84  	<div class="header">
    85  		{{svg "octicon-trash"}}
    86  		{{ctx.Locale.Tr "repo.projects.deletion"}}
    87  	</div>
    88  	<div class="content">
    89  		<p>{{ctx.Locale.Tr "repo.projects.deletion_desc"}}</p>
    90  	</div>
    91  	{{template "base/modal_actions_confirm" .}}
    92  </div>
    93  {{end}}