| 
23 | 23 | 						<label>{{ctx.Locale.Tr "repo.template_helper"}}</label>  | 
24 | 24 | 					</div>  | 
25 | 25 | 				</div>  | 
26 |  | -				{{if not .Repository.IsFork}}  | 
27 |  | -					<div class="inline field">  | 
28 |  | -						<label>{{ctx.Locale.Tr "repo.visibility"}}</label>  | 
29 |  | -						<div class="ui checkbox" {{if and (not .Repository.IsPrivate) (gt .Repository.NumStars 0)}}data-tooltip-content="{{ctx.Locale.Tr "repo.stars_remove_warning"}}"{{end}}>  | 
30 |  | -							{{if .IsAdmin}}  | 
31 |  | -								<input name="private" type="checkbox" {{if .Repository.IsPrivate}}checked{{end}}>  | 
32 |  | -							{{else}}  | 
33 |  | -								<input name="private" type="checkbox" {{if .Repository.IsPrivate}}checked{{end}}{{if and $.ForcePrivate .Repository.IsPrivate}} disabled{{end}}>  | 
34 |  | -								{{if and .Repository.IsPrivate $.ForcePrivate}}<input type="hidden" name="private" value="{{.Repository.IsPrivate}}">{{end}}  | 
35 |  | -							{{end}}  | 
36 |  | -							<label>{{ctx.Locale.Tr "repo.visibility_helper"}} {{if .Repository.NumForks}}<span class="text red">{{ctx.Locale.Tr "repo.visibility_fork_helper"}}</span>{{end}}</label>  | 
37 |  | -						</div>  | 
38 |  | -					</div>  | 
39 |  | -				{{end}}  | 
40 | 26 | 				<div class="field {{if .Err_Description}}error{{end}}">  | 
41 | 27 | 					<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>  | 
42 | 28 | 					<textarea id="description" name="description" rows="2" maxlength="2048">{{.Repository.Description}}</textarea>  | 
 | 
786 | 772 | 		</h4>  | 
787 | 773 | 		<div class="ui attached error danger segment">  | 
788 | 774 | 			<div class="flex-list">  | 
 | 775 | +				{{if not .Repository.IsFork}}  | 
 | 776 | +					<div class="flex-item tw-items-center">  | 
 | 777 | +						<div class="flex-item-main">  | 
 | 778 | +							<div class="flex-item-title">{{ctx.Locale.Tr "repo.visibility"}}</div>  | 
 | 779 | +							{{if .Repository.IsPrivate}}  | 
 | 780 | +								<div class="flex-item-body">{{ctx.Locale.Tr "repo.settings.visibility.public.text"}}</div>  | 
 | 781 | +							{{else}}  | 
 | 782 | +								<div class="flex-item-body">{{ctx.Locale.Tr "repo.settings.visibility.private.text"}}</div>  | 
 | 783 | +							{{end}}  | 
 | 784 | +						</div>  | 
 | 785 | +						<div class="flex-item-trailing">  | 
 | 786 | +							<button class="ui basic red show-modal button" data-modal="#visibility-repo-modal">  | 
 | 787 | +								{{if .Repository.IsPrivate}}  | 
 | 788 | +									{{ctx.Locale.Tr "repo.settings.visibility.public.button"}}  | 
 | 789 | +								{{else}}  | 
 | 790 | +									{{ctx.Locale.Tr "repo.settings.visibility.private.button"}}  | 
 | 791 | +								{{end}}  | 
 | 792 | +							</button>  | 
 | 793 | +						</div>  | 
 | 794 | +					</div>  | 
 | 795 | +				{{end}}  | 
789 | 796 | 				{{if .Repository.IsMirror}}  | 
790 | 797 | 					<div class="flex-item">  | 
791 | 798 | 						<div class="flex-item-main">  | 
 | 
1012 | 1019 | 		</div>  | 
1013 | 1020 | 	</div>  | 
1014 | 1021 | 
 
  | 
 | 1022 | +	{{if not .Repository.IsFork}}  | 
 | 1023 | +		<div class="ui g-modal-confirm modal" id="visibility-repo-modal">  | 
 | 1024 | +			<div class="header">  | 
 | 1025 | +				{{ctx.Locale.Tr "repo.visibility"}}  | 
 | 1026 | +			</div>  | 
 | 1027 | +			<div class="content">  | 
 | 1028 | +					{{if .Repository.IsPrivate}}  | 
 | 1029 | +						<p>{{ctx.Locale.Tr "repo.settings.visibility.public.bullet_title"}}</p>  | 
 | 1030 | +						<ul>  | 
 | 1031 | +							<li>{{ctx.Locale.Tr "repo.settings.visibility.public.bullet_one"}}</li>  | 
 | 1032 | +						</ul>  | 
 | 1033 | +					{{else}}  | 
 | 1034 | +						<p>{{ctx.Locale.Tr "repo.settings.visibility.private.bullet_title"}}</p>  | 
 | 1035 | +						<ul>  | 
 | 1036 | +							<li>{{ctx.Locale.Tr "repo.settings.visibility.private.bullet_one"}}</li>  | 
 | 1037 | +							<li>{{ctx.Locale.Tr "repo.settings.visibility.private.bullet_two"}}{{if .Repository.NumForks}}<span class="text red">{{ctx.Locale.Tr "repo.visibility_fork_helper"}}</span>{{end}}</li>  | 
 | 1038 | +						</ul>  | 
 | 1039 | +					{{end}}  | 
 | 1040 | +			</div>  | 
 | 1041 | +			<form action="{{.Link}}" method="post">  | 
 | 1042 | +				{{.CsrfTokenHtml}}  | 
 | 1043 | +				<input type="hidden" name="action" value="visibility">  | 
 | 1044 | +				<input type="hidden" name="repo_id" value="{{.Repository.ID}}">  | 
 | 1045 | +				{{template "base/modal_actions_confirm" .}}  | 
 | 1046 | +			</form>  | 
 | 1047 | +		</div>  | 
 | 1048 | +	{{end}}  | 
 | 1049 | + | 
1015 | 1050 | 	{{if .Repository.UnitEnabled $.Context ctx.Consts.RepoUnitTypeWiki}}  | 
1016 | 1051 | 	<div class="ui small modal" id="delete-wiki-modal">  | 
1017 | 1052 | 		<div class="header">  | 
 | 
0 commit comments