mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
#3553 Ad post contact - Options Design
This commit is contained in:
parent
de59149942
commit
038e85bf45
@ -164,8 +164,7 @@
|
||||
<label for="productOptions">
|
||||
{{ trans('visiosoft.module.advs::field.product_option.name') }}
|
||||
</label>
|
||||
<div class="mt-3">
|
||||
{# {{ dd(form.fields.product_options_value) }}#}
|
||||
<div class="mt-3 form-group mb-0">
|
||||
{{ form.fields.product_options_value.configSet('cat1', adv.cat1).input|raw }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1,15 +0,0 @@
|
||||
.multiple-field_type .selected {
|
||||
margin-top: 15px;
|
||||
}
|
||||
.multiple-field_type .selected table tr td {
|
||||
padding: 0.5rem;
|
||||
border-top: none;
|
||||
border-bottom: none;
|
||||
}
|
||||
.multiple-field_type .selected table tr td:first-of-type {
|
||||
width: 0;
|
||||
padding-right: 15px;
|
||||
}
|
||||
.multiple-field_type .selected table tr td:last-of-type {
|
||||
padding-left: 15px;
|
||||
}
|
||||
@ -0,0 +1,285 @@
|
||||
/* Main styles */
|
||||
.multiple-field_type .selected {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.multiple-field_type .selected table tr td {
|
||||
padding: 0.5rem;
|
||||
border-top: none;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.multiple-field_type .selected table tr td:first-of-type {
|
||||
width: 0;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
.multiple-field_type .selected table tr td:last-of-type {
|
||||
padding-left: 15px;
|
||||
}
|
||||
/* End main styles */
|
||||
|
||||
/* Button */
|
||||
.multiple-select-btn {
|
||||
background-color: #6E5DDB;
|
||||
padding: 1rem 2rem;
|
||||
font-family: 'Poppins', sans-serif;
|
||||
font-size: 18px;
|
||||
border-radius: .25rem;
|
||||
border: 0;
|
||||
color: #fff;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
margin-bottom: 2rem;
|
||||
|
||||
&:hover {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
/* End Button */
|
||||
|
||||
/* Modal */
|
||||
.modal {
|
||||
.modal-dialog {
|
||||
@media only screen and (min-width: 576px) {
|
||||
max-width: 840px;
|
||||
margin: 1.75rem auto;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
.modal-header {
|
||||
padding: 0;
|
||||
display: block;
|
||||
border: 0;
|
||||
|
||||
.btn-wrapper {
|
||||
text-align: right;
|
||||
|
||||
button {
|
||||
margin: 1.5rem 1.5rem .25rem;
|
||||
padding: 0;
|
||||
background: none;
|
||||
border: 0;
|
||||
|
||||
svg {
|
||||
width: 2.25rem;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
h4 {
|
||||
color: #6E5DDB;
|
||||
padding: 0 5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.table-filters {
|
||||
padding: 0 5rem;
|
||||
margin: 2rem 0;
|
||||
|
||||
form {
|
||||
justify-content: space-between;
|
||||
|
||||
select {
|
||||
border: 0;
|
||||
box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
|
||||
font-size: 14px;
|
||||
font-family: 'Poppins', sans-serif;
|
||||
font-weight: 500;
|
||||
padding: .5rem 1.5rem;
|
||||
height: initial;
|
||||
}
|
||||
|
||||
.filter-buttons {
|
||||
button {
|
||||
background-color: #6e5ddb;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
a {
|
||||
border-color: #6e5ddb;
|
||||
color: #6e5ddb;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.table-responsive {
|
||||
padding: 0 5rem;
|
||||
|
||||
table {
|
||||
thead {
|
||||
tr {
|
||||
th {
|
||||
border-bottom: 1px solid #E5E5E5;
|
||||
border-top: 0;
|
||||
font-family: 'Poppins', sans-serif;
|
||||
font-size: 19px;
|
||||
font-weight: 600;
|
||||
color: #505050;
|
||||
|
||||
&.buttons {
|
||||
display: none;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #505050;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tbody {
|
||||
td {
|
||||
border-bottom: 1px solid #E5E5E5;
|
||||
font-size: 19px;
|
||||
font-family: 'Poppins', sans-serif;
|
||||
font-weight: 500;
|
||||
color: #505050;
|
||||
|
||||
&.buttons {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tfoot {
|
||||
th {
|
||||
border: 0;
|
||||
padding: 1.35rem 0 !important;
|
||||
|
||||
button {
|
||||
background-color: #6E5DDB;
|
||||
padding: 1rem 2rem;
|
||||
font-family: 'Poppins', sans-serif;
|
||||
font-size: 18px;
|
||||
border-radius: .25rem;
|
||||
border: 0;
|
||||
color: #fff;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
|
||||
&:focus {
|
||||
box-shadow: unset;
|
||||
}
|
||||
|
||||
i {
|
||||
margin-right: .25rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
td {
|
||||
padding: .5rem 0;
|
||||
border: 0;
|
||||
color: #999;
|
||||
|
||||
small {
|
||||
font-size: 15px;
|
||||
color: #999 !important;
|
||||
font-family: 'Poppins', sans-serif;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/* End Modal */
|
||||
|
||||
/* Value table */
|
||||
.multiple-field_type-value-table {
|
||||
.table-responsive {
|
||||
padding: 0 4rem;
|
||||
|
||||
table {
|
||||
thead {
|
||||
tr {
|
||||
th {
|
||||
border-bottom: 1px solid #E5E5E5;
|
||||
border-top: 0;
|
||||
font-family: 'Poppins', sans-serif;
|
||||
font-size: 19px;
|
||||
font-weight: 600;
|
||||
color: #505050;
|
||||
|
||||
a {
|
||||
color: #505050;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tbody {
|
||||
td {
|
||||
border-bottom: 1px solid #E5E5E5;
|
||||
font-size: 19px;
|
||||
font-family: 'Poppins', sans-serif;
|
||||
font-weight: 500;
|
||||
color: #505050;
|
||||
|
||||
&.buttons {
|
||||
a {
|
||||
background-color: unset;
|
||||
border: 0;
|
||||
color: #DC3545;
|
||||
font-family: 'Poppins', sans-serif;
|
||||
font-weight: 500;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
line-height: 1;
|
||||
font-size: 17px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
i {
|
||||
margin-right: .5rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tfoot {
|
||||
th {
|
||||
border: 0;
|
||||
padding: 1.35rem 0 !important;
|
||||
|
||||
button {
|
||||
background-color: #6E5DDB;
|
||||
padding: 1rem 2rem;
|
||||
font-family: 'Poppins', sans-serif;
|
||||
font-size: 18px;
|
||||
border-radius: .25rem;
|
||||
border: 0;
|
||||
color: #fff;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
|
||||
&:focus {
|
||||
box-shadow: unset;
|
||||
}
|
||||
|
||||
i {
|
||||
margin-right: .25rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
td {
|
||||
padding: .5rem 0;
|
||||
border: 0;
|
||||
color: #999;
|
||||
|
||||
small {
|
||||
font-size: 15px;
|
||||
color: #999 !important;
|
||||
font-family: 'Poppins', sans-serif;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/* End Value table */
|
||||
@ -0,0 +1,6 @@
|
||||
<svg id="Group_42321" data-name="Group 42321" xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 30 30">
|
||||
<g id="Group_15874" data-name="Group 15874">
|
||||
<path id="Path_10381" data-name="Path 10381" d="M15,0A15,15,0,1,1,0,15,15,15,0,0,1,15,0Z" fill="#f8f8f8"/>
|
||||
<path id="close" d="M10.557.6l-.6-.6L5.278,4.675.6,0,0,.6,4.675,5.278,0,9.953l.6.6L5.278,5.882l4.675,4.675.6-.6L5.882,5.278Z" transform="translate(9.5 9.5)" fill="#c7c7c7" stroke="#c7c7c7" stroke-linecap="round" stroke-linejoin="round" stroke-width="0.7"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 570 B |
@ -0,0 +1,12 @@
|
||||
<svg id="add_5_" data-name="add (5)" xmlns="http://www.w3.org/2000/svg" width="19.96" height="19.96" viewBox="0 0 19.96 19.96">
|
||||
<g id="Group_16519" data-name="Group 16519">
|
||||
<g id="Group_16518" data-name="Group 16518">
|
||||
<path id="Path_10382" data-name="Path 10382" d="M9.98,0a9.98,9.98,0,1,0,9.98,9.98A9.991,9.991,0,0,0,9.98,0Zm0,18.414A8.434,8.434,0,1,1,18.414,9.98,8.444,8.444,0,0,1,9.98,18.414Z" fill="#fff"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="Group_16521" data-name="Group 16521" transform="translate(5.342 5.272)">
|
||||
<g id="Group_16520" data-name="Group 16520">
|
||||
<path id="Path_10383" data-name="Path 10383" d="M145.526,139.1h-3.092v-3.092a.773.773,0,0,0-1.546,0V139.1H137.8a.773.773,0,0,0,0,1.546h3.092v3.092a.773.773,0,0,0,1.546,0v-3.092h3.092a.773.773,0,1,0,0-1.546Z" transform="translate(-137.022 -135.238)" fill="#fff"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 898 B |
@ -1,9 +1,15 @@
|
||||
{{ asset_add('styles.css', 'visiosoft.field_type.multiple::css/lookup.css') }}
|
||||
{{ asset_add('styles.css', 'visiosoft.field_type.multiple::css/lookup.scss') }}
|
||||
{{ asset_add('scripts.js', 'visiosoft.field_type.multiple::js/lookup.js') }}
|
||||
|
||||
<a data-toggle="modal" data-target="#{{ field_type.field_name }}-modal" class="btn btn-success btn-xs" href="{{ url('streams/multiple-field_type/index/' ~ field_type.key) }}">
|
||||
{{ icon('search') }}
|
||||
{{ trans('streams::button.select') }}ss</a>
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
|
||||
|
||||
<a data-toggle="modal" data-target="#{{ field_type.field_name }}-modal"
|
||||
class="multiple-select-btn"
|
||||
href="{{ url('streams/multiple-field_type/index/' ~ field_type.key) }}">
|
||||
{{ img('visiosoft.field_type.multiple::images/plus.svg').data|raw }}
|
||||
<span class="ml-1">{{ trans('streams::button.select') }}</span>
|
||||
</a>
|
||||
|
||||
<input type="hidden" name="{{ field_type.input_name }}" value="{{ field_type.ids('id')|join(',') }}" {{ html_attributes(field_type.attributes) }} {{ field_type.disabled ? 'disabled' }} {{ field_type.readonly ? 'readonly' }}>
|
||||
|
||||
|
||||
@ -0,0 +1,53 @@
|
||||
{{ asset_add("scripts.js", "streams::js/table/table.js") }}
|
||||
|
||||
{% if not actions.isEmpty() %}
|
||||
{{ asset_add("scripts.js", "streams::js/table/actions.js") }}
|
||||
{% endif %}
|
||||
|
||||
{% if table.options.sortable %}
|
||||
{{ asset_add("scripts.js", "streams::js/table/sortable.js") }}
|
||||
{% endif %}
|
||||
|
||||
{{ view("visiosoft.field_type.multiple::table/ajax/heading", {'table': table}) }}
|
||||
|
||||
{{ view("visiosoft.field_type.multiple::table/ajax/views", {'table': table}) }}
|
||||
{{ view("visiosoft.field_type.multiple::table/ajax/filters", {'table': table}) }}
|
||||
|
||||
{% if table.rows.isEmpty() %}
|
||||
{% block no_results %}
|
||||
<div class="no-results">
|
||||
<p>
|
||||
{{ trans(table.options.get('no_results_message', 'streams::message.no_results')) }}
|
||||
</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
|
||||
{% if not table.rows.isEmpty() %}
|
||||
|
||||
{{ form_open({'url': url_full(), 'class': 'ajax'}) }}
|
||||
|
||||
<div class="table-responsive">
|
||||
<table
|
||||
class="
|
||||
table ajax table--ajax
|
||||
{{ table.options.class ?: 'table-condensed table--condensed' }}
|
||||
{{ table.options.sortable ? 'table--sortable' }}
|
||||
"
|
||||
{{ table.options.sortable ? 'data-sortable' }}
|
||||
{{ html_attributes(table.options.attributes) }}>
|
||||
|
||||
{{ view("visiosoft.field_type.multiple::table/ajax/header", {'table': table}) }}
|
||||
|
||||
{% block body %}
|
||||
{{ view("visiosoft.field_type.multiple::table/partials/body", {'table': table}) }}
|
||||
{% endblock %}
|
||||
|
||||
{{ view("streams::table/partials/footer", {'table': table}) }}
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{ form_close() }}
|
||||
|
||||
{% endif %}
|
||||
@ -0,0 +1,27 @@
|
||||
{% if not table.filters.isEmpty() %}
|
||||
<div class="table-filters">
|
||||
|
||||
{{ form_open({'method': 'get', 'id': 'filters', 'url': url_full(), 'class': 'ajax form-inline'}) }}
|
||||
<input type="hidden" name="{{ table.options.prefix }}view" value="{{ table.views.active().getSlug() }}">
|
||||
<input type="hidden" name="{{ table.options.prefix }}page" value="">
|
||||
|
||||
{% for filter in table.filters %}
|
||||
<div class="form-group">
|
||||
{{ filter.input|raw }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<div class="filter-buttons">
|
||||
<button type="submit" class="btn">
|
||||
{{ icon(table.options.filters.filter_icon ?: 'filter') }}
|
||||
{{ trans(table.options.filters.filter_text ?: 'streams::button.filter') }}
|
||||
</button>
|
||||
<a href="{{ url_current() }}" class="btn ajax">
|
||||
{{ icon(table.options.filters.clear_icon ? table.options.filters.clear_icon) }}
|
||||
{{ trans(table.options.filters.clear_text ?: 'streams::button.clear') }}
|
||||
</a>
|
||||
</div>
|
||||
{{ form_close() }}
|
||||
|
||||
</div>
|
||||
{% endif %}
|
||||
@ -0,0 +1,36 @@
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
{% if table.options.sortable %}
|
||||
<th style="width: 30px;"> </th>
|
||||
{% endif %}
|
||||
|
||||
{% if not table.actions.isEmpty() %}
|
||||
<th style="width: 30px;">
|
||||
<input data-toggle="all" type="checkbox">
|
||||
</th>
|
||||
{% endif %}
|
||||
|
||||
{% for header in table.headers %}
|
||||
<th>
|
||||
{% if header.sortable %}
|
||||
|
||||
{{ html_link(url_current() ~ '?' ~ header.getQueryString(), trans(header.heading), {'class': 'ajax'}) }}
|
||||
|
||||
{% if header.direction == 'asc' %}
|
||||
{{ icon('sort-ascending', 'text-muted') }}
|
||||
{% elseif header.direction == 'desc' %}
|
||||
{{ icon('sort-descending', 'text-muted') }}
|
||||
{% else %}
|
||||
{{ icon('sortable', 'text-muted') }}
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
{{ trans(header.heading)|raw }}
|
||||
{% endif %}
|
||||
</th>
|
||||
{% endfor %}
|
||||
|
||||
<th class="buttons"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -0,0 +1,19 @@
|
||||
{% if (table.options.title or table.options.description) and table.options.title %}
|
||||
<div class="modal-header">
|
||||
<div class="btn-wrapper">
|
||||
<button data-dismiss="modal">
|
||||
{{ img('visiosoft.field_type.multiple::images/close.svg').data|raw }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<h4 class="modal-title">
|
||||
{{ trans(table.options.title)|raw }}
|
||||
|
||||
{% if table.options.description %}
|
||||
<small class="clearfix">
|
||||
{{ trans(table.options.description)|raw }}
|
||||
</small>
|
||||
{% endif %}
|
||||
</h4>
|
||||
</div>
|
||||
{% endif %}
|
||||
@ -0,0 +1,14 @@
|
||||
{% if not table.views.isEmpty() %}
|
||||
<nav class="navbar navbar-light">
|
||||
<div class="nav navbar-nav">
|
||||
{% for view in table.views %}
|
||||
<a
|
||||
class="ajax nav-item nav-link {{ view.class }} {{ view.isActive() ? 'active' }}"
|
||||
{{ html_attributes(view.attributes) }}>
|
||||
{{ view.icon ? icon(view.icon)|raw }}
|
||||
{{ trans(view.getText()) }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</nav>
|
||||
{% endif %}
|
||||
@ -1,13 +1,23 @@
|
||||
<tbody>
|
||||
{% for row in table.rows %}
|
||||
<tr id="{{ loop.index }}">
|
||||
<tr id="{{ loop.index }}" class="{{ row.class }}">
|
||||
|
||||
<td style="width: 30px;">
|
||||
{{ icon('fa fa-arrows handle') }}
|
||||
</td>
|
||||
{% if table.options.sortable %}
|
||||
<td>
|
||||
{{ icon('fa fa-arrows handle') }}
|
||||
<input type="hidden" name="{{ row.table.options.prefix }}order[]" value="{{ row.key }}"/>
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{% if not table.actions.isEmpty() %}
|
||||
<td>
|
||||
<input type="checkbox" data-toggle="action" name="{{ row.table.options.prefix }}id[]" value="{{ row.key }}"/>
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{% for column in row.columns %}
|
||||
<td class="{{ column.class }}" {{ html_attributes(column.attributes) }}>
|
||||
<td data-title="{{ trans(column.heading) }}"
|
||||
class="{{ column.class }}" {{ html_attributes(column.attributes) }}>
|
||||
{{ column.value|raw }}
|
||||
</td>
|
||||
{% endfor %}
|
||||
|
||||
@ -2,14 +2,16 @@
|
||||
|
||||
{% if not table.rows.isEmpty() %}
|
||||
{% block panel %}
|
||||
<div class="{{ table.options.panel_class }} panel-table">
|
||||
<div class="{{ table.options.panel_class }} panel-table multiple-field_type-value-table">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table
|
||||
class="{{ table.options.class ?: 'table table-striped' }}"
|
||||
class="{{ table.options.class ?: 'table' }}"
|
||||
{{ table.options.sortable ? 'data-sortable' }}
|
||||
{{ html_attributes(table.options.attributes) }}>
|
||||
|
||||
{{ view("visiosoft.field_type.multiple::table/ajax/header", {'table': table}) }}
|
||||
|
||||
{% block body %}
|
||||
{{ view("visiosoft.field_type.multiple::table/partials/body", {'table': table}) }}
|
||||
{% endblock %}
|
||||
|
||||
@ -1,17 +1,13 @@
|
||||
<?php namespace Visiosoft\MultipleFieldType\Http\Controller;
|
||||
|
||||
use Visiosoft\MultipleFieldType\Command\GetConfiguration;
|
||||
use Visiosoft\MultipleFieldType\Command\HydrateLookupTable;
|
||||
use Visiosoft\MultipleFieldType\Command\HydrateSelectedTable;
|
||||
use Visiosoft\MultipleFieldType\MultipleFieldType;
|
||||
use Visiosoft\MultipleFieldType\Table\LookupTableBuilder;
|
||||
use Visiosoft\MultipleFieldType\Table\SelectedTableBuilder;
|
||||
use Visiosoft\MultipleFieldType\Table\ValueTableBuilder;
|
||||
use Anomaly\Streams\Platform\Entry\Contract\EntryInterface;
|
||||
use Anomaly\Streams\Platform\Http\Controller\AdminController;
|
||||
use Anomaly\Streams\Platform\Model\EloquentModel;
|
||||
use Anomaly\Streams\Platform\Support\Collection;
|
||||
use Illuminate\Contracts\Cache\Repository;
|
||||
use Illuminate\Contracts\Container\Container;
|
||||
|
||||
class LookupController extends AdminController
|
||||
|
||||
@ -54,8 +54,9 @@ class LookupTableBuilder extends TableBuilder
|
||||
* @var array
|
||||
*/
|
||||
protected $options = [
|
||||
'sortable' => false,
|
||||
'title' => 'visiosoft.field_type.multiple::message.select_entries',
|
||||
'sortable' => false,
|
||||
'title' => 'visiosoft.field_type.multiple::message.select_entries',
|
||||
'table_view' => 'visiosoft.field_type.multiple::table/ajax',
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user