code.gitea.io/gitea@v1.22.3/templates/repo/settings/lfs_locks.tmpl (about)

     1  {{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings lfs")}}
     2  	<div class="user-main-content twelve wide column content repository file list">
     3  		<div class="tab-size-8 non-diff-file-content">
     4  			<h4 class="ui top attached header">
     5  				<a href="{{.LFSFilesLink}}">{{ctx.Locale.Tr "repo.settings.lfs"}}</a> / {{ctx.Locale.Tr "repo.settings.lfs_locks"}} ({{ctx.Locale.Tr "admin.total" .Total}})
     6  			</h4>
     7  			<div class="ui attached segment">
     8  				<form class="ui form ignore-dirty" method="post">
     9  					{{$.CsrfTokenHtml}}
    10  					<div class="ui fluid action input">
    11  						<input name="path" value="" placeholder="{{ctx.Locale.Tr "repo.settings.lfs_lock_path"}}" autofocus>
    12  						<button class="ui primary button">{{ctx.Locale.Tr "repo.settings.lfs_lock"}}</button>
    13  					</div>
    14  				</form>
    15  			</div>
    16  			<table id="lfs-files-locks-table" class="ui attached segment single line table">
    17  				<tbody>
    18  					{{range $index, $lock := .LFSLocks}}
    19  						<tr>
    20  							<td>
    21  								{{if index $.Linkable $index}}
    22  									{{svg "octicon-file"}}
    23  								<a href="{{$.RepoLink}}/src/branch/{{PathEscapeSegments $.Repository.DefaultBranch}}/{{PathEscapeSegments $lock.Path}}" title="{{$lock.Path}}">{{$lock.Path}}</a>
    24  								{{else}}
    25  									{{svg "octicon-diff"}}
    26  								<span data-tooltip-content="{{ctx.Locale.Tr "repo.settings.lfs_lock_file_no_exist"}}">{{$lock.Path}}</span>
    27  								{{end}}
    28  								{{if not (index $.Lockables $index)}}
    29  									<span data-tooltip-content="{{ctx.Locale.Tr "repo.settings.lfs_noattribute"}}">{{svg "octicon-alert"}}</span>
    30  								{{end}}
    31  							</td>
    32  							<td>
    33  								<a href="{{$lock.Owner.HomeLink}}">
    34  									{{ctx.AvatarUtils.Avatar $lock.Owner}}
    35  									{{$lock.Owner.DisplayName}}
    36  								</a>
    37  							</td>
    38  							<td>{{TimeSince .Created ctx.Locale}}</td>
    39  							<td class="right aligned">
    40  								<form action="{{$.LFSFilesLink}}/locks/{{$lock.ID}}/unlock" method="post">
    41  									{{$.CsrfTokenHtml}}
    42  									<button class="ui primary button"><span class="btn-octicon">{{svg "octicon-lock"}}</span>{{ctx.Locale.Tr "repo.settings.lfs_force_unlock"}}</button>
    43  								</form>
    44  							</td>
    45  						</tr>
    46  					{{else}}
    47  						<tr>
    48  							<td colspan="4">{{ctx.Locale.Tr "repo.settings.lfs_locks_no_locks"}}</td>
    49  						</tr>
    50  					{{end}}
    51  				</tbody>
    52  			</table>
    53  			{{template "base/paginate" .}}
    54  		</div>
    55  	</div>
    56  {{template "repo/settings/layout_footer" .}}