diff options
author | Unknown <joe2010xtmf@163.com> | 2014-03-29 17:50:51 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-03-29 17:50:51 -0400 |
commit | 107a1eadac72e610a9bcb68498751ca51ec8f51a (patch) | |
tree | 07830d247f89887882427c0bb910178bde4298ce /templates | |
parent | 1f671e5d2900497e2c81e8123cc47fe7ca5ad371 (diff) | |
download | gitea-107a1eadac72e610a9bcb68498751ca51ec8f51a.tar.gz gitea-107a1eadac72e610a9bcb68498751ca51ec8f51a.zip |
Finish close and reopen issue, install page, ready going to test stage of v0.2.0
Diffstat (limited to 'templates')
-rw-r--r-- | templates/install.tmpl | 59 | ||||
-rw-r--r-- | templates/issue/view.tmpl | 65 |
2 files changed, 64 insertions, 60 deletions
diff --git a/templates/install.tmpl b/templates/install.tmpl index a456ac5f2c..20bd502da2 100644 --- a/templates/install.tmpl +++ b/templates/install.tmpl @@ -3,9 +3,8 @@ <form action="/install" method="post" class="form-horizontal card" id="install-card"> {{.CsrfTokenHtml}} <h3>Install Steps For First-time Run</h3> - <div class="alert alert-danger form-error{{if .HasError}}{{else}} hidden{{end}}">{{.ErrorMsg}}</div> - <p class="help-block text-center">Gogs requires MySQL or PostgreSQL based on your choice</p> + <p class="help-block text-center">Gogs requires MySQL or PostgreSQL, SQLite3 only available for official binary version</p> <div class="form-group"> <label class="col-md-3 control-label">Database Type: </label> <div class="col-md-8"> @@ -16,26 +15,28 @@ </select> </div> </div> + <div class="server-sql"> <div class="form-group"> <label class="col-md-3 control-label">Host: </label> - <div class="col-md-8"> - <input name="host" class="form-control" placeholder="Type database server host, leave blank to keep default" value="{{.DbCfg.Host}}" required="required"> + <input name="host" class="form-control" placeholder="Type database server host" value="{{.host}}" required="required"> </div> </div> + <div class="form-group"> <label class="col-md-3 control-label">User: </label> <div class="col-md-8"> - <input name="user" class="form-control" placeholder="Type database username" required="required" value="{{.DbCfg.User}}"> + <input name="user" class="form-control" placeholder="Type database username" required="required" value="{{.user}}"> </div> </div> + <div class="form-group"> <label class="col-md-3 control-label">Password: </label> <div class="col-md-8"> - <input name="passwd" type="password" class="form-control" placeholder="Type database password" required="required" value="{{.DbCfg.Pwd}}"> + <input name="passwd" type="password" class="form-control" placeholder="Type database password" required="required" value="{{.passwd}}"> </div> </div> @@ -43,7 +44,7 @@ <label class="col-md-3 control-label">Database Name: </label> <div class="col-md-8"> - <input name="database_name" type="text" class="form-control" placeholder="Type mysql database name" value="{{.DbCfg.Name}}" required="required"> + <input name="database_name" type="text" class="form-control" placeholder="Type mysql database name" value="{{.database_name}}" required="required"> <p class="help-block">Recommend use INNODB engine with utf8_general_ci charset.</p> </div> </div> @@ -59,12 +60,13 @@ </div> </div> </div> + <div class="sqlite-setting hide"> <div class="form-group"> <label class="col-md-3 control-label">Path: </label> <div class="col-md-8"> - <input name="database_path" class="form-control" placeholder="Type sqlite3 file path" value="{{.DbCfg.Path}}"> + <input name="database_path" class="form-control" placeholder="Type sqlite3 file path" value="{{.database_path}}"> <p class="help-block">The file path of SQLite3 database.</p> </div> </div> @@ -73,12 +75,11 @@ <hr/> <p class="help-block text-center">General Settings of Gogs</p> - <div class="form-group"> <label class="col-md-3 control-label">Repository Path: </label> <div class="col-md-8"> - <input name="repo_path" type="text" class="form-control" placeholder="Type your repository directory" value="{{.RepoRootPath}}" required="required"> + <input name="repo_path" type="text" class="form-control" placeholder="Type your repository directory" value="{{.repo_path}}" required="required"> <p class="help-block">The git copy of each repository is saved in this directory.</p> </div> @@ -88,16 +89,25 @@ <label class="col-md-3 control-label">Run User: </label> <div class="col-md-8"> - <input name="run_user" type="text" class="form-control" placeholder="Type system user name" value="{{.RunUser}}" required="required"> + <input name="run_user" type="text" class="form-control" placeholder="Type system user name" value="{{.run_user}}" required="required"> <p class="help-block">The user has access to visit and run Gogs.</p> </div> </div> <div class="form-group"> + <label class="col-md-3 control-label">Domain: </label> + + <div class="col-md-8"> + <input name="domain" type="text" class="form-control" placeholder="Type your domain name" value="{{.domain}}" required="required"> + <p class="help-block">This affects SSH clone URL.</p> + </div> + </div> + + <div class="form-group"> <label class="col-md-3 control-label">App URL: </label> <div class="col-md-8"> - <input name="app_url" type="text" class="form-control" placeholder="Type app root URL " value="{{.AppUrl}}" required="required"> + <input name="app_url" type="text" class="form-control" placeholder="Type app root URL" value="{{.app_url}}" required="required"> <p class="help-block">This affects HTTP/HTTPS clone URL and somewhere in e-mail.</p> </div> </div> @@ -105,35 +115,30 @@ <hr/> <p class="help-block text-center">Admin Account Settings</p> - <div class="form-group"> <label class="col-md-3 control-label">Username: </label> - <div class="col-md-8"> - <input name="admin_name" type="text" class="form-control" placeholder="Type admin user name" value="admin" required="required"> + <input name="admin_name" type="text" class="form-control" placeholder="Type admin user name" value="{{.admin_name}}" required="required"> </div> </div> - <div class="form-group"> + <div class="form-group {{if .Err_AdminPasswd}}has-error has-feedback{{end}}"> <label class="col-md-3 control-label">Password: </label> - <div class="col-md-8"> - <input name="admin_pwd" type="password" class="form-control" placeholder="Type admin user password" required="required"> + <input name="admin_pwd" type="password" class="form-control" placeholder="Type admin user password" value="{{.admin_pwd}}" required="required"> </div> </div> - <div class="form-group"> + <div class="form-group {{if .Err_AdminEmail}}has-error has-feedback{{end}}"> <label class="col-md-3 control-label">E-mail: </label> - <div class="col-md-8"> - <input name="admin_email" type="text" class="form-control" placeholder="Type admin user e-mail" required="required"> + <input name="admin_email" type="text" class="form-control" placeholder="Type admin user e-mail" value="{{.admin_email}}" required="required"> </div> </div> <hr/> <div class="form-group text-center"> - <!-- <button class="btn btn-primary btn-lg">Test Configuration</button> --> <button class="btn btn-danger btn-lg">Install Gogs</button> <button class="btn btn-default btn-sm" type="button" data-toggle="modal" data-target="#advance-options-modal"> Advanced Options @@ -151,21 +156,21 @@ <label class="col-md-3 control-label">SMTP Host: </label> <div class="col-md-8"> - <input name="smtp_host" type="text" class="form-control" placeholder="Type SMTP host address"> + <input name="smtp_host" type="text" class="form-control" placeholder="Type SMTP host address" value="{{.smtp_host}}"> </div> </div> <div class="form-group"> <label class="col-md-3 control-label">Email: </label> <div class="col-md-8"> - <input name="mailer_user" type="text" class="form-control" placeholder="Type SMTP user e-mail address"> + <input name="mailer_user" type="text" class="form-control" placeholder="Type SMTP user e-mail address" value="{{.mailer_user}}"> </div> </div> <div class="form-group"> <label class="col-md-3 control-label">Password: </label> <div class="col-md-8"> - <input name="mailer_pwd" type="password" class="form-control" placeholder="Type SMTP user password"> + <input name="mailer_pwd" type="password" class="form-control" placeholder="Type SMTP user password" value="{{.mailer_pwd}}"> </div> </div> <hr/> @@ -175,7 +180,7 @@ <div class="col-md-offset-3 col-md-7"> <div class="checkbox"> <label> - <input name="register_confirm" type="checkbox"> + <input name="register_confirm" type="checkbox" {{if .register_confirm}}checked{{end}}> <strong>Enable Register Confirmation</strong> </label> </div> @@ -186,7 +191,7 @@ <div class="col-md-offset-3 col-md-7"> <div class="checkbox"> <label> - <input name="mail_notify" type="checkbox"> + <input name="mail_notify" type="checkbox" {{if .mail_notify}}checked{{end}}> <strong>Enable Mail Notification</strong> </label> </div> diff --git a/templates/issue/view.tmpl b/templates/issue/view.tmpl index 0481a33b40..91e5250ca3 100644 --- a/templates/issue/view.tmpl +++ b/templates/issue/view.tmpl @@ -30,37 +30,37 @@ </div> </div> {{range .Comments}} - <div class="issue-child" id="issue-comment-{{.Id}}"> - <a class="user pull-left" href="/user/{{.Poster.Name}}"><img class="avatar" src="{{.Poster.AvatarLink}}" alt=""/></a> - <div class="issue-content panel panel-default"> - <div class="panel-heading"> - <a href="/user/{{.Poster.Name}}" class="user">{{.Poster.Name}}</a> commented <span class="time">{{TimeSince .Created}}</span> - <!-- <a class="issue-comment-del pull-right issue-action" href="#" title="Edit Comment"><i class="fa fa-times-circle"></i></a> - <a class="issue-comment-edit pull-right issue-action" href="#" title="Remove Comment" data-url="{remove-link}"><i class="fa fa-edit"></i></a> --> - <span class="role label label-default pull-right">Owner</span> - </div> - <div class="panel-body markdown"> - {{str2html .Content}} - </div> - </div> - </div> - {{end}} - <!-- <div class="issue-child issue-closed"> - <a class="user pull-left" href="{user.link}"><img class="avatar" src="{user.avatar}" alt=""/></a> + {{if eq .Type 0}} + <div class="issue-child" id="issue-comment-{{.Id}}"> + <a class="user pull-left" href="/user/{{.Poster.Name}}"><img class="avatar" src="{{.Poster.AvatarLink}}" alt=""/></a> + <div class="issue-content panel panel-default"> + <div class="panel-heading"> + <a href="/user/{{.Poster.Name}}" class="user">{{.Poster.Name}}</a> commented <span class="time">{{TimeSince .Created}}</span> + <!-- <a class="issue-comment-del pull-right issue-action" href="#" title="Edit Comment"><i class="fa fa-times-circle"></i></a> + <a class="issue-comment-edit pull-right issue-action" href="#" title="Remove Comment" data-url="{remove-link}"><i class="fa fa-edit"></i></a> --> + <span class="role label label-default pull-right">Owner</span> + </div> + <div class="panel-body markdown"> + {{str2html .Content}} + </div> + </div> + </div> + {{else if eq .Type 1}} + <div class="issue-child issue-opened"> + <a class="user pull-left" href="/user/{{.Poster.Name}}"><img class="avatar" src="{{.Poster.AvatarLink}}" alt="" /></a> + <div class="issue-content"> + <a class="user pull-left" href="/user/{{.Poster.Name}}">{{.Poster.Name}}</a> <span class="label label-success">Reopened</span> this issue <span class="time">{{TimeSince .Created}}</span> + </div> + </div> + {{else if eq .Type 2}} + <div class="issue-child issue-closed"> + <a class="user pull-left" href="/user/{{.Poster.Name}}"><img class="avatar" src="{{.Poster.AvatarLink}}" alt=""/></a> <div class="issue-content"> - <a class="user pull-left" href="{user.link}">{user.name}</a> - <span class="btn btn-danger">Closed</span> this - <span class="time">{close.time}</span> + <a class="user pull-left" href="/user/{{.Poster.Name}}">{{.Poster.Name}}</a> <span class="label label-danger">Closed</span> this issue <span class="time">{{TimeSince .Created}}</span> </div> - </div> - <div class="issue-child issue-opened"> - <a class="user pull-left" href="{user.link}"><img class="avatar" src="{user.avatar}" alt=""/></a> - <div class="issue-content"> - <a class="user pull-left" href="{user.link}">{user.name}</a> - <span class="btn btn-success">Reopened</span> this - <span class="time">{close.time}</span> - </div> - </div> --> + </div> + {{end}} + {{end}} <hr class="issue-line"/> {{if .SignedUser}}<div class="issue-child issue-reply"> <a class="user pull-left" href="/user/{{.SignedUser.Name}}"><img class="avatar" src="{{.SignedUser.AvatarLink}}" alt=""/></a> @@ -68,8 +68,7 @@ {{.CsrfTokenHtml}} <div class="panel-body"> <div class="form-group"> - <div class="md-help pull-right"><!-- todo help link --> - Content with <a href="https://help.github.com/articles/markdown-basics">Markdown</a> + <div class="md-help pull-right">Content with <a href="https://help.github.com/articles/markdown-basics">Markdown</a> </div> <ul class="nav nav-tabs" data-init="tabs"> <li class="active issue-write"><a href="#issue-textarea" data-toggle="tab">Write</a></li> @@ -82,13 +81,13 @@ <textarea class="form-control" name="content" id="issue-reply-content" rows="10" placeholder="Write some content" data-ajax-rel="issue-preview" data-ajax-val="val" data-ajax-field="content">{{.content}}</textarea> </div> </div> - <div class="tab-pane issue-preview-content" id="issue-preview">loading...</div> + <div class="tab-pane issue-preview-content" id="issue-preview">Loading...</div> </div> </div> <div class="text-right"> <div class="form-group"> {{if .Issue.IsClosed}} - <input type="submit" class="btn-default btn issue-open" id="issue-open-btn" data-origin="Re-Open" data-text="Re-Open & Comment" name="change_status" value="Reopen"/>{{else}} + <input type="submit" class="btn-default btn issue-open" id="issue-open-btn" data-origin="Reopen" data-text="Reopen & Comment" name="change_status" value="Reopen"/>{{else}} <input type="submit" class="btn-default btn issue-close" id="issue-close-btn" data-origin="Close" data-text="Close & Comment" name="change_status" value="Close"/>{{end}} <button class="btn-success btn" id="issue-reply-btn">Comment</button> </div> |