aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-11-25 20:10:25 -0500
committerUnknwon <u@gogs.io>2015-11-25 20:10:25 -0500
commit2b10fdc4dcb987b347b031f460cf4f02fd48a31a (patch)
treef3f723c75684c4213a58d57a2ce0b6afdc597d25 /templates
parent2f28a0310b0f391dd74bb3a2ab0ae06379a4fb1a (diff)
downloadgitea-2b10fdc4dcb987b347b031f460cf4f02fd48a31a.tar.gz
gitea-2b10fdc4dcb987b347b031f460cf4f02fd48a31a.zip
Wiki: UI for page new
Diffstat (limited to 'templates')
-rw-r--r--templates/base/head.tmpl5
-rw-r--r--templates/repo/issue/comment_tab.tmpl2
-rw-r--r--templates/repo/sidebar.tmpl16
-rw-r--r--templates/repo/wiki/new.tmpl27
-rw-r--r--templates/repo/wiki/start.tmpl16
-rw-r--r--templates/repo/wiki/view.tmpl0
6 files changed, 60 insertions, 6 deletions
diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl
index d5513280a0..b1d4283614 100644
--- a/templates/base/head.tmpl
+++ b/templates/base/head.tmpl
@@ -19,6 +19,11 @@
<script src="{{AppSubUrl}}/js/jquery-1.11.3.min.js"></script>
<link rel="stylesheet" href="{{AppSubUrl}}/css/font-awesome-4.4.0.min.css">
+ {{if .RequireSimpleMDE}}
+ <link rel="stylesheet" href="{{AppSubUrl}}/css/simplemde-1.8.1.min.css">
+ <script src="{{AppSubUrl}}/js/libs/simplemde-1.8.1.min.js"></script>
+ {{end}}
+
<!-- Stylesheet -->
<link rel="stylesheet" href="{{AppSubUrl}}/css/semantic-2.1.6.min.css">
<link rel="stylesheet" href="{{AppSubUrl}}/css/gogs.css?v={{MD5 AppVer}}">
diff --git a/templates/repo/issue/comment_tab.tmpl b/templates/repo/issue/comment_tab.tmpl
index d2880febd0..a3f80edfb5 100644
--- a/templates/repo/issue/comment_tab.tmpl
+++ b/templates/repo/issue/comment_tab.tmpl
@@ -1,7 +1,7 @@
<div class="field">
<div class="ui top attached tabular menu" data-write="write" data-preview="preview">
<a class="active item" data-tab="write">{{.i18n.Tr "repo.release.write"}}</a>
- <a class="item" data-tab="preview" data-url="{{AppSubUrl}}/api/v1/markdown" data-context="{{.RepoLink}}">{{.i18n.Tr "repo.release.preview"}}</a>
+ <a class="item" data-tab="preview" data-url="{{AppSubUrl}}/api/v1/markdown" data-context="{{.RepoLink}}">{{.i18n.Tr "repo.release.preview"}}</a>
</div>
<div class="ui bottom attached active tab segment" data-tab="write">
<textarea id="content" name="content" tabindex="4"></textarea>
diff --git a/templates/repo/sidebar.tmpl b/templates/repo/sidebar.tmpl
index ca38627bcf..912b50570b 100644
--- a/templates/repo/sidebar.tmpl
+++ b/templates/repo/sidebar.tmpl
@@ -1,16 +1,22 @@
{{if not .IsBareRepo}}
-<div class="ui {{if .IsRepositoryAdmin}}five{{else}}four{{end}} item menu">
+<div class="ui secondary pointing menu navbar">
+ <a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}">
+ <i class="icon octicon octicon-code"></i> {{.i18n.Tr "repo.code"}}
+ </a>
<a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoLink}}/issues">
- <i class="icon octicon octicon-issue-opened"></i> {{.i18n.Tr "repo.issues"}} <span class="ui blue label">{{.Repository.NumOpenIssues}}</span>
+ <i class="icon octicon octicon-issue-opened"></i> {{.i18n.Tr "repo.issues"}} <span class="ui blue small label">{{.Repository.NumOpenIssues}}</span>
</a>
<a class="{{if .PageIsPullList}}active{{end}} item" href="{{.RepoLink}}/pulls">
- <i class="icon octicon octicon-git-pull-request"></i> {{.i18n.Tr "repo.pulls"}} <span class="ui blue label">{{.Repository.NumOpenPulls}}</span>
+ <i class="icon octicon octicon-git-pull-request"></i> {{.i18n.Tr "repo.pulls"}} <span class="ui blue small label">{{.Repository.NumOpenPulls}}</span>
</a>
<a class="{{if .PageIsCommits}}active{{end}} item" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}">
- <i class="icon octicon octicon-history"></i> {{.i18n.Tr "repo.commits"}} <span class="ui blue label">{{.CommitsCount}}</span>
+ <i class="icon octicon octicon-history"></i> {{.i18n.Tr "repo.commits"}} <span class="ui blue small label">{{.CommitsCount}}</span>
</a>
<a class="{{if .PageIsReleaseList}}active{{end}} item" href="{{.RepoLink}}/releases">
- <i class="icon octicon octicon-tag"></i> {{.i18n.Tr "repo.releases"}} <span class="ui blue label">{{.Repository.NumTags}}</span>
+ <i class="icon octicon octicon-tag"></i> {{.i18n.Tr "repo.releases"}} <span class="ui blue small label">{{.Repository.NumTags}}</span>
+ </a>
+ <a class="{{if .PageIsWiki}}active{{end}} item" href="{{.RepoLink}}/wiki">
+ <i class="icon octicon octicon-book"></i> {{.i18n.Tr "repo.wiki"}}
</a>
{{if .IsRepositoryAdmin}}
<a class="{{if .PageIsSettings}}active{{end}} item" href="{{.RepoLink}}/settings">
diff --git a/templates/repo/wiki/new.tmpl b/templates/repo/wiki/new.tmpl
new file mode 100644
index 0000000000..cdf5225d3b
--- /dev/null
+++ b/templates/repo/wiki/new.tmpl
@@ -0,0 +1,27 @@
+{{template "base/head" .}}
+<div class="repository wiki new">
+ {{template "repo/header" .}}
+ <div class="ui container">
+ {{template "repo/sidebar" .}}
+ <div class="ui header">
+ {{.i18n.Tr "repo.wiki.new_page"}}
+ </div>
+ <form class="ui form" action="{{.Link}}" method="post">
+ <div class="field">
+ <input name="title" value="{{.title}}" autofocus>
+ </div>
+ <div class="field">
+ <textarea id="edit-area" name="content" data-url="{{AppSubUrl}}/api/v1/markdown" data-context="{{.RepoLink}}">{{.i18n.Tr "repo.wiki.welcome"}}</textarea>
+ </div>
+ <div class="field">
+ <input name="message" placeholder="{{.i18n.Tr "repo.wiki.default_commit_message"}}">
+ </div>
+ <div class="text right">
+ <button class="ui green button">
+ {{.i18n.Tr "repo.wiki.save_page"}}
+ </button>
+ </div>
+ </form>
+ </div>
+</div>
+{{template "base/footer" .}} \ No newline at end of file
diff --git a/templates/repo/wiki/start.tmpl b/templates/repo/wiki/start.tmpl
new file mode 100644
index 0000000000..757ab9bce0
--- /dev/null
+++ b/templates/repo/wiki/start.tmpl
@@ -0,0 +1,16 @@
+{{template "base/head" .}}
+<div class="repository wiki start">
+ {{template "repo/header" .}}
+ <div class="ui container">
+ {{template "repo/sidebar" .}}
+ <div class="ui center segment">
+ <span class="mega-octicon octicon-book"></span>
+ <h2>{{.i18n.Tr "repo.wiki.welcome"}}</h2>
+ <p>{{.i18n.Tr "repo.wiki.welcome_desc"}}</p>
+ {{if .IsSigned}}
+ <a class="ui green button" href="{{.RepoLink}}/wiki/_new">{{.i18n.Tr "repo.wiki.create_first_page"}}</a>
+ {{end}}
+ </div>
+ </div>
+</div>
+{{template "base/footer" .}} \ No newline at end of file
diff --git a/templates/repo/wiki/view.tmpl b/templates/repo/wiki/view.tmpl
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/templates/repo/wiki/view.tmpl