Correct problem in spaqrl client in php 56 + add line numbering in result table
authorymh <ymh.work@gmail.com>
Thu, 03 Nov 2016 04:43:18 +0100
changeset 389 2204faa0b41a
parent 388 202b6f209b9a
child 390 f4fed295115b
Correct problem in spaqrl client in php 56 + add line numbering in result table
build/build.sh
server/src/app/Http/Controllers/Sparql/SparqlClientController.php
server/src/public/css/app.css
server/src/resources/assets/sass/_app-core.scss
server/src/resources/views/sparql/sparqlClientResultList.blade.php
--- a/build/build.sh	Thu Nov 03 03:05:43 2016 +0100
+++ b/build/build.sh	Thu Nov 03 04:43:18 2016 +0100
@@ -50,12 +50,14 @@
     echoblue "---> checking vagrant"
     if vagrant status | grep -q -v "running"; then
         echoblue "---> starting vagrant"
-        if type -t workon > /dev/null 2>&1; then
+        if which virtualenvwrapper.sh > /dev/null 2>&1 ; then
+            echoblue "---> activating ansible"
+            source `which virtualenvwrapper.sh`
             workon ansible
         fi
         vagrant up
         VAGRANT_STARTED=true
-        if type -t deactivate > /dev/null 2>&1; then
+        if type -t deactivate > /dev/null 2>&1 ; then
             deactivate
         fi
     fi
@@ -64,6 +66,7 @@
 
     popd > /dev/null
 
+    return 0
 }
 
 function usage() {
--- a/server/src/app/Http/Controllers/Sparql/SparqlClientController.php	Thu Nov 03 03:05:43 2016 +0100
+++ b/server/src/app/Http/Controllers/Sparql/SparqlClientController.php	Thu Nov 03 04:43:18 2016 +0100
@@ -142,6 +142,7 @@
 
 
             $countField = $countResult->getFields()[0];
+            $countResult->rewind();
             $count = $countResult->current()->$countField->getValue();
 
             $fields = $docs->getFields();
--- a/server/src/public/css/app.css	Thu Nov 03 03:05:43 2016 +0100
+++ b/server/src/public/css/app.css	Thu Nov 03 04:43:18 2016 +0100
@@ -5967,6 +5967,10 @@
 body, label, .checkbox label {
   font-weight: 300; }
 
+@-moz-document url-prefix() {
+  fieldset {
+    display: table-cell; } }
+
 .doc_details_title {
   margin-top: 0; }
 
@@ -6070,4 +6074,7 @@
 #baseExceptionCollapse {
   margin-top: 10px; }
 
+table.sparql-results th:first-child {
+  width: 2.5em; }
+
 /*# sourceMappingURL=app.css.map */
--- a/server/src/resources/assets/sass/_app-core.scss	Thu Nov 03 03:05:43 2016 +0100
+++ b/server/src/resources/assets/sass/_app-core.scss	Thu Nov 03 04:43:18 2016 +0100
@@ -3,6 +3,10 @@
 	font-weight: 300;
 }
 
+@-moz-document url-prefix() {
+  fieldset { display: table-cell; }
+}
+
 .doc_details_title {
 	@extend .h3;
 	margin-top: 0;
@@ -162,3 +166,8 @@
 #baseExceptionCollapse {
     margin-top: 10px;
 }
+
+table.sparql-results th:first-child
+{
+    width: 2.5em;
+}
--- a/server/src/resources/views/sparql/sparqlClientResultList.blade.php	Thu Nov 03 03:05:43 2016 +0100
+++ b/server/src/resources/views/sparql/sparqlClientResultList.blade.php	Thu Nov 03 04:43:18 2016 +0100
@@ -47,6 +47,7 @@
     <table class='sparql-results table table-striped table-hover'>
     <thead>
     <tr>
+        <th>#</th>
         @foreach ($fields as $field)
         <th>{{ $fieldPrefix }}{{ $field }}</th>
         @endforeach
@@ -55,6 +56,11 @@
     <tbody>
         @foreach ($results as $row)
         <tr>
+            @if($results instanceof Illuminate\Pagination\LengthAwarePaginator)
+            <th scope="row" class="text-muted">{{ $results->firstItem() + $loop->index }}</th>
+            @else
+            <th scope="row" class="text-muted">{{ $loop->iteration }}</th>
+            @endif
             @foreach ($fields as $field)
             <td>{!! $row[$field] !!}</td>
             @endforeach