diff --git a/resources/views/table/_action-buttons.blade.php b/resources/views/table/_action-buttons.blade.php new file mode 100644 index 0000000..10d6a15 --- /dev/null +++ b/resources/views/table/_action-buttons.blade.php @@ -0,0 +1,57 @@ +{{-- + args: $table +--}} + + diff --git a/resources/views/table/_panel-metadata.blade.php b/resources/views/table/_panel-metadata.blade.php new file mode 100644 index 0000000..b08f9b7 --- /dev/null +++ b/resources/views/table/_panel-metadata.blade.php @@ -0,0 +1,81 @@ +{{-- + args: $table +--}} + +
+ + {{-- Description field --}} +
+ Description + @if($table->description) + {!! Widget::collapsible($table->description, 400, '8em') !!} + @if($table->origin) +
{{-- spacer --}} + @endif + @else +

+ No description. +

+ @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->diffForHumans() }} + +
Updated + + {{ $table->updated_at->diffForHumans() }} + +
Revisions{{ $table->revisions_count }}
Visits{{ $table->visits }}  {!! Widget::help('Visitors counted once per day') !!}
+
+ +
{{-- inner row --}} diff --git a/resources/views/table/_rows.blade.php b/resources/views/table/_rows.blade.php new file mode 100644 index 0000000..3e28d8e --- /dev/null +++ b/resources/views/table/_rows.blade.php @@ -0,0 +1,23 @@ +{{-- + args: $rows, $cols +--}} + + + + + @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] }}
diff --git a/resources/views/table/view.blade.php b/resources/views/table/view.blade.php index 86c703e..8f18af0 100644 --- a/resources/views/table/view.blade.php +++ b/resources/views/table/view.blade.php @@ -17,210 +17,74 @@

{{ $table->title }}

- + @include('table._action-buttons')
-
- - {{-- Tab pane --}} -
-
- - {{-- Description field --}} -
- Description - @if($table->description) - {!! Widget::collapsible($table->description, 400, '8em') !!} - @if($table->origin) -
{{-- spacer --}} - @endif - @else -

- No description. -

- @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->diffForHumans() }} - -
Updated - - {{ $table->updated_at->diffForHumans() }} - -
Revisions{{ $table->revisions_count }}
Visits{{ $table->visits }}  {!! Widget::help('Visitors counted once per day') !!}
-
- -
{{-- inner row --}} -
{{-- Tab container --}} - -
- Column toggles, sort, filtering … coming soon -
-
- Export … coming soon -
+ {{-- Tab panels wrapper --}} +
-
{{-- Tab panel --}} - -{{-- Right column with menu --}} -
- - +
+ @include('table._panel-metadata') +
+ +
+ Column toggles, sort, filtering … coming soon +
+ +
+ Export … coming soon +
+ +
{{-- End of tab panels wrapper --}} + + {{-- Right column with menu --}} + + + Columns + + + + Export + + +
+
{{-- end of menu column --}} + +{{-- End of row --}}
-
- -
-
+
+ +
+{{-- End of row --}}
-
- - - - @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] }}
-
-
+
+ @include('table._rows') +
+{{-- End of row --}} + +
+
+ +
+
{{-- End of row --}} + @endsection