diff --git a/app/Http/Controllers/TableController.php b/app/Http/Controllers/TableController.php index cae1bc7..b1629fe 100644 --- a/app/Http/Controllers/TableController.php +++ b/app/Http/Controllers/TableController.php @@ -22,9 +22,10 @@ class TableController extends Controller /** @var Table $tableModel */ $tableModel = $user->tables()->where('name', $table)->first(); + // make it possible to show other revisions if ($input->has('rev')) { $rev = (int)$input->rev; - $revision = $tableModel->revisions()->orderBy('created_at')->skip($rev)->first(); + $revision = $tableModel->revisions()->orderBy('created_at')->skip($rev - 1)->first(); if ($revision === null) abort(404, "No such revision"); } else { $revision = $tableModel->revision; diff --git a/app/Models/User.php b/app/Models/User.php index 8988e78..ad09db3 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -177,4 +177,9 @@ class User extends Authenticatable return parent::__get($name); } + + public function ownsTable(Table $table) + { + return $table->owner_id == $this->id; + } } diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 0af6463..44d8fb8 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -49,11 +49,20 @@ class AppServiceProvider extends ServiceProvider $classes = trim($classes); $title = trim($title); + $notooltip = false; + + if (strpos($title, 'sr:') === 0) { + $notooltip = true; + $title = substr($title, 3); + } + $sr = str_replace('~', ' ', e($title)); - $tit = str_replace('~', '', e(trim($title, ' \r\n\t:,'))); + $tit = str_replace('~', '', e(trim($title, " \r\n\t:,"))); return '' . $sr . '' . - ''; + ''; } else { return ''; } diff --git a/public/fonts/fa-dtbl-1-preview.html b/public/fonts/fa-dtbl-1-preview.html index 076266b..e950de0 100644 --- a/public/fonts/fa-dtbl-1-preview.html +++ b/public/fonts/fa-dtbl-1-preview.html @@ -170,7 +170,7 @@ .fa-clock-o:before, .fa-cloud-upload:before, .fa-code-fork:before, -.fa-comments:before, +.fa-comment:before, .fa-download:before, .fa-eye:before, .fa-eye-slash:before, @@ -183,6 +183,7 @@ .fa-globe:before, .fa-google:before, .fa-history:before, +.fa-inbox:before, .fa-key-modern:before, .fa-link:before, .fa-pencil:before, @@ -232,7 +233,7 @@ .fa-clock-o:before { content: "\f106"; } .fa-cloud-upload:before { content: "\f107"; } .fa-code-fork:before { content: "\f108"; } -.fa-comments:before { content: "\f109"; } +.fa-comment:before { content: "\f109"; } .fa-download:before { content: "\f10a"; } .fa-eye:before { content: "\f10b"; } .fa-eye-slash:before { content: "\f10c"; } @@ -245,32 +246,33 @@ .fa-globe:before { content: "\f113"; } .fa-google:before { content: "\f114"; } .fa-history:before { content: "\f115"; } -.fa-key-modern:before { content: "\f116"; } -.fa-link:before { content: "\f117"; } -.fa-pencil:before { content: "\f118"; } -.fa-pencil-square-o:before { content: "\f119"; } -.fa-question-circle:before { content: "\f11a"; } -.fa-quote-left:before { content: "\f11b"; } -.fa-reply:before { content: "\f11c"; } -.fa-rss:before { content: "\f11d"; } -.fa-search:before { content: "\f11e"; } -.fa-share-alt:before { content: "\f11f"; } -.fa-sign-in:before { content: "\f120"; } -.fa-sign-out:before { content: "\f121"; } -.fa-sliders:before { content: "\f122"; } -.fa-sort:before { content: "\f123"; } -.fa-sort-asc:before { content: "\f124"; } -.fa-sort-desc:before { content: "\f125"; } -.fa-star:before { content: "\f126"; } -.fa-star-o:before { content: "\f127"; } -.fa-table:before { content: "\f128"; } -.fa-th-list:before { content: "\f129"; } -.fa-times:before { content: "\f12a"; } -.fa-trash:before { content: "\f12b"; } -.fa-trash-o:before { content: "\f12c"; } -.fa-user-circle-o:before { content: "\f12d"; } -.fa-user-plus:before { content: "\f12e"; } -.fa-wrench:before { content: "\f12f"; } +.fa-inbox:before { content: "\f116"; } +.fa-key-modern:before { content: "\f117"; } +.fa-link:before { content: "\f118"; } +.fa-pencil:before { content: "\f119"; } +.fa-pencil-square-o:before { content: "\f11a"; } +.fa-question-circle:before { content: "\f11b"; } +.fa-quote-left:before { content: "\f11c"; } +.fa-reply:before { content: "\f11d"; } +.fa-rss:before { content: "\f11e"; } +.fa-search:before { content: "\f11f"; } +.fa-share-alt:before { content: "\f120"; } +.fa-sign-in:before { content: "\f121"; } +.fa-sign-out:before { content: "\f122"; } +.fa-sliders:before { content: "\f123"; } +.fa-sort:before { content: "\f124"; } +.fa-sort-asc:before { content: "\f125"; } +.fa-sort-desc:before { content: "\f126"; } +.fa-star:before { content: "\f127"; } +.fa-star-o:before { content: "\f128"; } +.fa-table:before { content: "\f129"; } +.fa-th-list:before { content: "\f12a"; } +.fa-times:before { content: "\f12b"; } +.fa-trash:before { content: "\f12c"; } +.fa-trash-o:before { content: "\f12d"; } +.fa-user-circle-o:before { content: "\f12e"; } +.fa-user-plus:before { content: "\f12f"; } +.fa-wrench:before { content: "\f130"; } @@ -286,7 +288,7 @@
-

fa-dtbl-1 contains 48 glyphs:

+

fa-dtbl-1 contains 49 glyphs:

Toggle Preview Characters
@@ -411,13 +413,13 @@
- PpPpPpPpPpPpPpPpPpPp + PpPpPpPpPpPpPpPpPpPp
12141618212436486072
- +
@@ -580,6 +582,19 @@
+
+
+ PpPpPpPpPpPpPpPpPpPp +
+
+ 12141618212436486072 +
+
+ + +
+
+
PpPpPpPpPpPpPpPpPpPp @@ -589,7 +604,7 @@
- +
@@ -602,7 +617,7 @@
- +
@@ -615,7 +630,7 @@
- +
@@ -629,7 +644,7 @@
- +
@@ -642,7 +657,7 @@
- +
@@ -655,7 +670,7 @@
- +
@@ -668,7 +683,7 @@
- +
@@ -681,7 +696,7 @@
- +
@@ -694,7 +709,7 @@
- +
@@ -707,7 +722,7 @@
- +
@@ -720,7 +735,7 @@
- +
@@ -733,7 +748,7 @@
- +
@@ -746,7 +761,7 @@
- +
@@ -759,7 +774,7 @@
- +
@@ -772,7 +787,7 @@
- +
@@ -785,7 +800,7 @@
- +
@@ -798,7 +813,7 @@
- +
@@ -811,7 +826,7 @@
- +
@@ -824,7 +839,7 @@
- +
@@ -837,7 +852,7 @@
- +
@@ -851,7 +866,7 @@
- +
@@ -864,7 +879,7 @@
- +
@@ -877,7 +892,7 @@
- +
@@ -890,7 +905,7 @@
- +
@@ -903,7 +918,7 @@
- +
@@ -916,7 +931,7 @@
- +
diff --git a/public/fonts/fa-dtbl-1.css b/public/fonts/fa-dtbl-1.css index 4649bcf..70017fb 100644 --- a/public/fonts/fa-dtbl-1.css +++ b/public/fonts/fa-dtbl-1.css @@ -47,7 +47,7 @@ .fa-clock-o::before { content: "\f106"; } .fa-cloud-upload::before { content: "\f107"; } .fa-code-fork::before { content: "\f108"; } -.fa-comments::before { content: "\f109"; } +.fa-comment::before { content: "\f109"; } .fa-download::before { content: "\f10a"; } .fa-eye::before { content: "\f10b"; } .fa-eye-slash::before { content: "\f10c"; } @@ -60,29 +60,30 @@ .fa-globe::before { content: "\f113"; } .fa-google::before { content: "\f114"; } .fa-history::before { content: "\f115"; } -.fa-key-modern::before { content: "\f116"; } -.fa-link::before { content: "\f117"; } -.fa-pencil::before { content: "\f118"; } -.fa-pencil-square-o::before, .fa-edit::before { content: "\f119"; } -.fa-question-circle::before { content: "\f11a"; } -.fa-quote-left::before { content: "\f11b"; } -.fa-reply::before { content: "\f11c"; } -.fa-rss::before { content: "\f11d"; } -.fa-search::before { content: "\f11e"; } -.fa-share-alt::before { content: "\f11f"; } -.fa-sign-in::before { content: "\f120"; } -.fa-sign-out::before { content: "\f121"; } -.fa-sliders::before { content: "\f122"; } -.fa-sort::before { content: "\f123"; } -.fa-sort-asc::before { content: "\f124"; } -.fa-sort-desc::before { content: "\f125"; } -.fa-star::before { content: "\f126"; } -.fa-star-o::before { content: "\f127"; } -.fa-table::before { content: "\f128"; } -.fa-th-list::before { content: "\f129"; } -.fa-times::before, .fa-close::before { content: "\f12a"; } -.fa-trash::before { content: "\f12b"; } -.fa-trash-o::before { content: "\f12c"; } -.fa-user-circle-o::before { content: "\f12d"; } -.fa-user-plus::before { content: "\f12e"; } -.fa-wrench::before { content: "\f12f"; } +.fa-inbox::before { content: "\f116"; } +.fa-key-modern::before { content: "\f117"; } +.fa-link::before { content: "\f118"; } +.fa-pencil::before { content: "\f119"; } +.fa-pencil-square-o::before, .fa-edit::before { content: "\f11a"; } +.fa-question-circle::before { content: "\f11b"; } +.fa-quote-left::before { content: "\f11c"; } +.fa-reply::before { content: "\f11d"; } +.fa-rss::before { content: "\f11e"; } +.fa-search::before { content: "\f11f"; } +.fa-share-alt::before { content: "\f120"; } +.fa-sign-in::before { content: "\f121"; } +.fa-sign-out::before { content: "\f122"; } +.fa-sliders::before { content: "\f123"; } +.fa-sort::before { content: "\f124"; } +.fa-sort-asc::before { content: "\f125"; } +.fa-sort-desc::before { content: "\f126"; } +.fa-star::before { content: "\f127"; } +.fa-star-o::before { content: "\f128"; } +.fa-table::before { content: "\f129"; } +.fa-th-list::before { content: "\f12a"; } +.fa-times::before, .fa-close::before { content: "\f12b"; } +.fa-trash::before { content: "\f12c"; } +.fa-trash-o::before { content: "\f12d"; } +.fa-user-circle-o::before { content: "\f12e"; } +.fa-user-plus::before { content: "\f12f"; } +.fa-wrench::before { content: "\f130"; } diff --git a/public/fonts/fa-dtbl-1.eot b/public/fonts/fa-dtbl-1.eot index f9fe723..601d963 100644 Binary files a/public/fonts/fa-dtbl-1.eot and b/public/fonts/fa-dtbl-1.eot differ diff --git a/public/fonts/fa-dtbl-1.svg b/public/fonts/fa-dtbl-1.svg index 0eab3bb..15de0cf 100644 --- a/public/fonts/fa-dtbl-1.svg +++ b/public/fonts/fa-dtbl-1.svg @@ -5,7 +5,7 @@ --> -Created by FontForge 20170805 at Sat Jul 28 09:08:34 2018 +Created by FontForge 20170805 at Sat Jul 28 18:34:22 2018 By ondra The Fork Awesome font is licensed under the SIL OFL 1.1 (http://scripts.sil.org/OFL). Fork Awesome is a fork based of off Font Awesome 4.7.0 by Dave Gandy. More info on licenses at https://forkawesome.github.io @@ -19,10 +19,10 @@ The Fork Awesome font is licensed under the SIL OFL 1.1 (http://scripts.sil.org/ panose-1="2 0 5 3 0 0 0 0 0 0" ascent="1536" descent="-256" - bbox="-0.0376684 -256 2048 1536.01" + bbox="-0.0376684 -256.168 2048 1536.01" underline-thickness="89.6" underline-position="-179.2" - unicode-range="U+0020-F12F" + unicode-range="U+0020-F130" /> - + - + - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/fonts/fa-dtbl-1.ttf b/public/fonts/fa-dtbl-1.ttf index 41d1c4e..3df7d2d 100644 Binary files a/public/fonts/fa-dtbl-1.ttf and b/public/fonts/fa-dtbl-1.ttf differ diff --git a/public/fonts/fa-dtbl-1.woff2 b/public/fonts/fa-dtbl-1.woff2 index bc4871a..3a7eeca 100644 Binary files a/public/fonts/fa-dtbl-1.woff2 and b/public/fonts/fa-dtbl-1.woff2 differ diff --git a/resources/assets/js/app.js b/resources/assets/js/app.js index 8115045..cde0ca4 100644 --- a/resources/assets/js/app.js +++ b/resources/assets/js/app.js @@ -5,6 +5,7 @@ */ require('./bootstrap') + let url_slug = require('./url-slug') $(function () { diff --git a/resources/assets/js/bootstrap.js b/resources/assets/js/bootstrap.js index e343ab0..c71b30a 100644 --- a/resources/assets/js/bootstrap.js +++ b/resources/assets/js/bootstrap.js @@ -1,6 +1,6 @@ // window._ = require('lodash'); -// window.Popper = require('popper.js').default; +window.Popper = require('popper.js').default; /** * We'll load jQuery and the Bootstrap jQuery plugin which provides support @@ -10,7 +10,6 @@ try { window.$ = window.jQuery = require('jquery'); - require('bootstrap'); } catch (e) {} diff --git a/resources/assets/sass/_bootstrap.scss b/resources/assets/sass/_bootstrap.scss index bbb5065..53bb168 100644 --- a/resources/assets/sass/_bootstrap.scss +++ b/resources/assets/sass/_bootstrap.scss @@ -19,7 +19,7 @@ @import "~bootstrap/scss/button-group"; @import "~bootstrap/scss/input-group"; @import "~bootstrap/scss/custom-forms"; -//@import "~bootstrap/scss/nav"; +@import "~bootstrap/scss/nav"; @import "~bootstrap/scss/navbar"; @import "~bootstrap/scss/card"; @import "~bootstrap/scss/breadcrumb"; @@ -36,4 +36,4 @@ @import "~bootstrap/scss/popover"; //@import "~bootstrap/scss/carousel"; @import "~bootstrap/scss/utilities"; -//@import "~bootstrap/scss/print"; +@import "~bootstrap/scss/print"; diff --git a/resources/assets/sass/_helpers.scss b/resources/assets/sass/_helpers.scss index bdf5c94..5fe8052 100644 --- a/resources/assets/sass/_helpers.scss +++ b/resources/assets/sass/_helpers.scss @@ -17,6 +17,10 @@ .mobile-only { display: none; } + + .mobile-no-border { + border: 0 none !important; + } } .border-dashed { diff --git a/resources/views/table/view.blade.php b/resources/views/table/view.blade.php index de5a06d..f704726 100644 --- a/resources/views/table/view.blade.php +++ b/resources/views/table/view.blade.php @@ -8,100 +8,200 @@ @section('content')
-

- +
+ {{ $table->owner->handle }}{{-- --}}/{{-- --}}{{ $table->name }} - {{ $table->title }} -

-
- -
-
- @if($table->description) - Description - {!! Widget::collapsible($table->description, 400, '8em') !!} - @endif - - @if($table->origin) -

- Source
- @icon(fa-link){!! Widget::tryLink($table->origin) !!} -

- @endif -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Author - {{ $table->owner->title }} - ({{ $table->owner->handle }}) -
License{{ $table->license ?: 'CC0' }}
Created{{ $table->created_at->format("M j, Y") }}
Updated{{ $table->updated_at->format("M j, Y") }}
Revisions{{ $table->revisions()->count() }}
+

{{ $table->title }}

+ + +
-
- Right Column with buttons etc, maybe + +
+
+ + {{-- Tab pane --}} +
+
+ + {{-- Description field --}} +
+ @if($table->description) + Description + {!! Widget::collapsible($table->description, 400, '8em') !!} + @if($table->origin) +
{{-- spacer --}} + @endif + @endif + + @if($table->origin) +

+ Adapted From
+ {!! Widget::tryLink($table->origin) !!} +

+ @endif +
+ + {{-- Info table --}} +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Author + {{ $table->owner->title }} + ({{ $table->owner->handle }}) +
License{{ $table->license ?: 'CC0' }}
Created{{ $table->created_at->format("M j, Y") }}
Updated{{ $table->updated_at->format("M j, Y") }}
Revisions{{ $table->revisions()->count() }}
+
+ +
{{-- inner row --}} +
{{-- Tab container --}} + +
+ Column toggles, sort, filtering … coming soon +
+ +
+ Export … coming soon +
+ +
{{-- Tab panel --}} + + {{-- Right column with menu --}} +
+ + + +
+
-
-
-
- +
+
+ +
-
- -
-
- - - - @foreach($columns as $col) - - @endforeach - - - - @foreach($rows as $row) - - @php($rdata = json_decode($row['data'], true)) - @foreach($columns as $col) - - @endforeach - - @endforeach - -
{{ $col->title }}
{{ $rdata[$col->name] }}
+ +
+
+ + + + @foreach($columns as $col) + + @endforeach + + + + @foreach($rows as $row) + + @php($rdata = json_decode($row['data'], true)) + @foreach($columns as $col) + + @endforeach + + @endforeach + +
{{ $col->title }}
{{ $rdata[$col->name] }}
+
-
-@endsection + @endsection