Adding visual cue for "Limited" & "Private" organizations. (#13040)
* Adding visual cue for "Limited" & "Private" organizations. * Moving org visibility CSS styles to .less files. Co-authored-by: Gitea <gitea@fake.local> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
		
							parent
							
								
									df4bbcd235
								
							
						
					
					
						commit
						6eea301829
					
				
					 6 changed files with 31 additions and 2 deletions
				
			
		|  | @ -1869,7 +1869,9 @@ settings.repoadminchangeteam = Repository admin can add and remove access for te | |||
| settings.visibility = Visibility | ||||
| settings.visibility.public = Public | ||||
| settings.visibility.limited = Limited (Visible to logged in users only) | ||||
| settings.visibility.limited_shortname = Limited | ||||
| settings.visibility.private = Private (Visible only to organization members) | ||||
| settings.visibility.private_shortname = Private | ||||
| 
 | ||||
| settings.update_settings = Update Settings | ||||
| settings.update_setting_success = Organization settings have been updated. | ||||
|  |  | |||
|  | @ -5,7 +5,10 @@ | |||
| 				<div class="ui header"> | ||||
| 					<img class="ui image" src="{{.SizedRelAvatarLink 100}}"> | ||||
| 					<span class="text thin grey"><a href="{{.HomeLink}}">{{.DisplayName}}</a></span> | ||||
| 
 | ||||
| 					<span class="org-visibility"> | ||||
| 						{{if .Visibility.IsLimited}}<div class="ui medium orange horizontal label">{{$.i18n.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}} | ||||
| 						{{if .Visibility.IsPrivate}}<div class="ui medium red horizontal label">{{$.i18n.Tr "org.settings.visibility.private_shortname"}}</div>{{end}} | ||||
| 					</span> | ||||
| 					<div class="ui right"> | ||||
| 						<div class="ui menu"> | ||||
| 							<a class="{{if $.PageIsOrgMembers}}active{{end}} item" href="{{$.OrgLink}}/members"> | ||||
|  |  | |||
|  | @ -7,6 +7,10 @@ | |||
| 		<div id="org-info"> | ||||
| 			<div class="ui header"> | ||||
| 				{{.Org.DisplayName}} | ||||
| 				<span class="org-visibility"> | ||||
| 					{{if .Org.Visibility.IsLimited}}<div class="ui large orange horizontal label">{{.i18n.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}} | ||||
| 					{{if .Org.Visibility.IsPrivate}}<div class="ui large red horizontal label">{{.i18n.Tr "org.settings.visibility.private_shortname"}}</div>{{end}} | ||||
| 				</span> | ||||
| 				{{if .IsOrganizationOwner}}<a class="middle text grey" href="{{.OrgLink}}/settings">{{svg "octicon-gear"}}</a>{{end}} | ||||
| 			</div> | ||||
| 			{{if .Org.Description}}<p class="desc">{{.Org.Description}}</p>{{end}} | ||||
|  |  | |||
|  | @ -5,6 +5,12 @@ | |||
| 				<span class="text"> | ||||
| 					<img class="ui avatar image" src="{{.ContextUser.RelAvatarLink}}" title="{{.ContextUser.Name}}" width="28" height="28"> | ||||
| 					{{.ContextUser.ShortName 20}} | ||||
| 					{{if .ContextUser.IsOrganization}} | ||||
| 						<span class="org-visibility"> | ||||
| 							{{if .ContextUser.Visibility.IsLimited}}<div class="ui orange tiny horizontal label">{{.i18n.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}} | ||||
| 							{{if .ContextUser.Visibility.IsPrivate}}<div class="ui red tiny horizontal label">{{.i18n.Tr "org.settings.visibility.private_shortname"}}</div>{{end}} | ||||
| 						</span> | ||||
| 					{{end}} | ||||
| 					<i class="dropdown icon"></i> | ||||
| 				</span> | ||||
| 				<div class="context user overflow menu" tabindex="-1"> | ||||
|  | @ -20,6 +26,10 @@ | |||
| 							<a class="{{if eq $.ContextUser.ID .ID}}active selected{{end}} item" title="{{.Name}}" href="{{AppSubUrl}}/org/{{.Name}}/{{if $.PageIsIssues}}issues{{else if $.PageIsPulls}}pulls{{else if $.PageIsMilestonesDashboard}}milestones{{else}}dashboard{{end}}"> | ||||
| 								<img class="ui avatar image" src="{{.RelAvatarLink}}" width="28" height="28"> | ||||
| 								{{.ShortName 20}} | ||||
| 								<span class="org-visibility"> | ||||
| 									{{if .Visibility.IsLimited}}<div class="ui orange tiny horizontal label">{{$.i18n.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}} | ||||
| 									{{if .Visibility.IsPrivate}}<div class="ui red tiny horizontal label">{{$.i18n.Tr "org.settings.visibility.private_shortname"}}</div>{{end}} | ||||
| 								</span> | ||||
| 							</a> | ||||
| 						{{end}} | ||||
| 					</div> | ||||
|  |  | |||
|  | @ -74,6 +74,9 @@ | |||
|   .dashboard-navbar { | ||||
|     width: 100vw; | ||||
|     padding: 0 .5rem; | ||||
|     .org-visibility .label { | ||||
|       margin-left: 5px; | ||||
|     } | ||||
|   } | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -8,7 +8,10 @@ | |||
|         font-size: 1.6rem; | ||||
|         margin-left: 15px; | ||||
|       } | ||||
| 
 | ||||
|       .org-visibility .label { | ||||
|         margin-left: 5px; | ||||
|         margin-top: 5px; | ||||
|       } | ||||
|       .ui.right { | ||||
|         margin-top: 5px; | ||||
|       } | ||||
|  | @ -43,6 +46,10 @@ | |||
|       .ui.header { | ||||
|         font-size: 36px; | ||||
|         margin-bottom: 0; | ||||
|         .org-visibility .label { | ||||
|           margin-left: 5px; | ||||
|           margin-top: 2px; | ||||
|         } | ||||
|       } | ||||
| 
 | ||||
|       .desc { | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue