placeholder table action buttons
This commit is contained in:
Vendored
+1
@@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
require('./bootstrap')
|
||||
|
||||
let url_slug = require('./url-slug')
|
||||
|
||||
$(function () {
|
||||
|
||||
Vendored
+1
-2
@@ -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) {}
|
||||
|
||||
|
||||
+2
-2
@@ -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";
|
||||
|
||||
Vendored
+4
@@ -17,6 +17,10 @@
|
||||
.mobile-only {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mobile-no-border {
|
||||
border: 0 none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.border-dashed {
|
||||
|
||||
@@ -8,100 +8,200 @@
|
||||
|
||||
@section('content')
|
||||
<div class="row justify-content-start px-3">
|
||||
<h2 class="d-flex w-100 align-items-baseline">
|
||||
<small class="small2 flex-grow-1">
|
||||
<div class="d-flex w-100 align-items-center">
|
||||
<small class="flex-grow-1" style="font-size: 120%;">
|
||||
<a href="{{route('profile.view', $table->owner->name)}}" class="link-no-color">{{ $table->owner->handle }}</a>{{--
|
||||
--}}<span class="px-1">/</span>{{--
|
||||
--}}{{ $table->name }}
|
||||
</small>
|
||||
|
||||
<span class="">{{ $table->title }}</span>
|
||||
</h2>
|
||||
</div>
|
||||
<h1 class="mx-3">{{ $table->title }}</h1>
|
||||
|
||||
<div class="row mx-auto col-md-12 justify-content-center mb-1 border rounded px-0 py-2 box-shadow mb-3">
|
||||
<div class="col-md-6">
|
||||
@if($table->description)
|
||||
<b>Description</b>
|
||||
{!! Widget::collapsible($table->description, 400, '8em') !!}
|
||||
@endif
|
||||
<nav>
|
||||
@sr(Table actions){{--
|
||||
--}}<ul class="sr-list">
|
||||
|
||||
@if($table->origin)
|
||||
<p class="last-p-mb-0">
|
||||
<b>Source</b><br>
|
||||
@icon(fa-link){!! Widget::tryLink($table->origin) !!}
|
||||
</p>
|
||||
@endif
|
||||
<li>
|
||||
<div class="btn-group" role="group" aria-label="Table Actions">
|
||||
@if(!guest() && !user()->ownsTable($table))
|
||||
<a href="" class="btn btn-outline-primary py-1 btn-sm" title="Fork"
|
||||
data-toggle="tooltip" data-placement="top">
|
||||
{{ $table->forks()->count() ?: '–' }}
|
||||
@icon(fa-code-fork, sr:Fork)
|
||||
</a>
|
||||
@endif
|
||||
|
||||
@if($table->favouritingUsers()->where('id', user()->getKey())->exists())
|
||||
<a href="" class="btn btn-outline-primary py-1 btn-sm" title="Un-favourite"
|
||||
data-toggle="tooltip" data-placement="top">
|
||||
{{ $table->favouritingUsers()->count() ?: '–' }}
|
||||
@icon(fa-star, sr:Un-favourite)
|
||||
</a>
|
||||
@else
|
||||
<a href="" class="btn btn-outline-primary py-1 btn-sm" title="Favourite"
|
||||
data-toggle="tooltip" data-placement="top">
|
||||
{{ $table->favouritingUsers()->count() ?: '–' }}
|
||||
@icon(fa-star-o, sr:Favourite)
|
||||
</a>
|
||||
@endif
|
||||
|
||||
<a href="" class="btn btn-outline-primary py-1 btn-sm" title="Comments"
|
||||
data-toggle="tooltip" data-placement="top">
|
||||
{{ $table->comments()->count() ?: '–' }}
|
||||
@icon(fa-comment, sr:Comments)
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@if(!guest())
|
||||
<li>
|
||||
<div class="btn-group" role="group" aria-label="Change Proposals">
|
||||
<a href="" class="btn btn-outline-primary py-1 btn-sm" title="Change Proposals"
|
||||
data-toggle="tooltip" data-placement="top">
|
||||
{{ $table->proposals()->count() ?: '–' }}
|
||||
@icon(fa-inbox, sr:Change Proposals)
|
||||
</a>
|
||||
<a href="" class="btn btn-outline-primary py-1 btn-sm" title="Draft Change"
|
||||
data-toggle="tooltip" data-placement="top">
|
||||
@icon(fa-pencil, sr:Propose Change)
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 border-left">
|
||||
<table>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<th class="text-right pr-2">Author</th>
|
||||
<td>
|
||||
{{ $table->owner->title }}
|
||||
(<a href="{{route('profile.view', $table->owner->name)}}">{{ $table->owner->handle }}</a>)
|
||||
</td>
|
||||
</tr>
|
||||
<div class="row mx-auto col-md-12 justify-content-center mb-1 border rounded px-0 py-2 box-shadow mb-3">
|
||||
<div class="col-md-10 tab-content order-1" id="infobox-tabContent">
|
||||
|
||||
<tr>
|
||||
<th class="text-right pr-2">License</th>
|
||||
<td>{{ $table->license ?: 'CC0' }}</td>
|
||||
</tr>
|
||||
{{-- Tab pane --}}
|
||||
<div class="tab-pane show active container" id="infobox-home" role="tabpanel" aria-labelledby="infobox-home-tab">
|
||||
<div class="row">
|
||||
|
||||
<tr>
|
||||
<th class="text-right pr-2">Created</th>
|
||||
<td>{{ $table->created_at->format("M j, Y") }}</td>
|
||||
</tr>
|
||||
{{-- Description field --}}
|
||||
<div class="col-md-8 pl-md-0">
|
||||
@if($table->description)
|
||||
<b>Description</b>
|
||||
{!! Widget::collapsible($table->description, 400, '8em') !!}
|
||||
@if($table->origin)
|
||||
<div class="mt-2"></div>{{-- spacer --}}
|
||||
@endif
|
||||
@endif
|
||||
|
||||
<tr>
|
||||
<th class="text-right pr-2">Updated</th>
|
||||
<td>{{ $table->updated_at->format("M j, Y") }}</td>
|
||||
</tr>
|
||||
@if($table->origin)
|
||||
<p class="last-p-mb-0">
|
||||
<b>Adapted From</b><br>
|
||||
{!! Widget::tryLink($table->origin) !!}
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<tr>
|
||||
<th class="text-right pr-2">Revisions</th>
|
||||
<td>{{ $table->revisions()->count() }}</td>
|
||||
</tr>
|
||||
{{-- Info table --}}
|
||||
<div class="col-md-4 border-left my-md-0 my-2 pr-md-0 mobile-no-border">
|
||||
<table>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<th class="text-right pr-2">Author</th>
|
||||
<td>
|
||||
{{ $table->owner->title }}
|
||||
(<a href="{{route('profile.view', $table->owner->name)}}">{{ $table->owner->handle }}</a>)
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th class="text-right pr-2">License</th>
|
||||
<td>{{ $table->license ?: 'CC0' }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th class="text-right pr-2">Created</th>
|
||||
<td>{{ $table->created_at->format("M j, Y") }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th class="text-right pr-2">Updated</th>
|
||||
<td>{{ $table->updated_at->format("M j, Y") }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th class="text-right pr-2">Revisions</th>
|
||||
<td>{{ $table->revisions()->count() }}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>{{-- inner row --}}
|
||||
</div>{{-- Tab container --}}
|
||||
|
||||
<div class="tab-pane container" id="infobox-columns" role="tabpanel" aria-labelledby="infobox-columns-tab">
|
||||
Column toggles, sort, filtering … coming soon
|
||||
</div>
|
||||
|
||||
<div class="tab-pane container" id="infobox-export" role="tabpanel" aria-labelledby="infobox-export-tab">
|
||||
Export … coming soon
|
||||
</div>
|
||||
|
||||
</div>{{-- Tab panel --}}
|
||||
|
||||
{{-- Right column with menu --}}
|
||||
<div class="col-md-2 border-left order-md-2 order-0 mb-md-0 mb-2">
|
||||
|
||||
<div class="nav flex-md-column flex-row nav-pills" id="infobox-tab" role="tablist" aria-orientation="vertical">
|
||||
<a class="nav-link active"
|
||||
id="infobox-home-tab"
|
||||
data-toggle="pill" href="#infobox-home"
|
||||
role="tab" aria-controls="infobox-home"
|
||||
aria-selected="true">Table Info</a>
|
||||
|
||||
<a class="nav-link"
|
||||
id="infobox-columns-tab"
|
||||
data-toggle="pill" href="#infobox-columns"
|
||||
role="tab" aria-controls="infobox-columns"
|
||||
aria-selected="false">Columns</a>
|
||||
|
||||
<a class="nav-link"
|
||||
id="infobox-export-tab"
|
||||
data-toggle="pill" href="#infobox-export"
|
||||
role="tab" aria-controls="infobox-export"
|
||||
aria-selected="false">Export</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-md-2 border-left">
|
||||
Right Column with buttons etc, maybe
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-center mb-2">
|
||||
<div class="col-md-12 d-flex">
|
||||
<nav class="text-center ml-auto" aria-label="Pages of the table">
|
||||
{{ $rows->links(null, ['ulClass' => 'mb-0']) }}
|
||||
</nav>
|
||||
<div class="row justify-content-center mb-2">
|
||||
<div class="col-md-12 d-flex">
|
||||
<nav class="text-center" aria-label="Pages of the table">
|
||||
{{ $rows->links(null, ['ulClass' => 'mb-0']) }}
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-12">
|
||||
<table class="table table-hover table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
@foreach($columns as $col)
|
||||
<th>{{ $col->title }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($rows as $row)
|
||||
<tr>
|
||||
@php($rdata = json_decode($row['data'], true))
|
||||
@foreach($columns as $col)
|
||||
<td data-id="{{ $row->id }}">{{ $rdata[$col->name] }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-12">
|
||||
<table class="table table-hover table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
@foreach($columns as $col)
|
||||
<th>{{ $col->title }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($rows as $row)
|
||||
<tr>
|
||||
@php($rdata = json_decode($row['data'], true))
|
||||
@foreach($columns as $col)
|
||||
<td data-id="{{ $row->id }}">{{ $rdata[$col->name] }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user