|
11 | 11 | </a> |
12 | 12 | </li> |
13 | 13 | } |
14 | | - |
15 | | -<div style="width: 250px;" class="pull-right"> |
16 | | - <ul class="nav nav-pills nav-stacked"> |
17 | | - <li style="height: 12px"><div class="gradient pull-left" style="height: 12px"></div></li> |
18 | | - @menuitem( |
19 | | - "code", |
20 | | - s"${gist.userName}/${gist.repositoryName}", |
21 | | - "Code") |
| 14 | +<div class="pull-right pc"> |
| 15 | + <a href="@context.path/gist/@{gist.userName}/@{gist.repositoryName}/download/@{gist.repositoryName}.zip" class="btn btn-default btn-sm"><i class="octicon octicon-cloud-download"></i>Download ZIP</a> |
| 16 | +</div> |
| 17 | +<div class="pull-right pc" style="margin-right: 5px;"> |
| 18 | + <div class="input-group" style="margin-bottom: 0px; width: 240px;"> |
| 19 | + <div class="btn-group input-group-btn"> |
| 20 | + <button type="button" class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
| 21 | + <span id="repository-url-proto">HTTP</span> <span class="caret"></span> |
| 22 | + </button> |
| 23 | + <ul class="dropdown-menu"> |
| 24 | + <li> |
| 25 | + <a href="javascript:void(0);" id="repository-url-embed"> |
| 26 | + <strong>Embed</strong><br> |
| 27 | + Embed this snippet in your website. |
| 28 | + </a> |
| 29 | + </li> |
| 30 | + <li> |
| 31 | + <a href="javascript:void(0);" id="repository-url-http"> |
| 32 | + <strong>HTTP</strong><br> |
| 33 | + Clone with Git using the repository's web address. |
| 34 | + </a> |
| 35 | + </li> |
| 36 | + @if(context.settings.ssh && context.loginAccount.isDefined){ |
| 37 | + <li> |
| 38 | + <a href="javascript:void(0);" id="repository-url-ssh"> |
| 39 | + <strong>SSH</strong><br> |
| 40 | + Clone with an SSH key and passphrase from your GitBucket Settings. |
| 41 | + </a> |
| 42 | + </li> |
| 43 | + } |
| 44 | + </ul> |
| 45 | + </div> |
| 46 | + @gitbucket.core.helper.html.copy("repository-url", "repository-url-copy", repositoryUrl.httpUrl){ |
| 47 | + <input type="text" value="@repositoryUrl.httpUrl" id="repository-url" class="form-control input-sm" readonly> |
| 48 | + } |
| 49 | + </div> |
| 50 | +</div> |
| 51 | +<ul class="nav nav-tabs fill-width"> |
| 52 | + @menuitem( |
| 53 | + "code", |
| 54 | + s"${gist.userName}/${gist.repositoryName}", |
| 55 | + "Code") |
| 56 | + @menuitem( |
| 57 | + "revision", |
| 58 | + s"${gist.userName}/${gist.repositoryName}/revisions", |
| 59 | + "Revision") |
| 60 | + @if(gist.originUserName.isEmpty){ |
22 | 61 | @menuitem( |
23 | | - "revision", |
24 | | - s"${gist.userName}/${gist.repositoryName}/revisions", |
25 | | - "Revision") |
26 | | - @if(gist.originUserName.isEmpty){ |
27 | | - @menuitem( |
28 | | - "forks", |
29 | | - s"${gist.userName}/${gist.repositoryName}/forks", |
30 | | - "Forks") |
31 | | - } |
32 | | - </ul> |
33 | | - <div class="pull-right pc"> |
| 62 | + "forks", |
| 63 | + s"${gist.userName}/${gist.repositoryName}/forks", |
| 64 | + "Forks") |
| 65 | + } |
| 66 | + @* |
| 67 | + <div class="pull-right"> |
34 | 68 | <div class="input-group" style="margin-bottom: 0px;"> |
35 | 69 | <div class="btn-group input-group-btn"> |
36 | | - <button type="button" class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
| 70 | + <button type="button" class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
37 | 71 | <span id="repository-url-proto">HTTP</span> <span class="caret"></span> |
38 | | - </button> |
39 | | - <ul class="dropdown-menu"> |
| 72 | + </button> |
| 73 | + <ul class="dropdown-menu"> |
40 | 74 | <li> |
41 | 75 | <a href="javascript:void(0);" id="repository-url-embed"> |
42 | 76 | <strong>Embed</strong><br> |
|
57 | 91 | </a> |
58 | 92 | </li> |
59 | 93 | } |
60 | | - </ul> |
| 94 | + </ul> |
| 95 | + </div> |
| 96 | + @gitbucket.core.helper.html.copy("repository-url", "repository-url-copy", repositoryUrl.httpUrl){ |
| 97 | + <input type="text" value="@repositoryUrl.httpUrl" id="repository-url" class="form-control input-sm" readonly> |
| 98 | + } |
| 99 | + </div> |
| 100 | + <div style="margin-top: 10px;"> |
| 101 | + <a href="@context.path/gist/@{gist.userName}/@{gist.repositoryName}/download/@{gist.repositoryName}.zip" |
| 102 | + class="btn btn-default btn-block"><i class="octicon octicon-cloud-download"></i>Download ZIP</a> |
61 | 103 | </div> |
62 | | - @gitbucket.core.helper.html.copy("repository-url", "repository-url-copy", repositoryUrl.httpUrl){ |
63 | | - <input type="text" value="@repositoryUrl.httpUrl" id="repository-url" class="form-control input-sm" readonly> |
64 | | - } |
65 | | - </div> |
66 | | - <div style="margin-top: 10px;"> |
67 | | - <a href="@context.path/gist/@{gist.userName}/@{gist.repositoryName}/download/@{gist.repositoryName}.zip" |
68 | | - class="btn btn-default btn-block"><i class="octicon octicon-cloud-download"></i>Download ZIP</a> |
69 | 104 | </div> |
70 | | -</div> |
71 | | -</div> |
72 | | - <script> |
73 | | - $(function(){ |
74 | | - $('#repository-url-embed').click(function(){ |
75 | | - $('#repository-url-proto').text('Embed'); |
76 | | - $('#repository-url').val('<script src="@repositoryUrl.embedUrl\"><\/script>'); |
77 | | - $('#repository-url-copy').attr('data-clipboard-text', $('#repository-url').val()); |
78 | | - }); |
79 | | - $('#repository-url-http').click(function(){ |
80 | | - $('#repository-url-proto').text('HTTP'); |
81 | | - $('#repository-url').val('@repositoryUrl.httpUrl'); |
82 | | - $('#repository-url-copy').attr('data-clipboard-text', $('#repository-url').val()); |
83 | | - }); |
| 105 | + *@ |
| 106 | +</ul> |
| 107 | +<script> |
| 108 | +$(function(){ |
| 109 | + $('#repository-url-embed').click(function(){ |
| 110 | + $('#repository-url-proto').text('Embed'); |
| 111 | + $('#repository-url').val('<script src="@repositoryUrl.embedUrl\"><\/script>'); |
| 112 | + $('#repository-url-copy').attr('data-clipboard-text', $('#repository-url').val()); |
| 113 | + }); |
| 114 | + $('#repository-url-http').click(function(){ |
| 115 | + $('#repository-url-proto').text('HTTP'); |
| 116 | + $('#repository-url').val('@repositoryUrl.httpUrl'); |
| 117 | + $('#repository-url-copy').attr('data-clipboard-text', $('#repository-url').val()); |
| 118 | + }); |
84 | 119 | @if(context.settings.ssh && context.loginAccount.isDefined){ |
85 | | - $('#repository-url-ssh').click(function(){ |
86 | | - $('#repository-url-proto').text('SSH'); |
87 | | - $('#repository-url').val('@repositoryUrl.sshUrl(context.loginAccount.get.userName)'); |
88 | | - $('#repository-url-copy').attr('data-clipboard-text', $('#repository-url').val()); |
89 | | - }); |
90 | | -} |
| 120 | + $('#repository-url-ssh').click(function(){ |
| 121 | + $('#repository-url-proto').text('SSH'); |
| 122 | + $('#repository-url').val('@repositoryUrl.sshUrl(context.loginAccount.get.userName)'); |
| 123 | + $('#repository-url-copy').attr('data-clipboard-text', $('#repository-url').val()); |
91 | 124 | }); |
92 | | - </script> |
| 125 | +} |
| 126 | +}); |
| 127 | +</script> |
0 commit comments