summaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/create.tmpl1
-rw-r--r--templates/repo/nav.tmpl10
-rw-r--r--templates/repo/setting.tmpl33
-rw-r--r--templates/repo/single_file.tmpl4
4 files changed, 39 insertions, 9 deletions
diff --git a/templates/repo/create.tmpl b/templates/repo/create.tmpl
index 2de92f515f..a43f510484 100644
--- a/templates/repo/create.tmpl
+++ b/templates/repo/create.tmpl
@@ -2,6 +2,7 @@
{{template "base/navbar" .}}
<div class="container" id="gogs-body">
<form action="/repo/create" method="post" class="form-horizontal gogs-card" id="gogs-repo-create">
+ {{.CsrfTokenHtml}}
<h3>Create New Repository</h3>
<div class="alert alert-danger form-error{{if .HasError}}{{else}} hidden{{end}}">{{.ErrorMsg}}</div>
<div class="form-group">
diff --git a/templates/repo/nav.tmpl b/templates/repo/nav.tmpl
index d4a692fd03..a3358fd890 100644
--- a/templates/repo/nav.tmpl
+++ b/templates/repo/nav.tmpl
@@ -1,11 +1,11 @@
<div id="gogs-body-nav" class="gogs-repo-nav">
<div class="container">
<div class="row">
- <div class="col-md-6">
+ <div class="col-md-7">
<h3 class="name"><i class="fa fa-book fa-lg"></i><a href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a> / {{.Repository.Name}}</h3>
- <p class="desc">{{.Repository.Description}}{{if .Repository.Website}}<a href="{{.Repository.Website}}">{{.Repository.Website}}</a>{{end}}</p>
+ <p class="desc">{{.Repository.Description}}{{if .Repository.Website}} <a href="{{.Repository.Website}}">{{.Repository.Website}}</a>{{end}}</p>
</div>
- <div class="col-md-6 actions text-right clone-group-btn">
+ <div class="col-md-5 actions text-right clone-group-btn">
{{if not .IsBareRepo}}
<!--<div class="btn-group" id="gogs-repo-clone">
<button type="button" class="btn btn-default"><i class="fa fa-download fa-lg fa-m"></i></button>
@@ -18,7 +18,7 @@
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
- <div class="dropdown-menu clone-group-btn dropdown-menu-right">
+ <div class="dropdown-menu clone-group-btn dropdown-menu-right no-propagation">
<div class="input-group">
<span class="input-group-btn">
<button class="btn btn-default" data-link="{{.CloneLink.SSH}}" type="button">SSH</button>
@@ -32,7 +32,7 @@
<p class="help-block text-center">Need help cloning? Visit <a href="#">Help</a>!</p>
</div>
</div>
- <div class="btn-group {{if .IsRepositoryWatching}}watching{{else}}no-watching{{end}}" id="gogs-repo-watching" data-watch="/{{.SignedUser.Name}}/{{.Repository.Name}}/action/watch" data-unwatch="/{{.SignedUser.Name}}/{{.Repository.Name}}/action/unwatch">
+ <div class="btn-group {{if .IsRepositoryWatching}}watching{{else}}no-watching{{end}}" id="gogs-repo-watching" data-watch="/{{.Owner.Name}}/{{.Repository.Name}}/action/watch" data-unwatch="/{{.Owner.Name}}/{{.Repository.Name}}/action/unwatch">
{{if .IsRepositoryWatching}}
<button type="button" class="btn btn-default"><i class="fa fa-eye fa-lg fa-m"></i></button>
{{else}}
diff --git a/templates/repo/setting.tmpl b/templates/repo/setting.tmpl
index a2fb1771d4..c826e55a77 100644
--- a/templates/repo/setting.tmpl
+++ b/templates/repo/setting.tmpl
@@ -12,14 +12,42 @@
</div>
<div id="gogs-repo-setting-container" class="col-md-9">
- {{if .ErrorMsg}}<p class="alert alert-danger">{{.ErrorMsg}}</p>{{end}}
+ {{if .IsSuccess}}<p class="alert alert-success">Repository option has been successfully updated.</p>{{else if .HasError}}<p class="alert alert-danger form-error">{{.ErrorMsg}}</p>{{end}}
<div class="panel panel-default">
<div class="panel-heading">
Repository Options
</div>
<div class="panel-body">
-
+ <form action="/{{.Owner.Name}}/{{.Repository.Name}}/settings" method="post" class="form-horizontal">
+ {{.CsrfTokenHtml}}
+ <input type="hidden" name="action" value="update">
+ <div class="form-group">
+ <label class="col-md-3 text-right">Description</label>
+ <div class="col-md-9">
+ <textarea class="form-control" name="desc" id="repo-desc" rows="3">{{.Repository.Description}}</textarea>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="col-md-3 text-right">Official Site</label>
+ <div class="col-md-9">
+ <input type="url" class="form-control" name="site" value="{{.Repository.Website}}" />
+ </div>
+ </div>
+ <!-- <div class="form-group">
+ <label class="col-md-3 text-right">Default Branch</label>
+ <div class="col-md-9">
+ <select name="branch" id="repo-default-branch" class="form-control">
+ <option value="">Branch</option>
+ </select>
+ </div>
+ </div> -->
+ <div class="form-group">
+ <div class="col-md-9 col-md-offset-3">
+ <button class="btn btn-primary" type="submit">Save Options</button>
+ </div>
+ </div>
+ </form>
</div>
</div>
@@ -40,6 +68,7 @@
<div class="modal fade" id="delete-repository-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<form action="/{{.Owner.Name}}/{{.Repository.Name}}/settings" method="post" class="modal-content">
+ {{.CsrfTokenHtml}}
<input type="hidden" name="action" value="delete">
<div class="modal-header">
diff --git a/templates/repo/single_file.tmpl b/templates/repo/single_file.tmpl
index 7bca626aaa..40ef44eb1b 100644
--- a/templates/repo/single_file.tmpl
+++ b/templates/repo/single_file.tmpl
@@ -16,12 +16,12 @@
{{.FileContent|str2html}}
</div>
{{else}}
- <div class="panel-body file-body file-code">
+ <div class="panel-body file-body file-code code-view">
<table>
<tbody>
<tr>
<td class="lines-num"></td>
- <td class="lines-code markdown"><pre class="linenums lang-{{.FileExt}}"><code>{{.FileContent}}</code></pre></td>
+ <td class="lines-code markdown"><pre class="prettyprint linenums lang-{{.FileExt}}">{{.FileContent}}</pre></td>
</tr>
</tbody>
</table>