@@ -15,15 +15,27 @@ <h2 style="text-align: center;" data-cy="uptitle">Upload a new commit</h2>
15
15
[[ else ]]
16
16
< h2 style ="text-align: center; " data-cy ="uptitle "> Upload a database</ h2 >
17
17
< h4 style ="text-align: center; ">
18
- The public/private setting is ignored when uploading new versions to an existing database.< br />
18
+ The public/private setting is ignored when uploading new versions to an existing standard database.< br />
19
19
To change it, visit the "Settings" page for the database after uploading.
20
20
</ h4 >
21
21
[[ end ]]
22
22
< form action ="/x/uploaddata/ " enctype ="multipart/form-data " method ="POST ">
23
23
< table class ="table table-striped table-responsive settingsTable ">
24
24
< tr >
25
- < th style ="vertical-align: middle; width: 25% "> Database file</ th >
26
- < td style ="vertical-align: middle; "> < input type ="file " name ="database " data-cy ="dbfile "> </ td >
25
+ < th style ="vertical-align: middle; width: 15% "> Database file</ th >
26
+ < td style ="vertical-align: middle; " colspan ="2 "> < input type ="file " name ="database " data-cy ="dbfile "> </ td >
27
+ </ tr >
28
+ < tr >
29
+ < th style ="vertical-align: middle; "> Database type?</ th >
30
+ < td style ="width: 20% ">
31
+ < div class ="btn-group ">
32
+ < label class ="btn btn-default " ng-model ="radioLive " ng-click ="liveClick('false') " uib-btn-radio ="'false' " data-cy ="livebtn "> Standard</ label >
33
+ < label class ="btn btn-default " ng-model ="radioLive " ng-click ="liveClick('true') " uib-btn-radio ="'true' " data-cy ="livebtn "> Live</ label >
34
+ </ div >
35
+ </ td >
36
+ < td style ="vertical-align: middle; width: 65% ">
37
+ < span ng-bind-html ="liveDesc "> </ span >
38
+ </ td >
27
39
</ tr >
28
40
[[ if and (ne .Meta.Owner "") (ne .Meta.Database "") ]]
29
41
< tr >
@@ -35,19 +47,21 @@ <h4 style="text-align: center;">
35
47
</ th >
36
48
</ tr >
37
49
[[ else ]]
38
- < tr >
50
+ < tr ng-if =" radioLive === 'false' " >
39
51
< th style ="vertical-align: middle; "> Public?</ th >
40
52
< td >
41
53
< div class ="btn-group ">
42
54
< label class ="btn btn-default " ng-model ="radioPublic " ng-click ="publicClick('true') " uib-btn-radio ="'true' " data-cy ="pubbtn "> Public</ label >
43
55
< label class ="btn btn-default " ng-model ="radioPublic " ng-click ="publicClick('false') " uib-btn-radio ="'false' " data-cy ="privbtn "> Private</ label >
44
56
</ div >
57
+ </ td >
58
+ < td style ="vertical-align: middle; ">
45
59
< span ng-bind-html ="publicDesc "> </ span >
46
60
</ td >
47
61
</ tr >
48
- < tr >
49
- < th style ="vertical-align: middle; width: 25% "> Licence</ th >
50
- < td style ="vertical-align: middle; ">
62
+ < tr ng-if =" radioLive === 'false' " >
63
+ < th style ="vertical-align: middle; "> Licence</ th >
64
+ < td style ="vertical-align: middle; " colspan =" 2 " >
51
65
< div class ="dropdown ">
52
66
< div class ="btn-group " uib-dropdown keyboard-nav ="true ">
53
67
< button id ="licence " type ="button " class ="btn " data-cy ="licname "> {{ Licence }}</ button >
@@ -66,7 +80,7 @@ <h4 style="text-align: center;">
66
80
</ tr >
67
81
[[ end ]]
68
82
</ table >
69
- < uib-accordion >
83
+ < uib-accordion ng-if =" radioLive === 'false' " >
70
84
< div uib-accordion-group class ="panel-default " heading ="Advanced " is-open ="false ">
71
85
< table class ="table table-striped table-responsive settingsTable " style ="width: 100% ">
72
86
< tr >
@@ -103,23 +117,6 @@ <h4 style="text-align: center;">
103
117
</ td >
104
118
</ tr >
105
119
</ table >
106
- < div class ="row " style ="border: 5px dashed #181a9c; margin: 2%; border-radius: 10px ">
107
- < div class ="col-md-12 ">
108
- < div style ="text-align: center; font-size: large; font-style: italic; color: #181a9c; margin-top: 1% "> Experimental</ div >
109
- < table class ="table table-striped table-responsive settingsTable ">
110
- < tr >
111
- < th style ="vertical-align: middle; width: 33% "> Live database? (not version controlled)</ th >
112
- < td >
113
- < div class ="btn-group ">
114
- < label class ="btn btn-default " ng-model ="radioLive " ng-click ="liveClick('false') " uib-btn-radio ="'false' " data-cy ="livebtn "> Standard</ label >
115
- < label class ="btn btn-default " ng-model ="radioLive " ng-click ="liveClick('true') " uib-btn-radio ="'true' " data-cy ="livebtn "> Live</ label >
116
- </ div >
117
- < span ng-bind-html ="liveDesc "> </ span >
118
- </ td >
119
- </ tr >
120
- </ table >
121
- </ div >
122
- </ div >
123
120
</ div >
124
121
</ uib-accordion >
125
122
< div style ="text-align: center; ">
@@ -207,10 +204,10 @@ <h4 style="text-align: center;">
207
204
$scope . liveClick = function ( newValue ) {
208
205
if ( newValue === "true" ) {
209
206
$scope . radioLive = "true" ;
210
- $scope . liveDesc = " Database will be writable ( not version controlled) ." ;
207
+ $scope . liveDesc = "<b>Live</b> means a traditional SQLite database. These <b>are</b> able to run INSERT/UPDATE/DELETE statements and other SQL queries. A good choice if you're not publishing data, or looking to share them with others ." ;
211
208
} else {
212
209
$scope . radioLive = "false" ;
213
- $scope . liveDesc = " Database will be standard (version controlled) ." ;
210
+ $scope . liveDesc = "<b>Standard</b> uses a git like system of read-only snapshots, suitable for publishing data, and collaborating upon with others. These databases <b>cannot</b> have INSERT/UPDATE/DELETE statements run on them directly ." ;
214
211
}
215
212
} ;
216
213
$scope . liveClick ( $scope . radioLive ) ;
0 commit comments