diff options
author | Unknwon <u@gogs.io> | 2015-02-22 22:51:25 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-02-22 22:51:25 -0500 |
commit | 7ccab9cd09eca8fa60fdd519c97c259d4b521abd (patch) | |
tree | 914ea87da32fd27d889b2145f559c0fdad8c62af /templates/org | |
parent | 25f5a8d7986a710cef01d02725071d2de0a6b143 (diff) | |
parent | 2369881808a906f3072c935ab0575f08bd358821 (diff) | |
download | gitea-7ccab9cd09eca8fa60fdd519c97c259d4b521abd.tar.gz gitea-7ccab9cd09eca8fa60fdd519c97c259d4b521abd.zip |
Merge branch 'dev' of github.com:gogits/gogs into access
Conflicts:
gogs.go
models/models.go
models/user.go
templates/.VERSION
templates/org/home.tmpl
Diffstat (limited to 'templates/org')
-rw-r--r-- | templates/org/base/header.tmpl | 2 | ||||
-rw-r--r-- | templates/org/home.tmpl | 140 | ||||
-rw-r--r-- | templates/org/settings/nav.tmpl | 20 | ||||
-rw-r--r-- | templates/org/settings/options.tmpl | 114 |
4 files changed, 138 insertions, 138 deletions
diff --git a/templates/org/base/header.tmpl b/templates/org/base/header.tmpl index 1bbb092bf5..1649b92090 100644 --- a/templates/org/base/header.tmpl +++ b/templates/org/base/header.tmpl @@ -2,7 +2,7 @@ <div class="container"> <a class="text-black left" href="{{AppSubUrl}}/org/{{.Org.LowerName}}"> <img class="avatar-48 left" src="{{.Org.AvatarLink}}?s=100"> - <span class="org-name">{{.Org.FullName}}</span> + <span class="org-name">{{if .Org.FullName}}{{.Org.FullName}}{{else}}{{.Org.Name}}{{end}}</span> </a> <ul class="menu menu-line container"> <li class="right"> diff --git a/templates/org/home.tmpl b/templates/org/home.tmpl index 4929a88198..fdce06a298 100644 --- a/templates/org/home.tmpl +++ b/templates/org/home.tmpl @@ -9,85 +9,85 @@ {{if .IsOrganizationOwner}}<a class="text-grey" href="{{.OrgLink}}/settings"><span class="octicon octicon-gear"></span></a>{{end}} </h2> {{if .Org.Description}}<p>{{.Org.Description}}</p>{{end}} - <ul class="text-grey"> - {{if .Org.Location}}<li><span class="octicon octicon-location"></span> <span>{{.Org.Location}}</span></li>{{end}} - {{if .Org.Website}}<li><span class="octicon octicon-link"></span> <a target="_blank" href="{{.Org.Website}}">{{.Org.Website}}</a></li>{{end}} - {{if .Org.Email}}<li><span class="octicon octicon-mail"></span> <a href="mailto:{{.Org.Email}}">{{.Org.Email}}</a></li>{{end}} - </ul> + <ul class="text-grey"> + {{if .Org.Location}}<li><span class="octicon octicon-location"></span> <span>{{.Org.Location}}</span></li>{{end}} + {{if .Org.Website}}<li><span class="octicon octicon-link"></span> <a target="_blank" href="{{.Org.Website}}">{{.Org.Website}}</a></li>{{end}} + {{if .Org.Email}}<li><span class="octicon octicon-mail"></span> <a href="mailto:{{.Org.Email}}">{{.Org.Email}}</a></li>{{end}} + </ul> </div> </div> </div> <div class="container"> {{$isMember := .Org.IsOrgMember $.SignedUser.Id}} - <div id="org-home-repo-list" class="left grid-2-3"> - <div class="clear"> - {{if .IsOrganizationOwner}} - <a class="btn btn-green btn-large btn-link btn-radius right" href="{{AppSubUrl}}/repo/create?org={{.Org.Id}}"><i class="octicon octicon-repo-create"></i> {{.i18n.Tr "new_repo"}}</a> - {{end}} - </div> - <div id="org-repo-list"> - {{range .Repos}} - {{if .HasAccess $.SignedUser}} - <div class="org-repo-item"> - <ul class="org-repo-status right"> - <li><i class="octicon octicon-star"></i> {{.NumStars}}</li> - <li><i class="octicon octicon-git-branch"></i> {{.NumForks}}</li> - </ul> - <h2><a href="{{AppSubUrl}}/{{$.Org.Name}}/{{.Name}}">{{.Name}}</a></h2> - <p class="org-repo-description">{{.Description}}</p> - <p class="org-repo-updated">{{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Updated $.i18n.Lang}}</p> - </div> - {{end}} + <div id="org-home-repo-list" class="left grid-2-3"> + <div class="clear"> + {{if .IsOrganizationOwner}} + <a class="btn btn-green btn-large btn-link btn-radius right" href="{{AppSubUrl}}/repo/create?org={{.Org.Id}}"><i class="octicon octicon-repo-create"></i> {{.i18n.Tr "new_repo"}}</a> + {{end}} + </div> + <div id="org-repo-list"> + {{range .Repos}} + {{if or (not .IsPrivate) (.HasAccess $.SignedUser)}} + <div class="org-repo-item"> + <ul class="org-repo-status right"> + <li><i class="octicon octicon-star"></i> {{.NumStars}}</li> + <li><i class="octicon octicon-git-branch"></i> {{.NumForks}}</li> + </ul> + <h2><a href="{{AppSubUrl}}/{{$.Org.Name}}/{{.Name}}">{{.Name}}</a></h2> + <p class="org-repo-description">{{.Description}}</p> + <p class="org-repo-updated">{{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Updated $.i18n.Lang}}</p> + </div> {{end}} - </div> + {{end}} </div> - <div class="grid-1-3 right"> - <div class="org-sidebar"> - <div class="panel panel-radius"> - <div class="panel-header"> - {{if $isMember}} - <a class="text-grey right" href="{{AppSubUrl}}/org/{{.Org.LowerName}}/members"><strong>{{.Org.NumMembers}}</strong><span class="octicon octicon-chevron-right"></span></a> - {{end}} - <strong>{{.i18n.Tr "org.people"}}</strong> - </div> - <div class="panel-body member-avatar-group"> - {{range .Members}} + </div> + <div class="grid-1-3 right"> + <div class="org-sidebar"> + <div class="panel panel-radius"> + <div class="panel-header"> + {{if $isMember}} + <a class="text-grey right" href="{{AppSubUrl}}/org/{{.Org.LowerName}}/members"><strong>{{.Org.NumMembers}}</strong><span class="octicon octicon-chevron-right"></span></a> + {{end}} + <strong>{{.i18n.Tr "org.people"}}</strong> + </div> + <div class="panel-body member-avatar-group"> + {{range .Members}} {{if or $isMember (.IsPublicMember $.Org.Id)}} - <a href="{{AppSubUrl}}/{{.Name}}" title="{{.Name}}"><img src="{{.AvatarLink}}"></a> - {{end}} + <a href="{{AppSubUrl}}/{{.Name}}" title="{{.Name}}"><img src="{{.AvatarLink}}"></a> {{end}} - </div> - {{if .IsOrganizationOwner}} - <div class="panel-footer"> - <a class="btn btn-medium btn-blue btn-link btn-radius" href="{{AppSubUrl}}/org/{{.Org.LowerName}}/invitations/new">{{.i18n.Tr "org.invite_someone"}}</a> - </div> - {{end}} - </div> - {{if $isMember}} - <br> - <div class="panel panel-radius"> - <div class="panel-header"> - <a class="text-grey right" href="{{AppSubUrl}}/org/{{.Org.LowerName}}/teams"><strong>{{.Org.NumTeams}}</strong><span class="octicon octicon-chevron-right"></span></a> - <strong>{{.i18n.Tr "org.teams"}}</strong> - </div> - <div class="panel-body" id="org-home-team-list"> - <ul> - {{range .Teams}} - <li> - <a class="text-black" href="{{AppSubUrl}}/org/{{$.Org.LowerName}}/teams/{{.LowerName}}"><strong class="team-name">{{.Name}}</strong></a> - <p class="team-meta">{{.NumMembers}} {{$.i18n.Tr "org.lower_members"}} · {{.NumRepos}} {{$.i18n.Tr "org.lower_repositories"}}</p> - </li> - {{end}} - </ul> - </div> - {{if .IsOrganizationOwner}} - <div class="panel-footer"> - <a class="btn btn-medium btn-blue btn-link btn-radius" href="{{AppSubUrl}}/org/{{$.Org.LowerName}}/teams/new">{{.i18n.Tr "org.create_new_team"}}</a> - </div> - {{end}} - </div> - {{end}} + {{end}} + </div> + {{if .IsOrganizationOwner}} + <div class="panel-footer"> + <a class="btn btn-medium btn-blue btn-link btn-radius" href="{{AppSubUrl}}/org/{{.Org.LowerName}}/invitations/new">{{.i18n.Tr "org.invite_someone"}}</a> + </div> + {{end}} </div> - </div> + {{if $isMember}} + <br> + <div class="panel panel-radius"> + <div class="panel-header"> + <a class="text-grey right" href="{{AppSubUrl}}/org/{{.Org.LowerName}}/teams"><strong>{{.Org.NumTeams}}</strong><span class="octicon octicon-chevron-right"></span></a> + <strong>{{.i18n.Tr "org.teams"}}</strong> + </div> + <div class="panel-body" id="org-home-team-list"> + <ul> + {{range .Teams}} + <li> + <a class="text-black" href="{{AppSubUrl}}/org/{{$.Org.LowerName}}/teams/{{.LowerName}}"><strong class="team-name">{{.Name}}</strong></a> + <p class="team-meta">{{.NumMembers}} {{$.i18n.Tr "org.lower_members"}} · {{.NumRepos}} {{$.i18n.Tr "org.lower_repositories"}}</p> + </li> + {{end}} + </ul> + </div> + {{if .IsOrganizationOwner}} + <div class="panel-footer"> + <a class="btn btn-medium btn-blue btn-link btn-radius" href="{{AppSubUrl}}/org/{{$.Org.LowerName}}/teams/new">{{.i18n.Tr "org.create_new_team"}}</a> + </div> + {{end}} + </div> + {{end}} + </div> + </div> </div> {{template "ng/base/footer" .}}
\ No newline at end of file diff --git a/templates/org/settings/nav.tmpl b/templates/org/settings/nav.tmpl index 11d32d7f67..1285c4ab94 100644 --- a/templates/org/settings/nav.tmpl +++ b/templates/org/settings/nav.tmpl @@ -1,12 +1,12 @@ <div id="setting-menu" class="grid-1-5 panel panel-radius left"> - <div class="panel-header"> - <strong>{{.i18n.Tr "org.settings"}}</strong> - </div> - <div class="panel-body"> - <ul class="menu menu-vertical switching-list grid-1-5 left"> - <li {{if .PageIsSettingsOptions}}class="current"{{end}}><a href="{{AppSubUrl}}/org/{{.Org.LowerName}}/settings">{{.i18n.Tr "org.settings.options"}}</a></li> - <li {{if .PageIsSettingsHooks}}class="current"{{end}}><a href="{{AppSubUrl}}/org/{{.Org.LowerName}}/settings/hooks">{{.i18n.Tr "repo.settings.hooks"}}</a></li> - <li {{if .PageIsSettingsDelete}}class="current"{{end}}><a href="{{AppSubUrl}}/org/{{.Org.LowerName}}/settings/delete">{{.i18n.Tr "org.settings.delete"}}</a></li> - </ul> - </div> + <div class="panel-header"> + <strong>{{.i18n.Tr "org.settings"}}</strong> + </div> + <div class="panel-body"> + <ul class="menu menu-vertical switching-list grid-1-5 left"> + <li {{if .PageIsSettingsOptions}}class="current"{{end}}><a href="{{AppSubUrl}}/org/{{.Org.Name}}/settings">{{.i18n.Tr "org.settings.options"}}</a></li> + <li {{if .PageIsSettingsHooks}}class="current"{{end}}><a href="{{AppSubUrl}}/org/{{.Org.Name}}/settings/hooks">{{.i18n.Tr "repo.settings.hooks"}}</a></li> + <li {{if .PageIsSettingsDelete}}class="current"{{end}}><a href="{{AppSubUrl}}/org/{{.Org.Name}}/settings/delete">{{.i18n.Tr "org.settings.delete"}}</a></li> + </ul> + </div> </div> diff --git a/templates/org/settings/options.tmpl b/templates/org/settings/options.tmpl index 1ed7acb56e..1179ede620 100644 --- a/templates/org/settings/options.tmpl +++ b/templates/org/settings/options.tmpl @@ -2,63 +2,63 @@ {{template "ng/base/header" .}} {{template "org/base/header" .}} <div id="setting-wrapper" class="main-wrapper"> - <div id="org-setting" class="container clear"> - {{template "org/settings/nav" .}} - <div class="grid-4-5 left"> - <div class="setting-content"> - {{template "ng/base/alert" .}} - <div id="setting-content"> - <div id="user-profile-setting-content" class="panel panel-radius"> - <div class="panel-header"> - <strong>{{.i18n.Tr "org.settings.options"}}</strong> - </div> - <form class="form form-align panel-body" id="org-setting-form" action="{{AppSubUrl}}/org/{{.Org.LowerName}}/settings" method="post"> - {{.CsrfTokenHtml}} - <input type="hidden" name="action" value="update"> - <div class="field"> - <label class="req" for="orgname">{{.i18n.Tr "username"}}</label> - <input class="ipt ipt-large ipt-radius {{if .Err_UserName}}ipt-error{{end}}" id="orgname" name="uname" value="{{.Org.Name}}" data-orgname="{{.Org.Name}}" required /> - </div> - <div class="white-popup-block mfp-hide" id="change-orgname-modal"> - <h1 class="text-red">{{.i18n.Tr "org.settings.change_orgname"}}</h1> - <p>{{.i18n.Tr "org.settings.change_orgname_desc"}}</p> - <br> - <button class="btn btn-red btn-large btn-radius" id="change-orgname-submit">{{.i18n.Tr "settings.continue"}}</button> - <button class="btn btn-large btn-radius popup-modal-dismiss">{{.i18n.Tr "settings.cancel"}}</button> - </div> - <div class="field"> - <label for="full-name">{{.i18n.Tr "org.settings.full_name"}}</label> - <input class="ipt ipt-large ipt-radius {{if .Err_FullName}}ipt-error{{end}}" id="full-name" name="fullname" value="{{.Org.FullName}}" /> - </div> - <div class="field"> - <label class="req" for="email">{{.i18n.Tr "email"}}</label> - <input class="ipt ipt-large ipt-radius {{if .Err_Email}}ipt-error{{end}}" id="email" name="email" type="email" value="{{.Org.Email}}" required /> - </div> - <div class="field clear"> - <label class="left" for="desc">{{.i18n.Tr "org.org_desc"}}</label> - <textarea class="ipt ipt-large ipt-radius {{if .Err_Description}}ipt-error{{end}}" id="desc" name="desc">{{.Org.Description}}</textarea> - </div> - <div class="field"> - <label for="website">{{.i18n.Tr "org.settings.website"}}</label> - <input class="ipt ipt-large ipt-radius {{if .Err_Website}}ipt-error{{end}}" id="website" name="website" type="url" value="{{.Org.Website}}" /> - </div> - <div class="field"> - <label for="location">{{.i18n.Tr "org.settings.location"}}</label> - <input class="ipt ipt-large ipt-radius {{if .Err_Location}}ipt-error{{end}}" id="location" name="location" type="text" value="{{.Org.Location}}" /> - </div> - <div class="field"> - <label for="gravatar-email">Gravatar {{.i18n.Tr "email"}}</label> - <input class="ipt ipt-large ipt-radius {{if .Err_Avatar}}ipt-error{{end}}" id="gravatar-email" name="avatar" type="text" value="{{.Org.AvatarEmail}}" /> - </div> - <div class="field"> - <span class="form-label"></span> - <button class="btn btn-green btn-large btn-radius" id="change-orgname-btn" href="#change-orgname-modal">{{.i18n.Tr "org.settings.update_settings"}}</button> - </div> - </form> - </div> - </div> + <div id="org-setting" class="container clear"> + {{template "org/settings/nav" .}} + <div class="grid-4-5 left"> + <div class="setting-content"> + {{template "ng/base/alert" .}} + <div id="setting-content"> + <div id="user-profile-setting-content" class="panel panel-radius"> + <div class="panel-header"> + <strong>{{.i18n.Tr "org.settings.options"}}</strong> </div> - </div> - </div> + <form class="form form-align panel-body" id="org-setting-form" action="{{AppSubUrl}}/org/{{.Org.LowerName}}/settings" method="post"> + {{.CsrfTokenHtml}} + <input type="hidden" name="action" value="update"> + <div class="field"> + <label class="req" for="orgname">{{.i18n.Tr "username"}}</label> + <input class="ipt ipt-large ipt-radius {{if .Err_UserName}}ipt-error{{end}}" id="orgname" name="uname" value="{{.Org.Name}}" data-orgname="{{.Org.Name}}" required /> + </div> + <div class="white-popup-block mfp-hide" id="change-orgname-modal"> + <h1 class="text-red">{{.i18n.Tr "org.settings.change_orgname"}}</h1> + <p>{{.i18n.Tr "org.settings.change_orgname_desc"}}</p> + <br> + <button class="btn btn-red btn-large btn-radius" id="change-orgname-submit">{{.i18n.Tr "settings.continue"}}</button> + <button class="btn btn-large btn-radius popup-modal-dismiss">{{.i18n.Tr "settings.cancel"}}</button> + </div> + <div class="field"> + <label for="full-name">{{.i18n.Tr "org.settings.full_name"}}</label> + <input class="ipt ipt-large ipt-radius {{if .Err_FullName}}ipt-error{{end}}" id="full-name" name="fullname" value="{{.Org.FullName}}" /> + </div> + <div class="field"> + <label class="req" for="email">{{.i18n.Tr "email"}}</label> + <input class="ipt ipt-large ipt-radius {{if .Err_Email}}ipt-error{{end}}" id="email" name="email" type="email" value="{{.Org.Email}}" required /> + </div> + <div class="field clear"> + <label class="left" for="desc">{{.i18n.Tr "org.org_desc"}}</label> + <textarea class="ipt ipt-large ipt-radius {{if .Err_Description}}ipt-error{{end}}" id="desc" name="desc">{{.Org.Description}}</textarea> + </div> + <div class="field"> + <label for="website">{{.i18n.Tr "org.settings.website"}}</label> + <input class="ipt ipt-large ipt-radius {{if .Err_Website}}ipt-error{{end}}" id="website" name="website" type="url" value="{{.Org.Website}}" /> + </div> + <div class="field"> + <label for="location">{{.i18n.Tr "org.settings.location"}}</label> + <input class="ipt ipt-large ipt-radius {{if .Err_Location}}ipt-error{{end}}" id="location" name="location" type="text" value="{{.Org.Location}}" /> + </div> + <div class="field"> + <label for="gravatar-email">Gravatar {{.i18n.Tr "email"}}</label> + <input class="ipt ipt-large ipt-radius {{if .Err_Avatar}}ipt-error{{end}}" id="gravatar-email" name="avatar" type="text" value="{{.Org.AvatarEmail}}" /> + </div> + <div class="field"> + <span class="form-label"></span> + <button class="btn btn-green btn-large btn-radius" id="change-orgname-btn" href="#change-orgname-modal">{{.i18n.Tr "org.settings.update_settings"}}</button> + </div> + </form> + </div> + </div> + </div> + </div> + </div> </div> {{template "ng/base/footer" .}}
\ No newline at end of file |