summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-03-05 20:45:23 -0500
committerUnknwon <u@gogs.io>2016-03-05 20:45:23 -0500
commita5b0400be7c8868b685403e0718bdd66149c3e84 (patch)
tree6db3f4999fa43e0b8a384ca4da8885aa00a4de8f /templates
parent045f14fbd0e3553521f5092cf839be363c74a090 (diff)
downloadgitea-a5b0400be7c8868b685403e0718bdd66149c3e84.tar.gz
gitea-a5b0400be7c8868b685403e0718bdd66149c3e84.zip
#1146 finish new access rights for collaborators
Diffstat (limited to 'templates')
-rw-r--r--templates/.VERSION2
-rw-r--r--templates/repo/issue/labels.tmpl6
-rw-r--r--templates/repo/issue/milestone_new.tmpl2
-rw-r--r--templates/repo/issue/milestones.tmpl6
-rw-r--r--templates/repo/issue/view_content.tmpl10
-rw-r--r--templates/repo/release/list.tmpl4
-rw-r--r--templates/repo/settings/options.tmpl234
-rw-r--r--templates/repo/wiki/start.tmpl2
-rw-r--r--templates/repo/wiki/view.tmpl2
9 files changed, 136 insertions, 132 deletions
diff --git a/templates/.VERSION b/templates/.VERSION
index 505aa1c97e..45a33980c6 100644
--- a/templates/.VERSION
+++ b/templates/.VERSION
@@ -1 +1 @@
-0.8.58.0305 \ No newline at end of file
+0.8.59.0305 \ No newline at end of file
diff --git a/templates/repo/issue/labels.tmpl b/templates/repo/issue/labels.tmpl
index 7fef4390c8..1edb15bccf 100644
--- a/templates/repo/issue/labels.tmpl
+++ b/templates/repo/issue/labels.tmpl
@@ -4,7 +4,7 @@
<div class="ui container">
<div class="navbar">
{{template "repo/issue/navbar" .}}
- {{if .IsRepositoryAdmin}}
+ {{if .IsRepositoryWriter}}
<div class="ui right">
<div class="ui green new-label button">{{.i18n.Tr "repo.issues.new_label"}}</div>
</div>
@@ -40,7 +40,7 @@
{{range .Labels}}
<li class="item">
<div class="ui label" style="color: {{.ForegroundColor}}; background-color: {{.Color}}"><i class="octicon octicon-tag"></i> {{.Name}}</div>
- {{if $.IsRepositoryAdmin}}
+ {{if $.IsRepositoryWriter}}
<a class="ui right delete-button" href="#" data-url="{{$.RepoLink}}/labels/delete" data-id="{{.ID}}"><i class="octicon octicon-trashcan"></i> {{$.i18n.Tr "repo.issues.label_delete"}}</a>
<a class="ui right edit-label-button" href="#" data-id={{.ID}} data-title={{.Name}} data-color={{.Color}}><i class="octicon octicon-pencil"></i> {{$.i18n.Tr "repo.issues.label_edit"}}</a>
{{end}}
@@ -51,7 +51,7 @@
</div>
</div>
-{{if .IsRepositoryAdmin}}
+{{if .IsRepositoryWriter}}
<div class="ui small basic delete modal">
<div class="ui icon header">
<i class="trash icon"></i>
diff --git a/templates/repo/issue/milestone_new.tmpl b/templates/repo/issue/milestone_new.tmpl
index 88dc806b4e..bd2f79389a 100644
--- a/templates/repo/issue/milestone_new.tmpl
+++ b/templates/repo/issue/milestone_new.tmpl
@@ -4,7 +4,7 @@
<div class="ui container">
<div class="navbar">
{{template "repo/issue/navbar" .}}
- {{if and .IsRepositoryAdmin .PageIsEditMilestone}}
+ {{if and .IsRepositoryWriter .PageIsEditMilestone}}
<div class="ui right floated secondary menu">
<a class="ui green button" href="{{$.RepoLink}}/milestones/new">{{.i18n.Tr "repo.milestones.new"}}</a>
</div>
diff --git a/templates/repo/issue/milestones.tmpl b/templates/repo/issue/milestones.tmpl
index f80eed8c54..038eaabd8f 100644
--- a/templates/repo/issue/milestones.tmpl
+++ b/templates/repo/issue/milestones.tmpl
@@ -4,7 +4,7 @@
<div class="ui container">
<div class="navbar">
{{template "repo/issue/navbar" .}}
- {{if .IsRepositoryAdmin}}
+ {{if .IsRepositoryWriter}}
<div class="ui right">
<a class="ui green button" href="{{$.Link}}/new">{{.i18n.Tr "repo.milestones.new"}}</a>
</div>
@@ -49,7 +49,7 @@
<i class="octicon octicon-issue-closed"></i> {{$.i18n.Tr "repo.issues.close_tab" .NumClosedIssues}}
</span>
</div>
- {{if $.IsRepositoryAdmin}}
+ {{if $.IsRepositoryWriter}}
<div class="ui right operate">
<a href="{{$.Link}}/{{.ID}}/edit" data-id={{.ID}} data-title={{.Name}}><i class="octicon octicon-pencil"></i> {{$.i18n.Tr "repo.issues.label_edit"}}</a>
{{if .IsClosed}}
@@ -93,7 +93,7 @@
</div>
</div>
-{{if .IsRepositoryAdmin}}
+{{if .IsRepositoryWriter}}
<div class="ui small basic delete modal">
<div class="ui icon header">
<i class="trash icon"></i>
diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl
index 1b03c94d01..30687a2bb8 100644
--- a/templates/repo/issue/view_content.tmpl
+++ b/templates/repo/issue/view_content.tmpl
@@ -65,7 +65,7 @@
{{if eq .ShowTag 1}}
{{$.i18n.Tr "repo.issues.poster"}}
{{else if eq .ShowTag 2}}
- {{$.i18n.Tr "repo.issues.admin"}}
+ {{$.i18n.Tr "repo.issues.collaborator"}}
{{else if eq .ShowTag 3}}
{{$.i18n.Tr "repo.issues.owner"}}
{{end}}
@@ -165,7 +165,7 @@
<span class="octicon octicon-check"></span>
{{$.i18n.Tr "repo.pulls.can_auto_merge_desc"}}
</div>
- {{if .IsRepositoryAdmin}}
+ {{if .IsRepositoryWriter}}
<div class="ui divider"></div>
<div>
<form class="ui form" action="{{.Link}}/merge" method="post">
@@ -231,7 +231,7 @@
<div class="four wide column">
<div class="ui segment metas">
- <div class="ui {{if not .IsRepositoryAdmin}}disabled{{end}} floating jump select-label dropdown">
+ <div class="ui {{if not .IsRepositoryWriter}}disabled{{end}} floating jump select-label dropdown">
<span class="text">
<strong>{{.i18n.Tr "repo.issues.new.labels"}}</strong>
<span class="octicon octicon-gear"></span>
@@ -252,7 +252,7 @@
<div class="ui divider"></div>
- <div class="ui {{if not .IsRepositoryAdmin}}disabled{{end}} floating jump select-milestone dropdown">
+ <div class="ui {{if not .IsRepositoryWriter}}disabled{{end}} floating jump select-milestone dropdown">
<span class="text">
<strong>{{.i18n.Tr "repo.issues.new.milestone"}}</strong>
<span class="octicon octicon-gear"></span>
@@ -293,7 +293,7 @@
<div class="ui divider"></div>
<input id="assignee_id" name="assignee_id" type="hidden" value="{{.assignee_id}}">
- <div class="ui {{if not .IsRepositoryAdmin}}disabled{{end}} floating jump select-assignee dropdown">
+ <div class="ui {{if not .IsRepositoryWriter}}disabled{{end}} floating jump select-assignee dropdown">
<span class="text">
<strong>{{.i18n.Tr "repo.issues.new.assignee"}}</strong>
<span class="octicon octicon-gear"></span>
diff --git a/templates/repo/release/list.tmpl b/templates/repo/release/list.tmpl
index 295ca0b3bd..cc12f18e03 100644
--- a/templates/repo/release/list.tmpl
+++ b/templates/repo/release/list.tmpl
@@ -5,7 +5,7 @@
{{template "base/alert" .}}
<h2 class="ui header">
{{.i18n.Tr "repo.release.releases"}}
- {{if .IsRepositoryAdmin}}
+ {{if .IsRepositoryWriter}}
<div class="ui right">
<a class="ui small green button" href="{{$.RepoLink}}/releases/new">
{{.i18n.Tr "repo.release.new_release"}}
@@ -37,7 +37,7 @@
{{if .PublisherID}}
<h3>
<a href="{{$.RepoLink}}/src/{{.TagName}}">{{.Title}}</a>
- {{if $.IsRepositoryAdmin}}<small>(<a href="{{$.RepoLink}}/releases/edit/{{.TagName}}" rel="nofollow">{{$.i18n.Tr "repo.release.edit"}}</a>)</small>{{end}}
+ {{if $.IsRepositoryWriter}}<small>(<a href="{{$.RepoLink}}/releases/edit/{{.TagName}}" rel="nofollow">{{$.i18n.Tr "repo.release.edit"}}</a>)</small>{{end}}
</h3>
<p class="text grey">
<span class="author">
diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl
index da1b595ddc..75cfd34adf 100644
--- a/templates/repo/settings/options.tmpl
+++ b/templates/repo/settings/options.tmpl
@@ -136,6 +136,7 @@
</form>
</div>
+ {{if .IsRepositoryOwner}}
<h4 class="ui top attached warning header">
{{.i18n.Tr "repo.settings.danger_zone"}}
</h4>
@@ -189,145 +190,148 @@
</div>
</div>
</div>
+ {{end}}
</div>
</div>
</div>
</div>
-{{if .Repository.IsMirror}}
-<div class="ui small modal" id="convert-repo-modal">
- <div class="header">
- {{.i18n.Tr "repo.settings.convert"}}
- </div>
- <div class="content">
- <div class="ui warning message text left">
- {{.i18n.Tr "repo.settings.convert_notices_1" | Safe}}
+{{if .IsRepositoryOwner}}
+ {{if .Repository.IsMirror}}
+ <div class="ui small modal" id="convert-repo-modal">
+ <div class="header">
+ {{.i18n.Tr "repo.settings.convert"}}
</div>
- <form class="ui form" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
- <input type="hidden" name="action" value="convert">
- <div class="field">
- <label>
- {{.i18n.Tr "repo.settings.transfer_form_title"}}
- <span class="text red">{{.Repository.Name}}</span>
- </label>
- </div>
- <div class="required field">
- <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
- <input id="repo_name" name="repo_name" required>
+ <div class="content">
+ <div class="ui warning message text left">
+ {{.i18n.Tr "repo.settings.convert_notices_1" | Safe}}
</div>
+ <form class="ui form" action="{{.Link}}" method="post">
+ {{.CsrfTokenHtml}}
+ <input type="hidden" name="action" value="convert">
+ <div class="field">
+ <label>
+ {{.i18n.Tr "repo.settings.transfer_form_title"}}
+ <span class="text red">{{.Repository.Name}}</span>
+ </label>
+ </div>
+ <div class="required field">
+ <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
+ <input id="repo_name" name="repo_name" required>
+ </div>
- <div class="text right actions">
- <div class="ui cancel button">{{.i18n.Tr "settings.cancel"}}</div>
- <button class="ui red button">{{.i18n.Tr "repo.settings.convert_confirm"}}</button>
- </div>
- </form>
+ <div class="text right actions">
+ <div class="ui cancel button">{{.i18n.Tr "settings.cancel"}}</div>
+ <button class="ui red button">{{.i18n.Tr "repo.settings.convert_confirm"}}</button>
+ </div>
+ </form>
+ </div>
</div>
-</div>
-{{end}}
+ {{end}}
-<div class="ui small modal" id="transfer-repo-modal">
- <div class="header">
- {{.i18n.Tr "repo.settings.transfer"}}
- </div>
- <div class="content">
- <div class="ui warning message text left">
- {{.i18n.Tr "repo.settings.transfer_notices_1" | Safe}} <br>
- {{.i18n.Tr "repo.settings.transfer_notices_2" | Safe}}
+ <div class="ui small modal" id="transfer-repo-modal">
+ <div class="header">
+ {{.i18n.Tr "repo.settings.transfer"}}
</div>
- <form class="ui form" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
- <input type="hidden" name="action" value="transfer">
- <div class="field">
- <label>
- {{.i18n.Tr "repo.settings.transfer_form_title"}}
- <span class="text red">{{.Repository.Name}}</span>
- </label>
- </div>
- <div class="required field">
- <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
- <input id="repo_name" name="repo_name" required>
- </div>
- <div class="required field">
- <label for="new_owner_name">{{.i18n.Tr "repo.settings.transfer_owner"}}</label>
- <input id="new_owner_name" name="new_owner_name" required>
+ <div class="content">
+ <div class="ui warning message text left">
+ {{.i18n.Tr "repo.settings.transfer_notices_1" | Safe}} <br>
+ {{.i18n.Tr "repo.settings.transfer_notices_2" | Safe}}
</div>
+ <form class="ui form" action="{{.Link}}" method="post">
+ {{.CsrfTokenHtml}}
+ <input type="hidden" name="action" value="transfer">
+ <div class="field">
+ <label>
+ {{.i18n.Tr "repo.settings.transfer_form_title"}}
+ <span class="text red">{{.Repository.Name}}</span>
+ </label>
+ </div>
+ <div class="required field">
+ <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
+ <input id="repo_name" name="repo_name" required>
+ </div>
+ <div class="required field">
+ <label for="new_owner_name">{{.i18n.Tr "repo.settings.transfer_owner"}}</label>
+ <input id="new_owner_name" name="new_owner_name" required>
+ </div>
- <div class="text right actions">
- <div class="ui cancel button">{{.i18n.Tr "settings.cancel"}}</div>
- <button class="ui red button">{{.i18n.Tr "repo.settings.make_transfer"}}</button>
- </div>
- </form>
+ <div class="text right actions">
+ <div class="ui cancel button">{{.i18n.Tr "settings.cancel"}}</div>
+ <button class="ui red button">{{.i18n.Tr "repo.settings.make_transfer"}}</button>
+ </div>
+ </form>
+ </div>
</div>
-</div>
-<div class="ui small modal" id="delete-repo-modal">
- <div class="header">
- {{.i18n.Tr "repo.settings.delete"}}
- </div>
- <div class="content">
- <div class="ui warning message text left">
- {{.i18n.Tr "repo.settings.delete_notices_1" | Safe}} <br>
- {{.i18n.Tr "repo.settings.delete_notices_2" | Safe}}
- {{if .Repository.NumForks}}<br>
- {{.i18n.Tr "repo.settings.delete_notices_fork_1" | Safe}} <br>
- {{.i18n.Tr "repo.settings.delete_notices_fork_2" | Safe}} <br>
- {{.i18n.Tr "repo.settings.delete_notices_fork_3" | Safe}}
- {{end}}
+ <div class="ui small modal" id="delete-repo-modal">
+ <div class="header">
+ {{.i18n.Tr "repo.settings.delete"}}
</div>
- <form class="ui form" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
- <input type="hidden" name="action" value="delete">
- <div class="field">
- <label>
- {{.i18n.Tr "repo.settings.transfer_form_title"}}
- <span class="text red">{{.Repository.Name}}</span>
- </label>
- </div>
- <div class="required field">
- <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
- <input id="repo_name" name="repo_name" required>
+ <div class="content">
+ <div class="ui warning message text left">
+ {{.i18n.Tr "repo.settings.delete_notices_1" | Safe}} <br>
+ {{.i18n.Tr "repo.settings.delete_notices_2" | Safe}}
+ {{if .Repository.NumForks}}<br>
+ {{.i18n.Tr "repo.settings.delete_notices_fork_1" | Safe}} <br>
+ {{.i18n.Tr "repo.settings.delete_notices_fork_2" | Safe}} <br>
+ {{.i18n.Tr "repo.settings.delete_notices_fork_3" | Safe}}
+ {{end}}
</div>
+ <form class="ui form" action="{{.Link}}" method="post">
+ {{.CsrfTokenHtml}}
+ <input type="hidden" name="action" value="delete">
+ <div class="field">
+ <label>
+ {{.i18n.Tr "repo.settings.transfer_form_title"}}
+ <span class="text red">{{.Repository.Name}}</span>
+ </label>
+ </div>
+ <div class="required field">
+ <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
+ <input id="repo_name" name="repo_name" required>
+ </div>
- <div class="text right actions">
- <div class="ui cancel button">{{.i18n.Tr "settings.cancel"}}</div>
- <button class="ui red button">{{.i18n.Tr "repo.settings.confirm_delete"}}</button>
- </div>
- </form>
+ <div class="text right actions">
+ <div class="ui cancel button">{{.i18n.Tr "settings.cancel"}}</div>
+ <button class="ui red button">{{.i18n.Tr "repo.settings.confirm_delete"}}</button>
+ </div>
+ </form>
+ </div>
</div>
-</div>
-{{if .Repository.EnableWiki}}
-<div class="ui small modal" id="delete-wiki-modal">
- <div class="header">
- {{.i18n.Tr "repo.settings.wiki-delete"}}
- </div>
- <div class="content">
- <div class="ui warning message text left">
- {{.i18n.Tr "repo.settings.delete_notices_1" | Safe}}<br>
- {{.i18n.Tr "repo.settings.wiki_delete_notices_1" .Repository.Name | Safe}}
+ {{if .Repository.EnableWiki}}
+ <div class="ui small modal" id="delete-wiki-modal">
+ <div class="header">
+ {{.i18n.Tr "repo.settings.wiki-delete"}}
</div>
- <form class="ui form" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
- <input type="hidden" name="action" value="delete-wiki">
- <div class="field">
- <label>
- {{.i18n.Tr "repo.settings.transfer_form_title"}}
- <span class="text red">{{.Repository.Name}}</span>
- </label>
- </div>
- <div class="required field">
- <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
- <input id="repo_name" name="repo_name" required>
+ <div class="content">
+ <div class="ui warning message text left">
+ {{.i18n.Tr "repo.settings.delete_notices_1" | Safe}}<br>
+ {{.i18n.Tr "repo.settings.wiki_delete_notices_1" .Repository.Name | Safe}}
</div>
+ <form class="ui form" action="{{.Link}}" method="post">
+ {{.CsrfTokenHtml}}
+ <input type="hidden" name="action" value="delete-wiki">
+ <div class="field">
+ <label>
+ {{.i18n.Tr "repo.settings.transfer_form_title"}}
+ <span class="text red">{{.Repository.Name}}</span>
+ </label>
+ </div>
+ <div class="required field">
+ <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
+ <input id="repo_name" name="repo_name" required>
+ </div>
- <div class="text right actions">
- <div class="ui cancel button">{{.i18n.Tr "settings.cancel"}}</div>
- <button class="ui red button">{{.i18n.Tr "repo.settings.confirm_delete"}}</button>
- </div>
- </form>
+ <div class="text right actions">
+ <div class="ui cancel button">{{.i18n.Tr "settings.cancel"}}</div>
+ <button class="ui red button">{{.i18n.Tr "repo.settings.confirm_delete"}}</button>
+ </div>
+ </form>
+ </div>
</div>
-</div>
+ {{end}}
{{end}}
{{template "base/footer" .}}
diff --git a/templates/repo/wiki/start.tmpl b/templates/repo/wiki/start.tmpl
index 26d7fefdcc..e74627f848 100644
--- a/templates/repo/wiki/start.tmpl
+++ b/templates/repo/wiki/start.tmpl
@@ -6,7 +6,7 @@
<span class="mega-octicon octicon-book"></span>
<h2>{{.i18n.Tr "repo.wiki.welcome"}}</h2>
<p>{{.i18n.Tr "repo.wiki.welcome_desc"}}</p>
- {{if .IsRepositoryPusher}}
+ {{if .IsRepositoryWriter}}
<a class="ui green button" href="{{.RepoLink}}/wiki/_new">{{.i18n.Tr "repo.wiki.create_first_page"}}</a>
{{end}}
</div>
diff --git a/templates/repo/wiki/view.tmpl b/templates/repo/wiki/view.tmpl
index b96931fab1..833f372f45 100644
--- a/templates/repo/wiki/view.tmpl
+++ b/templates/repo/wiki/view.tmpl
@@ -46,7 +46,7 @@
</div>
<div class="ui dividing header">
{{.title}}
- {{if .IsRepositoryPusher}}
+ {{if .IsRepositoryWriter}}
<div class="ui right">
<a class="ui small button" href="{{.RepoLink}}/wiki/{{.PageURL}}/_edit">{{.i18n.Tr "repo.wiki.edit_page_button"}}</a>
<a class="ui green small button" href="{{.RepoLink}}/wiki/_new">{{.i18n.Tr "repo.wiki.new_page_button"}}</a>