mirror of
https://github.com/go-gitea/gitea.git
synced 2024-08-27 22:04:28 -04:00
Merge branch 'master' of github.com:gogits/gogs
This commit is contained in:
commit
d9991603e6
@ -79,5 +79,6 @@ func RepoAssignment(redirect bool) martini.Handler {
|
|||||||
ctx.Data["CloneLink"] = ctx.Repo.CloneLink
|
ctx.Data["CloneLink"] = ctx.Repo.CloneLink
|
||||||
ctx.Data["RepositoryLink"] = ctx.Data["Title"]
|
ctx.Data["RepositoryLink"] = ctx.Data["Title"]
|
||||||
ctx.Data["IsRepositoryOwner"] = ctx.Repo.IsOwner
|
ctx.Data["IsRepositoryOwner"] = ctx.Repo.IsOwner
|
||||||
|
ctx.Data["IsRepositoryWatching"] = ctx.Repo.IsWatching
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -181,20 +181,22 @@ function initUserSetting() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function initRepository() {
|
function initRepository() {
|
||||||
|
(function () {
|
||||||
var $guide = $('.guide-box');
|
var $guide = $('.guide-box');
|
||||||
if ($guide.length) {
|
if ($guide.length) {
|
||||||
var $url = $('#guide-clone-url');
|
var $url = $('#guide-clone-url');
|
||||||
$guide.find('button[data-url]').on("click",function () {
|
$guide.find('button[data-link]').on("click",function () {
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
if (!$this.hasClass('btn-primary')) {
|
if (!$this.hasClass('btn-primary')) {
|
||||||
$guide.find('.btn-primary').removeClass('btn-primary').addClass("btn-default");
|
$guide.find('.btn-primary').removeClass('btn-primary').addClass("btn-default");
|
||||||
$(this).addClass('btn-primary').removeClass('btn-default');
|
$(this).addClass('btn-primary').removeClass('btn-default');
|
||||||
$url.val($this.data("url"));
|
$url.val($this.data("link"));
|
||||||
$guide.find('span.clone-url').text($this.data('url'));
|
$guide.find('span.clone-url').text($this.data('link'));
|
||||||
}
|
}
|
||||||
}).eq(0).trigger("click");
|
}).eq(0).trigger("click");
|
||||||
// todo copy to clipboard
|
// todo copy to clipboard
|
||||||
}
|
}
|
||||||
|
})();
|
||||||
}
|
}
|
||||||
|
|
||||||
(function ($) {
|
(function ($) {
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<span class="caret"></span>
|
<span class="caret"></span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group" id="gogs-repo-watching">
|
<div class="btn-group {{if .IsRepositoryWatching}}watching{{end}}" id="gogs-repo-watching">
|
||||||
<button type="button" class="btn btn-default"><i class="fa fa-eye fa-lg fa-m"></i></button>
|
<button type="button" class="btn btn-default"><i class="fa fa-eye fa-lg fa-m"></i></button>
|
||||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||||
<span class="caret"></span>
|
<span class="caret"></span>
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<h3>Clone this repository</h3>
|
<h3>Clone this repository</h3>
|
||||||
<div class="input-group col-md-8 col-md-offset-2 guide-buttons">
|
<div class="input-group col-md-8 col-md-offset-2 guide-buttons">
|
||||||
<span class="input-group-btn">
|
<span class="input-group-btn">
|
||||||
<button class="btn btn-default" data-url="{{.CloneLink.SSH}}" type="button">SSH</button>
|
<button class="btn btn-default" data-link="{{.CloneLink.SSH}}" type="button">SSH</button>
|
||||||
<button class="btn btn-default" data-url="{{.CloneLink.HTTPS}}" type="button">HTTPS</button>
|
<button class="btn btn-default" data-link="{{.CloneLink.HTTPS}}" type="button">HTTPS</button>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" class="form-control" id="guide-clone-url" value="" readonly/>
|
<input type="text" class="form-control" id="guide-clone-url" value="" readonly/>
|
||||||
<span class="input-group-btn">
|
<span class="input-group-btn">
|
||||||
|
Loading…
Reference in New Issue
Block a user