|
32 | 32 | </div>
|
33 | 33 | </div>
|
34 | 34 | [[ end ]]
|
35 |
| - <div class="row"> |
36 |
| - <div class="col-md-12"> |
37 |
| - <div style="border: 1px solid #DDD; border-radius: 7px; margin-bottom: 10px;"> |
38 |
| - <table width="100%" class="table" style="margin-bottom: 0; border: none;"> |
39 |
| - <tr style="border: none;"> |
40 |
| - <td style="border: none; border-right: 1px solid #DDD;"> |
41 |
| - <div style="text-align: center;"> |
42 |
| - <a href="/commits/[[ .Meta.Owner ]]/[[ .Meta.Database ]]?branch={{ meta.Branch }}" class="blackLink" style="font-weight: bold;" data-cy="commitslnk">Commits: <span data-cy="commitscnt">{{ meta.Commits }}</span></a> |
43 |
| - </div> |
44 |
| - </td> |
45 |
| - <td style="border: none; border-right: 1px solid #DDD;"> |
46 |
| - <div style="text-align: center;"> |
47 |
| - <a href="/branches/[[ .Meta.Owner ]]/[[ .Meta.Database ]]" class="blackLink" style="font-weight: bold;" data-cy="brancheslnk">Branches: <span data-cy="branchescnt">{{ meta.Branches }}</span></a> |
48 |
| - </div> |
49 |
| - </td> |
50 |
| - <td style="border: none; border-right: 1px solid #DDD;"> |
51 |
| - <div style="text-align: center;"> |
52 |
| - <a href="/tags/[[ .Meta.Owner ]]/[[ .Meta.Database ]]" class="blackLink" style="font-weight: bold;" data-cy="tagslnk">Tags: <span data-cy="tagscnt">{{ meta.Tags }}</span></a> |
53 |
| - </div> |
54 |
| - </td> |
55 |
| - <td style="border: none; border-right: 1px solid #DDD;"> |
56 |
| - <div style="text-align: center;"> |
57 |
| - <a href="/releases/[[ .Meta.Owner ]]/[[ .Meta.Database ]]" class="blackLink" style="font-weight: bold;" data-cy="rlslnk">Releases: <span data-cy="rlscnt">{{ meta.Releases }}</span></a> |
58 |
| - </div> |
59 |
| - </td> |
60 |
| - <td style="border: none;"> |
61 |
| - <div style="text-align: center;"> |
62 |
| - <a href="/contributors/[[ .Meta.Owner ]]/[[ .Meta.Database ]]" class="blackLink" style="font-weight: bold;" data-cy="contlnk">Contributors: <span data-cy="contcnt">{{ meta.Contributors }}</span></a> |
63 |
| - </div> |
64 |
| - </td> |
65 |
| - </tr> |
66 |
| - </table> |
| 35 | + [[ if eq .IsLive false ]] |
| 36 | + <div class="row"> |
| 37 | + <div class="col-md-12"> |
| 38 | + <div style="border: 1px solid #DDD; border-radius: 7px; margin-bottom: 10px;"> |
| 39 | + <table width="100%" class="table" style="margin-bottom: 0; border: none;"> |
| 40 | + <tr style="border: none;"> |
| 41 | + <td style="border: none; border-right: 1px solid #DDD;"> |
| 42 | + <div style="text-align: center;"> |
| 43 | + <a href="/commits/[[ .Meta.Owner ]]/[[ .Meta.Database ]]?branch={{ meta.Branch }}" class="blackLink" style="font-weight: bold;" data-cy="commitslnk">Commits: <span data-cy="commitscnt">{{ meta.Commits }}</span></a> |
| 44 | + </div> |
| 45 | + </td> |
| 46 | + <td style="border: none; border-right: 1px solid #DDD;"> |
| 47 | + <div style="text-align: center;"> |
| 48 | + <a href="/branches/[[ .Meta.Owner ]]/[[ .Meta.Database ]]" class="blackLink" style="font-weight: bold;" data-cy="brancheslnk">Branches: <span data-cy="branchescnt">{{ meta.Branches }}</span></a> |
| 49 | + </div> |
| 50 | + </td> |
| 51 | + <td style="border: none; border-right: 1px solid #DDD;"> |
| 52 | + <div style="text-align: center;"> |
| 53 | + <a href="/tags/[[ .Meta.Owner ]]/[[ .Meta.Database ]]" class="blackLink" style="font-weight: bold;" data-cy="tagslnk">Tags: <span data-cy="tagscnt">{{ meta.Tags }}</span></a> |
| 54 | + </div> |
| 55 | + </td> |
| 56 | + <td style="border: none; border-right: 1px solid #DDD;"> |
| 57 | + <div style="text-align: center;"> |
| 58 | + <a href="/releases/[[ .Meta.Owner ]]/[[ .Meta.Database ]]" class="blackLink" style="font-weight: bold;" data-cy="rlslnk">Releases: <span data-cy="rlscnt">{{ meta.Releases }}</span></a> |
| 59 | + </div> |
| 60 | + </td> |
| 61 | + <td style="border: none;"> |
| 62 | + <div style="text-align: center;"> |
| 63 | + <a href="/contributors/[[ .Meta.Owner ]]/[[ .Meta.Database ]]" class="blackLink" style="font-weight: bold;" data-cy="contlnk">Contributors: <span data-cy="contcnt">{{ meta.Contributors }}</span></a> |
| 64 | + </div> |
| 65 | + </td> |
| 66 | + </tr> |
| 67 | + </table> |
| 68 | + </div> |
67 | 69 | </div>
|
68 | 70 | </div>
|
69 |
| - </div> |
| 71 | + [[ end ]] |
70 | 72 | <div class="row" style="padding-bottom: 10px;">
|
71 | 73 | <div class="col-md-8">
|
72 | 74 | <span class="pull-left">
|
|
83 | 85 | </li>
|
84 | 86 | </ul>
|
85 | 87 | </div>
|
86 |
| - <div class="btn-group" uib-dropdown keyboard-nav="true"> |
87 |
| - <button id="viewbranch" type="button" class="btn" data-cy="branchname"><span style="font-weight: bold">Branch:</span> {{ meta.Branch }}</button> |
88 |
| - |
89 |
| - <button type="button" uib-dropdown-toggle class="btn btn-default" data-cy="branchdropdown"> |
90 |
| - <span class="caret"></span> |
91 |
| - </button> |
92 |
| - <ul uib-dropdown-menu class="dropdown-menu" role="menu"> |
93 |
| - <li ng-repeat="row in meta.BranchList" role="menuitem" ng-click="changeBranch(row)" data-cy="branch-{{ row }}"> |
94 |
| - <a href="">{{ row }}</a> |
95 |
| - </li> |
96 |
| - </ul> |
97 |
| - </div> |
98 |
| - [[ if .Meta.LoggedInUser ]] |
| 88 | + [[ if eq .IsLive false ]] |
| 89 | + <div class="btn-group" uib-dropdown keyboard-nav="true"> |
| 90 | + <button id="viewbranch" type="button" class="btn" data-cy="branchname"><span style="font-weight: bold">Branch:</span> {{ meta.Branch }}</button> |
| 91 | + |
| 92 | + <button type="button" uib-dropdown-toggle class="btn btn-default" data-cy="branchdropdown"> |
| 93 | + <span class="caret"></span> |
| 94 | + </button> |
| 95 | + <ul uib-dropdown-menu class="dropdown-menu" role="menu"> |
| 96 | + <li ng-repeat="row in meta.BranchList" role="menuitem" ng-click="changeBranch(row)" data-cy="branch-{{ row }}"> |
| 97 | + <a href="">{{ row }}</a> |
| 98 | + </li> |
| 99 | + </ul> |
| 100 | + </div> |
| 101 | + [[ end ]] |
| 102 | + [[ if and (.Meta.LoggedInUser) (eq .IsLive false) ]] |
99 | 103 | <a href="/compare/[[ .Meta.Owner ]]/[[ .Meta.Database ]]" class="btn btn-primary" data-cy="newmrbtn">New Merge Request</a>
|
100 | 104 | <button class="btn btn-primary" ng-click="uploadForm()" data-cy="uploadbtn">Upload database</button>
|
101 | 105 | [[ end ]]
|
102 | 106 | </div>
|
103 | 107 | </span>
|
104 | 108 | </div>
|
105 |
| - <div class="col-md-4"> |
106 |
| - <span class="pull-right"> |
107 |
| - <div class="btn-group" uib-dropdown keyboard-nav="true"> |
108 |
| - <button type="button" class="btn btn-success" uib-dropdown-toggle> |
109 |
| - Clone database in DB4S <span class="caret"></span> |
110 |
| - </button> |
111 |
| - <ul uib-dropdown class="dropdown-menu dropdown-menu-right" role="menu"> |
112 |
| - <li><input type="text" value="https://[[ .Config.DB4S.Server ]][[ if (ne .Config.DB4S.Port 443) ]]:[[ .Config.DB4S.Port ]][[ end ]]/[[ .Meta.Owner ]]/[[ .Meta.Database ]]?commit=[[ .DB.Info.CommitID ]]&branch=[[ .DB.Info.Branch ]]" id="db4sCloneLink" /></li> |
113 |
| - <li><a href="#" onclick="copyToClipboard('db4sCloneLink');return false;">Copy link <span class="glyphicon glyphicon-link"></span></a></li> |
114 |
| - </ul> |
115 |
| - </div> |
116 |
| - <div class="btn-group" uib-dropdown keyboard-nav="true" data-cy="dldropdown"> |
117 |
| - <button type="button" class="btn btn-success" uib-dropdown-toggle> |
118 |
| - Download database <span class="caret"></span> |
119 |
| - </button> |
120 |
| - <ul uib-dropdown class="dropdown-menu dropdown-menu-right" role="menu"> |
121 |
| - <li><a href="/x/download/[[ .Meta.Owner ]]/[[ .Meta.Database ]]?commit=[[ .DB.Info.CommitID ]]" data-cy="dldb">Entire database ({{ meta.Size / 1024 | number : 0 }} KB)</a></li> |
122 |
| - [[ if (le .DB.Info.DBEntry.Size 100000000) ]] |
123 |
| - <!-- Don't display the CSV export options for large databases, as the current node setup doesn't have sufficient ram + swap for it. --> |
124 |
| - <li><a href="/x/downloadcsv/[[ .Meta.Owner ]]/[[ .Meta.Database ]]?commit=[[ .DB.Info.CommitID ]]&table={{ db.Tablename }}" data-cy="dlcsv">Selected table as CSV</a></li> |
125 |
| - [[ end ]] |
126 |
| - </ul> |
127 |
| - </div> |
128 |
| - </span> |
129 |
| - </div> |
| 109 | + [[ if eq .IsLive false ]] |
| 110 | + <div class="col-md-4"> |
| 111 | + <span class="pull-right"> |
| 112 | + <div class="btn-group" uib-dropdown keyboard-nav="true"> |
| 113 | + <button type="button" class="btn btn-success" uib-dropdown-toggle> |
| 114 | + Clone database in DB4S <span class="caret"></span> |
| 115 | + </button> |
| 116 | + <ul uib-dropdown class="dropdown-menu dropdown-menu-right" role="menu"> |
| 117 | + <li><input type="text" value="https://[[ .Config.DB4S.Server ]][[ if (ne .Config.DB4S.Port 443) ]]:[[ .Config.DB4S.Port ]][[ end ]]/[[ .Meta.Owner ]]/[[ .Meta.Database ]]?commit=[[ .DB.Info.CommitID ]]&branch=[[ .DB.Info.Branch ]]" id="db4sCloneLink" /></li> |
| 118 | + <li><a href="#" onclick="copyToClipboard('db4sCloneLink');return false;">Copy link <span class="glyphicon glyphicon-link"></span></a></li> |
| 119 | + </ul> |
| 120 | + </div> |
| 121 | + <div class="btn-group" uib-dropdown keyboard-nav="true" data-cy="dldropdown"> |
| 122 | + <button type="button" class="btn btn-success" uib-dropdown-toggle> |
| 123 | + Download database <span class="caret"></span> |
| 124 | + </button> |
| 125 | + <ul uib-dropdown class="dropdown-menu dropdown-menu-right" role="menu"> |
| 126 | + <li><a href="/x/download/[[ .Meta.Owner ]]/[[ .Meta.Database ]]?commit=[[ .DB.Info.CommitID ]]" data-cy="dldb">Entire database ({{ meta.Size / 1024 | number : 0 }} KB)</a></li> |
| 127 | + [[ if (le .DB.Info.DBEntry.Size 100000000) ]] |
| 128 | + <!-- Don't display the CSV export options for large databases, as the current node setup doesn't have sufficient ram + swap for it. --> |
| 129 | + <li><a href="/x/downloadcsv/[[ .Meta.Owner ]]/[[ .Meta.Database ]]?commit=[[ .DB.Info.CommitID ]]&table={{ db.Tablename }}" data-cy="dlcsv">Selected table as CSV</a></li> |
| 130 | + [[ end ]] |
| 131 | + </ul> |
| 132 | + </div> |
| 133 | + </span> |
| 134 | + </div> |
| 135 | + [[ end ]] |
130 | 136 | </div>
|
131 | 137 | <div class="row">
|
132 | 138 | <div class="col-md-12">
|
|
0 commit comments