diff --git a/src/main/twirl/gitbucket/core/menu.scala.html b/src/main/twirl/gitbucket/core/menu.scala.html index 7da239a..fa38262 100644 --- a/src/main/twirl/gitbucket/core/menu.scala.html +++ b/src/main/twirl/gitbucket/core/menu.scala.html @@ -40,18 +40,23 @@ @if(repository.commitCount > 0){
- @if(loginAccount.isEmpty){ - Fork - } else { - @if(isNoGroup) { - Fork + @if(loginAccount.isEmpty){ + Fork } else { - Fork + @if(isNoGroup) { + Fork + } else { + Fork + } } - } @repository.forkedCount
+ @if(loginAccount.isDefined && isNoGroup){ +
+ +
+ } }
@helper.html.repositoryicon(repository, true) @@ -194,19 +199,9 @@ }); @if(loginAccount.isDefined){ - $(document).on("click", "a[data-account]", function(e) { + $(document).on("click", "a#fork-link", function(e) { e.preventDefault(); - var form = $('
', { - action: $(this).attr('href'), - method: "post" - }); - var account = $('', { - type: "hidden", - name: "account", - value: $(this).data('account') - }); - form.append(account); - form.submit(); + $('#fork-form').submit(); }); }