@@ -15,15 +15,27 @@ <h2 style="text-align: center;" data-cy="uptitle">Upload a new commit</h2>
1515 [[ else ]]
1616 < h2 style ="text-align: center; " data-cy ="uptitle "> Upload a database</ h2 >
1717 < 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 />
1919 To change it, visit the "Settings" page for the database after uploading.
2020 </ h4 >
2121 [[ end ]]
2222 < form action ="/x/uploaddata/ " enctype ="multipart/form-data " method ="POST ">
2323 < table class ="table table-striped table-responsive settingsTable ">
2424 < 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 >
2739 </ tr >
2840 [[ if and (ne .Meta.Owner "") (ne .Meta.Database "") ]]
2941 < tr >
@@ -35,19 +47,21 @@ <h4 style="text-align: center;">
3547 </ th >
3648 </ tr >
3749 [[ else ]]
38- < tr >
50+ < tr ng-if =" radioLive === 'false' " >
3951 < th style ="vertical-align: middle; "> Public?</ th >
4052 < td >
4153 < div class ="btn-group ">
4254 < label class ="btn btn-default " ng-model ="radioPublic " ng-click ="publicClick('true') " uib-btn-radio ="'true' " data-cy ="pubbtn "> Public</ label >
4355 < label class ="btn btn-default " ng-model ="radioPublic " ng-click ="publicClick('false') " uib-btn-radio ="'false' " data-cy ="privbtn "> Private</ label >
4456 </ div >
57+ </ td >
58+ < td style ="vertical-align: middle; ">
4559 < span ng-bind-html ="publicDesc "> </ span >
4660 </ td >
4761 </ 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 " >
5165 < div class ="dropdown ">
5266 < div class ="btn-group " uib-dropdown keyboard-nav ="true ">
5367 < button id ="licence " type ="button " class ="btn " data-cy ="licname "> {{ Licence }}</ button >
@@ -66,7 +80,7 @@ <h4 style="text-align: center;">
6680 </ tr >
6781 [[ end ]]
6882 </ table >
69- < uib-accordion >
83+ < uib-accordion ng-if =" radioLive === 'false' " >
7084 < div uib-accordion-group class ="panel-default " heading ="Advanced " is-open ="false ">
7185 < table class ="table table-striped table-responsive settingsTable " style ="width: 100% ">
7286 < tr >
@@ -103,23 +117,6 @@ <h4 style="text-align: center;">
103117 </ td >
104118 </ tr >
105119 </ 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 >
123120 </ div >
124121 </ uib-accordion >
125122 < div style ="text-align: center; ">
@@ -207,10 +204,10 @@ <h4 style="text-align: center;">
207204 $scope . liveClick = function ( newValue ) {
208205 if ( newValue === "true" ) {
209206 $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 ." ;
211208 } else {
212209 $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 ." ;
214211 }
215212 } ;
216213 $scope . liveClick ( $scope . radioLive ) ;
0 commit comments