diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/admin/config.tmpl | 145 | ||||
-rw-r--r-- | templates/admin/dashboard.tmpl | 123 | ||||
-rw-r--r-- | templates/admin/nav.tmpl | 2 | ||||
-rw-r--r-- | templates/admin/repos.tmpl | 2 | ||||
-rw-r--r-- | templates/admin/users.tmpl | 2 | ||||
-rw-r--r-- | templates/release/list.tmpl | 86 | ||||
-rw-r--r-- | templates/repo/nav.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/setting.tmpl | 62 | ||||
-rw-r--r-- | templates/repo/single_bare.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/toolbar.tmpl | 14 | ||||
-rw-r--r-- | templates/user/setting.tmpl | 17 |
11 files changed, 361 insertions, 98 deletions
diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl index ab805d8dea..31cfb77bad 100644 --- a/templates/admin/config.tmpl +++ b/templates/admin/config.tmpl @@ -2,22 +2,31 @@ {{template "base/navbar" .}} <div id="body" class="container" data-page="admin"> {{template "admin/nav" .}} - <div id="admin-container" class="col-md-9"> + <div id="admin-container" class="col-md-10"> <div class="panel panel-default"> <div class="panel-heading"> Server Configuration </div> <div class="panel-body"> - <div><b>Application Name:</b> {{AppName}}</div> - <div><b>Application Version:</b> {{AppVer}}</div> - <div><b>Application URL:</b> {{.AppUrl}}</div> - <div><b>Domain:</b> {{.Domain}}</div> - <hr/> - <div><b>Run User:</b> {{.RunUser}}</div> - <div><b>Run Mode:</b> {{.RunMode}}</div> - <hr/> - <div><b>Repository Root Path:</b> {{.RepoRootPath}}</div> + <dl class="dl-horizontal admin-dl-horizontal"> + <dt>Application Name</dt> + <dd>{{AppName}}</dd> + <dt>Application Version</dt> + <dd>{{AppVer}}</dd> + <dt>Application URL</dt> + <dd>{{.AppUrl}}</dd> + <dt>Domain</dt> + <dd>{{.Domain}}</dd> + <hr/> + <dt>Run User</dt> + <dd>{{.RunUser}}</dd> + <dt>Run Mode</dt> + <dd>{{.RunMode}}</dd> + <hr/> + <dt>Repository Root Path</dt> + <dd>{{.RepoRootPath}}</dd> + </dl> </div> </div> @@ -27,12 +36,20 @@ </div> <div class="panel-body"> - <div><b>Type:</b> {{.DbCfg.Type}}</div> - <div><b>Host:</b> {{.DbCfg.Host}}</div> - <div><b>Name:</b> {{.DbCfg.Name}}</div> - <div><b>User:</b> {{.DbCfg.User}}</div> - <div><b>SslMode:</b> {{.DbCfg.SslMode}} (for "postgres" only)</div> - <div><b>Path:</b> {{.DbCfg.Path}} (for "sqlite3" only)</div> + <dl class="dl-horizontal admin-dl-horizontal"> + <dt>Type</dt> + <dd>{{.DbCfg.Type}}</dd> + <dt>Host</dt> + <dd>{{.DbCfg.Host}}</dd> + <dt>Name</dt> + <dd>{{.DbCfg.Name}}</dd> + <dt>User</dt> + <dd>{{.DbCfg.User}}</dd> + <dt>SslMode</dt> + <dd>{{.DbCfg.SslMode}} (for "postgres" only)</dd> + <dt>Path</dt> + <dd>{{.DbCfg.Path}} (for "sqlite3" only)</dd> + </dl> </div> </div> @@ -42,14 +59,23 @@ </div> <div class="panel-body"> - <div><b>Register Email Confirmation:</b> <i class="fa fa{{if .Service.RegisterEmailConfirm}}-check{{end}}-square-o"></i></div> - <div><b>Disenable Registeration:</b> <i class="fa fa{{if .Service.DisenableRegisteration}}-check{{end}}-square-o"></i></div> - <div><b>Require Sign In View:</b> <i class="fa fa{{if .Service.RequireSignInView}}-check{{end}}-square-o"></i></div> - <div><b>Mail Notification:</b> <i class="fa fa{{if .Service.NotifyMail}}-check{{end}}-square-o"></i></div> - <div><b>Enable Cache Avatar:</b> <i class="fa fa{{if .Service.EnableCacheAvatar}}-check{{end}}-square-o"></i></div> - <hr/> - <div><b>Active Code Lives:</b> {{.Service.ActiveCodeLives}} minutes</div> - <div><b>Reset Password Code Lives:</b> {{.Service.ResetPwdCodeLives}} minutes</div> + <dl class="dl-horizontal admin-dl-horizontal"> + <dt>Register Email Confirmation</dt> + <dd><i class="fa fa{{if .Service.RegisterEmailConfirm}}-check{{end}}-square-o"></i></dd> + <dt>Disenable Registeration</dt> + <dd><i class="fa fa{{if .Service.DisenableRegisteration}}-check{{end}}-square-o"></i></dd> + <dt>Require Sign In View</dt> + <dd><i class="fa fa{{if .Service.RequireSignInView}}-check{{end}}-square-o"></i></dd> + <dt>Mail Notification</dt> + <dd><i class="fa fa{{if .Service.NotifyMail}}-check{{end}}-square-o"></i></dd> + <dt>Enable Cache Avatar</dt> + <dd><i class="fa fa{{if .Service.EnableCacheAvatar}}-check{{end}}-square-o"></i></dd> + <hr/> + <dt>Active Code Lives</dt> + <dd>{{.Service.ActiveCodeLives}} minutes</dd> + <dt>Reset Password Code Lives</dt> + <dd>{{.Service.ResetPwdCodeLives}} minutes</dd> + </dl> </div> </div> @@ -59,10 +85,16 @@ </div> <div class="panel-body"> - <div><b>Enabled:</b> <i class="fa fa{{if .MailerEnabled}}-check{{end}}-square-o"></i></div> - <div><b>Name:</b> {{.Mailer.Name}}</div> - <div><b>Host:</b> {{.Mailer.Host}}</div> - <div><b>User:</b> {{.Mailer.User}}</div> + <dl class="dl-horizontal admin-dl-horizontal"> + <dt>Enabled</dt> + <dd><i class="fa fa{{if .MailerEnabled}}-check{{end}}-square-o"></i></dd> + <dt>Name</dt> + <dd>{{.Mailer.Name}}</dd> + <dt>Host</dt> + <dd>{{.Mailer.Host}}</dd> + <dt>User</dt> + <dd>{{.Mailer.User}}</dd> + </dl> </div> </div> @@ -72,9 +104,12 @@ </div> <div class="panel-body"> - <div><b>Cache Adapter:</b> {{.CacheAdapter}}</div> - <div><b>Cache Config:</b></div> - <div style="padding-top: 5px;"><pre>{{.CacheConfig}}</pre></div> + <dl class="dl-horizontal admin-dl-horizontal"> + <dt>Cache Adapter</dt> + <dd>{{.CacheAdapter}}</dd> + <dt>Cache Config</dt> + <dd><div style="padding-top: 5px;"><pre>{{.CacheConfig}}</pre></div></dd> + </dl> </div> </div> @@ -84,16 +119,28 @@ </div> <div class="panel-body"> - <div><b>Session Provider:</b> {{.SessionProvider}}</div> - <div><b>Cookie Name:</b> {{.SessionConfig.CookieName}}</div> - <div><b>Enable Set Cookie:</b> <i class="fa fa{{if .SessionConfig.EnableSetCookie}}-check{{end}}-square-o"></i></div> - <div><b>GC Interval Time:</b> {{.SessionConfig.GcIntervalTime}} seconds</div> - <div><b>Session Life Time:</b> {{.SessionConfig.SessionLifeTime}} seconds</div> - <div><b>HTTPS Only:</b> <i class="fa fa{{if .SessionConfig.CookieSecure}}-check{{end}}-square-o"></i></div> - <div><b>Cookie Life Time:</b> {{.SessionConfig.CookieLifeTime}} seconds</div> - <div><b>Session ID Hash Function:</b> {{.SessionConfig.SessionIDHashFunc}}</div> - <div><b>Session ID Hash Key:</b> {{.SessionConfig.SessionIDHashKey}}</div> - <div><b>Provider Config:</b> {{.SessionConfig.ProviderConfig}}</div> + <dl class="dl-horizontal admin-dl-horizontal"> + <dt>Session Provider</dt> + <dd>{{.SessionProvider}}</dd> + <dt>Cookie Name</dt> + <dd>{{.SessionConfig.CookieName}}</dd> + <dt>Enable Set Cookie</dt> + <dd><i class="fa fa{{if .SessionConfig.EnableSetCookie}}-check{{end}}-square-o"></i></dd> + <dt>GC Interval Time</dt> + <dd>{{.SessionConfig.GcIntervalTime}} seconds</dd> + <dt>Session Life Time</dt> + <dd>{{.SessionConfig.SessionLifeTime}} seconds</dd> + <dt>HTTPS Only</dt> + <dd><i class="fa fa{{if .SessionConfig.CookieSecure}}-check{{end}}-square-o"></i></dd> + <dt>Cookie Life Time</dt> + <dd>{{.SessionConfig.CookieLifeTime}} seconds</dd> + <dt>Session ID Hash Function</dt> + <dd>{{.SessionConfig.SessionIDHashFunc}}</dd> + <dt>Session ID Hash Key</dt> + <dd>{{.SessionConfig.SessionIDHashKey}}</dd> + <dt>Provider Config</dt> + <dd>{{.SessionConfig.ProviderConfig}}</dd> + </dl> </div> </div> @@ -103,7 +150,10 @@ </div> <div class="panel-body"> - <div><b>Picture Service:</b> {{.PictureService}}</div> + <dl class="dl-horizontal admin-dl-horizontal"> + <dt>Picture Service</dt> + <dd>{{.PictureService}}</dd> + </dl> </div> </div> @@ -113,9 +163,14 @@ </div> <div class="panel-body"> - <div><b>Log Mode:</b> {{.LogMode}}</div> - <div><b>Log Config:</b></div> - <div style="padding-top: 5px;"><pre>{{.LogConfig}}</pre></div> + <dl class="dl-horizontal admin-dl-horizontal"> + <dt>Log Mode</dt> + <dd>{{.LogMode}}</dd> + <dt>Log Config</dt> + <dd> + <div style="padding-top: 5px;"><pre>{{.LogConfig}}</pre></div> + </dd> + </dl> </div> </div> diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl index e0b31817aa..2334c676d9 100644 --- a/templates/admin/dashboard.tmpl +++ b/templates/admin/dashboard.tmpl @@ -2,7 +2,7 @@ {{template "base/navbar" .}} <div id="body" class="container" data-page="admin"> {{template "admin/nav" .}} - <div id="admin-container" class="col-md-9"> + <div id="admin-container" class="col-md-10"> <div class="panel panel-default"> <div class="panel-heading"> Statistic @@ -19,38 +19,95 @@ </div> <div class="panel-body"> - <div>Server Uptime: <b>{{.SysStatus.Uptime}}</b></div> - <div>Current Goroutines: <b>{{.SysStatus.NumGoroutine}}</b></div> - <hr/> - <div>Current Memory Usage: <b>{{.SysStatus.MemAllocated}}</b></div> - <div>Total Memory Allocated: <b>{{.SysStatus.MemTotal}}</b></div> - <div>Memory Obtained: <b>{{.SysStatus.MemSys}}</b></div> - <div>Pointer Lookup Times: <b>{{.SysStatus.Lookups}}</b></div> - <div>Memory Allocate Times: <b>{{.SysStatus.MemMallocs}}</b></div> - <div>Memory Free Times: <b>{{.SysStatus.MemFrees}}</b></div> - <hr/> - <div>Current Heap Usage: <b>{{.SysStatus.HeapAlloc}}</b></div> - <div>Heap Memory Obtained: <b>{{.SysStatus.HeapSys}}</b></div> - <div>Heap Memory Idle: <b>{{.SysStatus.HeapIdle}}</b></div> - <div>Heap Memory In Use: <b>{{.SysStatus.HeapInuse}}</b></div> - <div>Heap Memory Released: <b>{{.SysStatus.HeapReleased}}</b></div> - <div>Heap Objects: <b>{{.SysStatus.HeapObjects}}</b></div> - <hr/> - <div>Bootstrap Stack Usage: <b>{{.SysStatus.StackInuse}}</b></div> - <div>Stack Memory Obtained: <b>{{.SysStatus.StackSys}}</b></div> - <div>MSpan Structures Usage: <b>{{.SysStatus.MSpanInuse}}</b></div> - <div>MSpan Structures Obtained: <b>{{.SysStatus.HeapSys}}</b></div> - <div>MCache Structures Usage: <b>{{.SysStatus.MCacheInuse}}</b></div> - <div>MCache Structures Obtained: <b>{{.SysStatus.MCacheSys}}</b></div> - <div>Profiling Bucket Hash Table Obtained: <b>{{.SysStatus.BuckHashSys}}</b></div> - <div>GC Metadada Obtained: <b>{{.SysStatus.GCSys}}</b></div> - <div>Other System Allocation Obtained: <b>{{.SysStatus.OtherSys}}</b></div> - <hr/> - <div>Next GC Recycle: <b>{{.SysStatus.NextGC}}</b></div> - <div>Last GC Time: <b>{{.SysStatus.LastGC}} ago</b></div> - <div>Total GC Pause: <b>{{.SysStatus.PauseTotalNs}}</b></div> - <div>Last GC Pause: <b>{{.SysStatus.PauseNs}}</b></div> - <div>GC Times: <b>{{.SysStatus.NumGC}}</b></div> + <dl class="dl-horizontal admin-dl-horizontal"> + <dt>Server Uptime</dt> + <dd>{{.SysStatus.Uptime}}</dd> + + <dt>Current Goroutines</dt> + <dd>{{.SysStatus.NumGoroutine}}</dd> + + <hr/> + <dt>Current Memory Usage</dt> + <dd>{{.SysStatus.MemAllocated}}</dd> + + <dt>Total Memory Allocated</dt> + <dd>{{.SysStatus.MemTotal}}</dd> + + <dt>Memory Obtained</dt> + <dd>{{.SysStatus.MemSys}}</dd> + + <dt>Pointer Lookup Times</dt> + <dd>{{.SysStatus.Lookups}}</dd> + + <dt>Memory Allocate Times</dt> + <dd>{{.SysStatus.MemMallocs}}</dd> + + <dt>Memory Free Times</dt> + <dd>{{.SysStatus.MemFrees}}</dd> + + <hr/> + <dt>Current Heap Usage</dt> + <dd>{{.SysStatus.HeapAlloc}}</dd> + + <dt>Heap Memory Obtained</dt> + <dd>{{.SysStatus.HeapSys}}</dd> + + <dt>Heap Memory Idle</dt> + <dd>{{.SysStatus.HeapIdle}}</dd> + + <dt>Heap Memory In Use</dt> + <dd>{{.SysStatus.HeapInuse}}</dd> + + <dt>Heap Memory Released</dt> + <dd>{{.SysStatus.HeapReleased}}</dd> + + <dt>Heap Objects</dt> + <dd>{{.SysStatus.HeapObjects}}</dd> + + <hr/> + <dt>Bootstrap Stack Usage</dt> + <dd>{{.SysStatus.StackInuse}}</dd> + + <dt>Stack Memory Obtained</dt> + <dd>{{.SysStatus.StackSys}}</dd> + + <dt>MSpan Structures Usage</dt> + <dd>{{.SysStatus.MSpanInuse}}</dd> + + <dt>MSpan Structures Obtained</dt> + <dd>{{.SysStatus.HeapSys}}</dd> + + <dt>MCache Structures Usage</dt> + <dd>{{.SysStatus.MCacheInuse}}</dd> + + <dt>MCache Structures Obtained</dt> + <dd>{{.SysStatus.MCacheSys}}</dd> + + <dt>Profiling Bucket Hash Table Obtained</dt> + <dd>{{.SysStatus.BuckHashSys}}</dd> + + <dt>GC Metadada Obtained</dt> + <dd>{{.SysStatus.GCSys}}</dd> + + <dt>Other System Allocation Obtained</dt> + <dd>{{.SysStatus.OtherSys}}</dd> + + <hr/> + <dt>Next GC Recycle</dt> + <dd>{{.SysStatus.NextGC}}</dd> + + <dt>Last GC Time</dt> + <dd>{{.SysStatus.LastGC}} ago</dd> + + <dt>Total GC Pause</dt> + <dd>{{.SysStatus.PauseTotalNs}}</dd> + + <dt>Last GC Pause</dt> + <dd>{{.SysStatus.PauseNs}}</dd> + + <dt>GC Times</dt> + <dd>{{.SysStatus.NumGC}}</dd> + </dl> </div> </div> </div> diff --git a/templates/admin/nav.tmpl b/templates/admin/nav.tmpl index 2ac6462571..33ecfae5e3 100644 --- a/templates/admin/nav.tmpl +++ b/templates/admin/nav.tmpl @@ -1,4 +1,4 @@ -<div id="user-setting-nav" class="col-md-3 admin-nav"> +<div id="user-setting-nav" class="col-md-2 admin-nav"> <ul class="list-group"> <li class="list-group-item{{if .PageIsDashboard}} active{{end}}"><a href="/admin"><i class="fa fa-tachometer fa-lg"></i> Dashboard</a></li> <li class="list-group-item{{if .PageIsUsers}} active{{end}}"><a href="/admin/users"><i class="fa fa-users fa-lg"></i> Users</a></li> diff --git a/templates/admin/repos.tmpl b/templates/admin/repos.tmpl index 8cc424db68..3c0f5e09f7 100644 --- a/templates/admin/repos.tmpl +++ b/templates/admin/repos.tmpl @@ -2,7 +2,7 @@ {{template "base/navbar" .}} <div id="body" class="container" data-page="admin"> {{template "admin/nav" .}} - <div id="admin-container" class="col-md-9"> + <div id="admin-container" class="col-md-10"> <div class="panel panel-default"> <div class="panel-heading"> Repository Management diff --git a/templates/admin/users.tmpl b/templates/admin/users.tmpl index 63da451743..14fddf33c4 100644 --- a/templates/admin/users.tmpl +++ b/templates/admin/users.tmpl @@ -2,7 +2,7 @@ {{template "base/navbar" .}} <div id="body" class="container" data-page="admin"> {{template "admin/nav" .}} - <div id="admin-container" class="col-md-9"> + <div id="admin-container" class="col-md-10"> <div class="panel panel-default"> <div class="panel-heading"> User Management diff --git a/templates/release/list.tmpl b/templates/release/list.tmpl new file mode 100644 index 0000000000..d7c4674e84 --- /dev/null +++ b/templates/release/list.tmpl @@ -0,0 +1,86 @@ +{{template "base/head" .}} +{{template "base/navbar" .}} +{{template "repo/nav" .}} +{{template "repo/toolbar" .}} +<div id="body" class="container"> + <div id="release"> + <h4 id="release-head"> + <span class="release"><strong>Release</strong></span> / + <a class="tag" href="/{tag_link}">Tags</a> + <!-- comment : if in tag page, show a.release and span.tag please --> + </h4> + <ul id="release-list" class="list-unstyled"> + <li class="release-item release-tag clearfix" id="release-tag-{release_tag_id}"> + <div class="col-md-2 text-right"> + <a class="commit" href="{commit_link}"><i class="fa fa-code"></i>commit-sha</a> + </div> + <div class="col-md-10"> + <h5 class="title"><a href="{release_single_link}">Release Tag</a><i class="fa fa-tag"></i></h5> + <p class="info"> + <span class="author"><img class="avatar" src="http://1.gravatar.com/avatar/f72f7454ce9d710baa506394f68f4132" alt="" width="20"> + <a href="/user/fuxiaohei">fuxiaohei</a></span> + <span class="time">1 week ago</span> + <span class="ahead"><strong>0</strong> commits since this tag</span> + </p> + <p class="download"> + <a class="download-link" href="{release_download_link}"><i class="fa fa-download"></i>zip</a> + <a class="download-link" href="{release_download_link}"><i class="fa fa-download"></i>tar.gz</a> + </p> + <span class="dot"> </span> + </div> + </li> + <li class="release-item clearfix" id="release-{release_id}"> + <div class="col-md-2 text-right"> + <span class="btn btn-success status stable">Stable</span> + <a class="tag" href="{commit_link}"><i class="fa fa-tag"></i>release tag</a> + <a class="commit" href="{commit_link}"><i class="fa fa-code"></i>commit-sha</a> + </div> + <div class="col-md-10"> + <h4 class="title"><a href="{release_single_link}">Release Title</a></h4> + <p class="info"> + <span class="author"><img class="avatar" src="http://1.gravatar.com/avatar/f72f7454ce9d710baa506394f68f4132" alt="" width="20"> + <a href="/user/fuxiaohei">fuxiaohei</a></span> + <span class="time">1 week ago</span> + <span class="ahead"><strong>0</strong> commits since this tag</span> + </p> + <div class="markdown desc"> + release descriptions, support markdown content + </div> + <p class="download"> + <a class="btn btn-default" href="{release_download_link}"><i class="fa fa-download"></i>Source Code (ZIP)</a> + <a class="btn btn-default" href="{release_download_link}"><i class="fa fa-download"></i>Source Code (TAR.GZ)</a> + </p> + <span class="dot"> </span> + </div> + </li> + <li class="release-item clearfix" id="release-{release_id}"> + <div class="col-md-2 text-right"> + <span class="btn btn-warning status pre-release">Pre-Release</span> + <a class="tag" href="{commit_link}"><i class="fa fa-tag"></i>release tag</a> + <a class="commit" href="{commit_link}"><i class="fa fa-code"></i>commit-sha</a> + </div> + <div class="col-md-10"> + <h4 class="title"><a href="{release_single_link}">Release Title</a></h4> + <p class="info"> + <span class="author"><img class="avatar" src="http://1.gravatar.com/avatar/f72f7454ce9d710baa506394f68f4132" alt="" width="20"> + <a href="/user/fuxiaohei">fuxiaohei</a></span> + <span class="time">1 week ago</span> + <span class="ahead"><strong>0</strong> commits since this tag</span> + </p> + <div class="markdown desc"> + release descriptions, support markdown content + </div> + <p class="download"> + <a class="btn btn-default" href="{release_download_link}"><i class="fa fa-download"></i>Source Code (ZIP)</a> + <a class="btn btn-default" href="{release_download_link}"><i class="fa fa-download"></i>Source Code (TAR.GZ)</a> + </p> + <span class="dot"> </span> + </div> + </li> + </ul> + </div> + {{range .Releases}} + {{.}} + {{end}} +</div> +{{template "base/footer" .}}
\ No newline at end of file diff --git a/templates/repo/nav.tmpl b/templates/repo/nav.tmpl index 6156d5791e..3ce27f921e 100644 --- a/templates/repo/nav.tmpl +++ b/templates/repo/nav.tmpl @@ -18,9 +18,9 @@ <button class="btn btn-default" data-link="{{.CloneLink.SSH}}" type="button">SSH</button> <button class="btn btn-default" data-link="{{.CloneLink.HTTPS}}" type="button">HTTPS</button> </span> - <input type="text" class="form-control clone-group-url" value="" readonly/> + <input type="text" class="form-control clone-group-url" value="" readonly id="repo-clone-ipt"/> <span class="input-group-btn"> - <button class="btn btn-default" type="button"><i class="fa fa-copy" data-toggle="tooltip" title="copy to clipboard" data-placement="top"></i></button> + <button class="btn btn-default" type="button" data-toggle="tooltip" title="copy to clipboard" data-placement="top" data-init="copy" data-copy-val="val" data-copy-from="#repo-clone-ipt"><i class="fa fa-copy"></i></button> </span> </div> <p class="help-block text-center">Need help cloning? Visit <a href="#">Help</a>!</p> diff --git a/templates/repo/setting.tmpl b/templates/repo/setting.tmpl index ea7a5ddb61..6e2d3bec8b 100644 --- a/templates/repo/setting.tmpl +++ b/templates/repo/setting.tmpl @@ -12,7 +12,7 @@ </div> <div id="repo-setting-container" class="col-md-9"> - {{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}} + {{if .IsSuccess}}<p class="alert alert-success">Repository options 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 @@ -23,11 +23,19 @@ {{.CsrfTokenHtml}} <input type="hidden" name="action" value="update"> <div class="form-group"> + <label class="col-md-3 text-right">Name</label> + <div class="col-md-9"> + <input class="form-control" name="name" value="{{.Repository.Name}}" title="{{.Repository.Name}}" /> + </div> + </div> + + <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"> @@ -57,11 +65,61 @@ </div> <div class="panel-body"> + <button type="button" class="btn btn-default pull-right" href="#transfer-repository-modal" data-toggle="modal"> + Transfer ownership + </button> + <dd> + <dt>Transfer ownership</dt> + <dl>Transfer this repo to another user or to an organization where you have admin rights.</dl> + </dd> + + <div class="modal fade" id="transfer-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="transfer"> + + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> + <h4 class="modal-title" id="myModalLabel">Do you really want to transfer this repo?</h4> + </div> + + <div class="modal-body"> + <div class="alert alert-warning">This is important, pay attention.</div> + <ul> + <!-- <li>Transferring may be delayed until the new owner approves the transfer.</li> --> + <!-- <li>If you are transferring into an org, teams <strong>will not be set</strong>. An owner on the org will need to set teams for the repo.</li> --> + <li>Admin rights will be transferred to the new owner, you <strong>will lose admin rights</strong>.</li> + <!-- <li>Admin rights will be transferred to the new owner, you <strong>may lose admin rights</strong> if you are transferring into an organization account.</li> --> + <li>Redirect entries <strong>will NOT be</strong> set up from the previous location.</li> + <li>Git access <strong>will NOT continue</strong> to work from the previous location.</li> + </ul> + <div class="form-group"> + <label>Please type the name of the repository to confirm "<strong class="text-danger">{{.Repository.Name}}</strong>"</label> + <input name="repository" class="form-control" type="text" placeholder="Type your repository name" required="required"> + </div> + + <div class="form-group"> + <label>Please type the name of the new owner:</label> + <input name="owner" class="form-control" type="text" placeholder="Type new owner's name" required="required"> + </div> + </div> + + <div class="modal-footer"> + <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> + <button class="btn btn-danger btn-lg">I understand the consequences, transfer this repository</button> + </div> + </form> + </div> + </div> + </div> + <hr> + <div class="panel-body"> <button type="button" class="btn btn-default pull-right" href="#delete-repository-modal" data-toggle="modal"> Delete this repository </button> <dd> - <dt>Delete this repository.</dt> + <dt>Delete this repository</dt> <dl>Once you delete a repository, there is no going back. Please be certain.</dl> </dd> diff --git a/templates/repo/single_bare.tmpl b/templates/repo/single_bare.tmpl index 035e78e8b0..fc0a3bd96c 100644 --- a/templates/repo/single_bare.tmpl +++ b/templates/repo/single_bare.tmpl @@ -17,7 +17,7 @@ </span> <input type="text" class="form-control clone-group-url" id="guide-clone-url" value="" readonly/> <span class="input-group-btn"> - <button class="btn btn-default" type="button"><i class="fa fa-copy" data-toggle="tooltip" title="copy to clipboard" data-placement="top"></i></button> + <button class="btn btn-default" type="button" data-toggle="tooltip" title="copy to clipboard" data-placement="top" data-init="copy" data-copy-val="val" data-copy-from="#guide-clone-url"><i class="fa fa-copy"></i></button> </span> </div> <p>We recommend every repository include a <strong>README</strong>, <strong>LICENSE</strong>, and <strong>.gitignore</strong>.</p> diff --git a/templates/repo/toolbar.tmpl b/templates/repo/toolbar.tmpl index 6b48ecf506..5484204832 100644 --- a/templates/repo/toolbar.tmpl +++ b/templates/repo/toolbar.tmpl @@ -8,18 +8,18 @@ <li class="{{if .IsRepoToolbarCommits}}active{{end}}"><a href="{{.RepoLink}}/commits/{{if .BranchName}}{{.BranchName}}{{else}}master{{end}}">Commits</a></li> <!-- <li class="{{if .IsRepoToolbarBranches}}active{{end}}"><a href="{{.RepoLink}}/branches">Branches</a></li> --> <!-- <li class="{{if .IsRepoToolbarPulls}}active{{end}}"><a href="{{.RepoLink}}/pulls">Pull Requests</a></li> --> - <li class="{{if .IsRepoToolbarIssues}}active{{end}}"><a href="{{.RepoLink}}/issues">Issues <!--<span class="badge">42</span>--></a></li> + <li class="{{if .IsRepoToolbarIssues}}active{{end}}"><a href="{{.RepoLink}}/issues">{{if .Repository.NumOpenIssues}}<span class="badge">{{.Repository.NumOpenIssues}}</span> {{end}}Issues <!--<span class="badge">42</span>--></a></li> {{if .IsRepoToolbarIssues}} - <li class="tmp">{{if .IsRepoToolbarIssuesList}}<a href="{{.RepoLink}}/issues/new"> - <button class="btn btn-primary btn-sm">New Issue</button> - </a>{{else}}<a href="{{.RepoLink}}/issues"> - <button class="btn btn-primary btn-sm">Issues List</button> - </a>{{end}}</li> + <li class="tmp">{{if .IsRepoToolbarIssuesList}}<a href="{{.RepoLink}}/issues/new"><button class="btn btn-primary btn-sm">New Issue</button> + </a>{{else}}<a href="{{.RepoLink}}/issues"><button class="btn btn-primary btn-sm">Issues List</button></a>{{end}}</li> + {{end}} + <li class="{{if .IsRepoToolbarReleases}}active{{end}}"><a href="{{.RepoLink}}/releases">{{if .Repository.NumReleases}}<span class="badge">{{.Repository.NumReleases}}</span> {{end}}Releases</a></li> + {{if .IsRepoToolbarReleases}} + <li class="tmp"><a href="{{.RepoLink}}/releases/new"><button class="btn btn-primary btn-sm">New Release</button></a></li> {{end}} <!-- <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">More <b class="caret"></b></a> <ul class="dropdown-menu"> - <li><a href="{{.RepoLink}}/release">Release</a></li> <li><a href="{{.RepoLink}}/wiki">Wiki</a></li> </ul> </li> -->{{end}} diff --git a/templates/user/setting.tmpl b/templates/user/setting.tmpl index 283a8df8bf..b32689fe12 100644 --- a/templates/user/setting.tmpl +++ b/templates/user/setting.tmpl @@ -10,30 +10,37 @@ {{if .IsSuccess}}<p class="alert alert-success">Your profile has been successfully updated.</p>{{else if .HasError}}<p class="alert alert-danger form-error">{{.ErrorMsg}}</p>{{end}} <p>Your Email will be public and used for Account related notifications and any web based operations made via the web.</p> <div class="form-group"> - <label class="col-md-2 control-label">Email</label> + <label class="col-md-2 control-label">Username<strong class="text-danger">*</strong></label> <div class="col-md-8"> - <input type="text" name="email" class="form-control" placeholder="Type your e-mail address" value="{{.Owner.Email}}"> + <input name="username" class="form-control" placeholder="Type your user name" required="required" value="{{.SignedUser.Name}}" title="{{.SignedUser.Name}}"> + </div> + </div> + + <div class="form-group"> + <label class="col-md-2 control-label">Email<strong class="text-danger">*</strong></label> + <div class="col-md-8"> + <input name="email" class="form-control" placeholder="Type your e-mail address" required="required" value="{{.SignedUser.Email}}"> </div> </div> <div class="form-group"> <label class="col-md-2 control-label">Website</label> <div class="col-md-8"> - <input type="text" name="website" class="form-control" placeholder="Type your website URL" value="{{.Owner.Website}}"> + <input name="website" class="form-control" placeholder="Type your website URL" value="{{.SignedUser.Website}}"> </div> </div> <div class="form-group"> <label class="col-md-2 control-label">Location</label> <div class="col-md-8"> - <input type="text" name="location" class="form-control" placeholder="Type your current location" value="{{.Owner.Location}}"> + <input name="location" class="form-control" placeholder="Type your current location" value="{{.SignedUser.Location}}"> </div> </div> <div class="form-group {{if .Err_Avatar}}has-error has-feedback{{end}}"> <label class="col-md-2 control-label">Gravatar Email<strong class="text-danger">*</strong></label> <div class="col-md-8"> - <input type="text" name="avatar" class="form-control" placeholder="Type your Gravatar e-mail address" required="required" value="{{.Owner.AvatarEmail}}"> + <input name="avatar" class="form-control" placeholder="Type your Gravatar e-mail address" required="required" value="{{.SignedUser.AvatarEmail}}"> </div> </div> |