Update
This commit is contained in:
1
oldSite/Plugins/Banner
Submodule
1
oldSite/Plugins/Banner
Submodule
Submodule oldSite/Plugins/Banner added at c2ee86dfa2
1
oldSite/Plugins/Blocks
Submodule
1
oldSite/Plugins/Blocks
Submodule
Submodule oldSite/Plugins/Blocks added at d38b173c12
1
oldSite/Plugins/Employees
Submodule
1
oldSite/Plugins/Employees
Submodule
Submodule oldSite/Plugins/Employees added at d5cf484e9a
1
oldSite/Plugins/Menu
Submodule
1
oldSite/Plugins/Menu
Submodule
Submodule oldSite/Plugins/Menu added at 79e6942fc4
1
oldSite/Plugins/News
Submodule
1
oldSite/Plugins/News
Submodule
Submodule oldSite/Plugins/News added at 69fdb2f7dc
1
oldSite/Plugins/Pages
Submodule
1
oldSite/Plugins/Pages
Submodule
Submodule oldSite/Plugins/Pages added at 93165abb85
1
oldSite/Plugins/Projects
Submodule
1
oldSite/Plugins/Projects
Submodule
Submodule oldSite/Plugins/Projects added at 2e6f5158a6
1
oldSite/Plugins/Questionnaire
Submodule
1
oldSite/Plugins/Questionnaire
Submodule
Submodule oldSite/Plugins/Questionnaire added at 69fdb2f7dc
204
oldSite/Plugins/Services/Controllers/ServicesController.php
Normal file
204
oldSite/Plugins/Services/Controllers/ServicesController.php
Normal file
@@ -0,0 +1,204 @@
|
||||
<?php
|
||||
namespace Klevze\ControlPanel\Plugins\Services\Controllers;
|
||||
|
||||
use Auth;
|
||||
use DB;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Language;
|
||||
use FileMan;
|
||||
use Klevze\ControlPanel\Framework\Utils\Sort;
|
||||
|
||||
class ServicesController extends Controller
|
||||
{
|
||||
|
||||
private $uploadPath = 'files/services/';
|
||||
private $mainRoute = 'admin.plugin.services';
|
||||
private $db_table = 'services';
|
||||
private $db_table_description = 'services_description';
|
||||
private $db_tableID = 'service_id';
|
||||
private $pageTitle;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('cp.auth');
|
||||
FileMan::checkUploadPath(public_path($this->uploadPath));
|
||||
$this->pageTitle = trans('admin.SERVICES');
|
||||
}
|
||||
|
||||
|
||||
public function Main()
|
||||
{
|
||||
$data['page_title'] = $this->pageTitle;
|
||||
|
||||
$data['table'] = DB::table($this->db_table . ' AS t1')
|
||||
->select('t1.*', 't2.headline')
|
||||
->leftJoin($this->db_table_description . ' AS t2', 't1.' . $this->db_tableID, 't2.' . $this->db_tableID)
|
||||
->where('t2.iso', Language::getDefaultLanguage())
|
||||
->orderBy('service_id', 'desc')
|
||||
->get();
|
||||
|
||||
return view('plugin.services::main', $data);
|
||||
}
|
||||
|
||||
|
||||
public function Create()
|
||||
{
|
||||
$data['page_title'] = $this->pageTitle;
|
||||
$data['table'] = new \stdClass();
|
||||
$data['table']->active = 'Y';
|
||||
$data['uploadPath'] = $this->uploadPath;
|
||||
$data['languages'] = Language::getLanguagesList();
|
||||
$data['default_language'] = Language::getDefaultLanguage();
|
||||
|
||||
return view('plugin.services::create', $data);
|
||||
}
|
||||
|
||||
|
||||
public function Insert(Request $request)
|
||||
{
|
||||
$id = DB::table($this->db_table)
|
||||
->insertGetId([
|
||||
'active' => $request->input('active'),
|
||||
'created_at' => time(),
|
||||
]);
|
||||
|
||||
$this->updateTranslations($id, $request);
|
||||
$this->storePictures($id, $request);
|
||||
|
||||
return redirect()->route($this->mainRoute);
|
||||
}
|
||||
|
||||
|
||||
public function Delete($id)
|
||||
{
|
||||
DB::table($this->db_table)
|
||||
->where($this->db_tableID, $id)
|
||||
->delete();
|
||||
|
||||
return redirect()->route($this->mainRoute);
|
||||
}
|
||||
|
||||
|
||||
public function Update($id, Request $request)
|
||||
{
|
||||
DB::table($this->db_table)
|
||||
->where($this->db_tableID, $id)
|
||||
->update([
|
||||
'active' => $request->input('active'),
|
||||
'updated_at' => time(),
|
||||
]);
|
||||
|
||||
$this->updateTranslations($id, $request);
|
||||
$this->storePictures($id, $request);
|
||||
|
||||
return redirect()->route($this->mainRoute);
|
||||
}
|
||||
|
||||
|
||||
public function Edit($id)
|
||||
{
|
||||
### Load Table Data ###
|
||||
$data['table'] = DB::table($this->db_table)
|
||||
->where($this->db_tableID, $id)
|
||||
->first();
|
||||
|
||||
$data['page_title'] = $this->pageTitle;
|
||||
$data[$this->db_tableID] = $id;
|
||||
$data['languages'] = Language::getLanguagesList();
|
||||
$data['default_language'] = Language::getDefaultLanguage();
|
||||
$data['translation'] = $this->getTranslation($id);
|
||||
$data['uploadPath'] = $this->uploadPath;
|
||||
|
||||
return view('plugin.services::edit', $data);
|
||||
}
|
||||
|
||||
|
||||
public function SortPages(Request $request)
|
||||
{
|
||||
Sort::Items($request, $this->db_table, $this->db_tableID);
|
||||
}
|
||||
|
||||
|
||||
protected function updatePicture($id, $file, $dbField)
|
||||
{
|
||||
$folder = public_path($this->uploadPath);
|
||||
|
||||
$picture = [];
|
||||
|
||||
if (is_null($file)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$ext = $file->getClientOriginalExtension();
|
||||
$diskname = uniqid() . "." . $ext;
|
||||
$destination = $folder . $diskname;
|
||||
$file->move($folder, $diskname);
|
||||
$picture = $diskname;
|
||||
|
||||
DB::table($this->db_table)
|
||||
->where($this->db_tableID, $id)
|
||||
->update([$dbField => $picture]);
|
||||
|
||||
return $picture;
|
||||
}
|
||||
|
||||
protected function storePictures($id, $request)
|
||||
{
|
||||
$picture1 = $this->updatePicture($id, $request->file('picture_1'), 'picture_1');
|
||||
$picture2 = $this->updatePicture($id, $request->file('picture_2'), 'picture_2');
|
||||
$picture3 = $this->updatePicture($id, $request->file('picture_3'), 'picture_3');
|
||||
$picture4 = $this->updatePicture($id, $request->file('picture_4'), 'picture_4');
|
||||
$picture5 = $this->updatePicture($id, $request->file('picture_5'), 'picture_5');
|
||||
$picture6 = $this->updatePicture($id, $request->file('picture_6'), 'picture_6');
|
||||
$picture7 = $this->updatePicture($id, $request->file('picture_7'), 'picture_7');
|
||||
$picture8 = $this->updatePicture($id, $request->file('picture_8'), 'picture_8');
|
||||
}
|
||||
|
||||
protected function updateTranslations($id, $request)
|
||||
{
|
||||
$prevod = $request->input('prevod');
|
||||
|
||||
### Remove Old Entries ###
|
||||
DB::table($this->db_table_description)
|
||||
->where($this->db_tableID, $id)
|
||||
->delete();
|
||||
|
||||
### Insert New Entries ###
|
||||
foreach ($prevod as $iso => $data) {
|
||||
|
||||
DB::table($this->db_table_description)
|
||||
->insert(['iso' => $iso,
|
||||
$this->db_tableID => $id,
|
||||
'headline' => $data['headline'],
|
||||
'content1' => $data['content1'],
|
||||
'content2' => $data['content2'],
|
||||
'content3' => $data['content3'],
|
||||
'content4' => $data['content4'],
|
||||
'content5' => $data['content5'],
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected function getTranslation($id)
|
||||
{
|
||||
$data = [];
|
||||
|
||||
$trans = DB::table($this->db_table_description)
|
||||
->where($this->db_tableID, $id)
|
||||
->get();
|
||||
|
||||
foreach ($trans as $key => $row) {
|
||||
$data[$row->iso]['headline'] = $row->headline;
|
||||
$data[$row->iso]['content1'] = $row->content1;
|
||||
$data[$row->iso]['content2'] = $row->content2;
|
||||
$data[$row->iso]['content3'] = $row->content3;
|
||||
$data[$row->iso]['content4'] = $row->content4;
|
||||
$data[$row->iso]['content5'] = $row->content5;
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateBannerDescriptionTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('banner_description', function(Blueprint $table)
|
||||
{
|
||||
$table->integer('banner_id')->index('banner_id_index');
|
||||
$table->char('iso', 3)->index('iso_index');
|
||||
$table->string('headline')->nullable();
|
||||
$table->text('content', 65535)->nullable();
|
||||
$table->string('link')->nullable();
|
||||
$table->string('picture')->nullable();
|
||||
$table->index(['banner_id','iso'], 'duplex_index');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('banner_description');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateBannerTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('banner', function(Blueprint $table)
|
||||
{
|
||||
$table->integer('banner_id', true);
|
||||
$table->integer('created_at');
|
||||
$table->integer('updated_at')->nullable();
|
||||
$table->enum('active', ['Y', 'N'])->default('Y')->index('active');
|
||||
$table->integer('root')->default(0)->index('root');
|
||||
$table->integer('order_num')->default(9999)->index('zs');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('banner');
|
||||
}
|
||||
|
||||
}
|
||||
0
oldSite/Plugins/Services/README.md
Normal file
0
oldSite/Plugins/Services/README.md
Normal file
@@ -0,0 +1,6 @@
|
||||
@extends('admin::layout.default')
|
||||
|
||||
@section('content')
|
||||
@include('plugin.services::heading')
|
||||
@include('plugin.services::form', ['pageURL' => route('admin.plugin.services.insert')])
|
||||
@endsection
|
||||
6
oldSite/Plugins/Services/Resources/views/edit.blade.php
Normal file
6
oldSite/Plugins/Services/Resources/views/edit.blade.php
Normal file
@@ -0,0 +1,6 @@
|
||||
@extends('admin::layout.default')
|
||||
|
||||
@section('content')
|
||||
@include('plugin.services::heading')
|
||||
@include('plugin.services::form', ['pageURL' => route('admin.plugin.services.update', [$table->service_id])])
|
||||
@endsection
|
||||
130
oldSite/Plugins/Services/Resources/views/form.blade.php
Normal file
130
oldSite/Plugins/Services/Resources/views/form.blade.php
Normal file
@@ -0,0 +1,130 @@
|
||||
<section class="content" id="serviceApp">
|
||||
<form action="{{ $pageURL }}" method="post" enctype="multipart/form-data">
|
||||
@csrf
|
||||
|
||||
@component('admin::blocks.card_language', ['languages' => $languages])
|
||||
|
||||
<div class="tab-content" id="block-tabContent">
|
||||
@foreach($languages as $lang)
|
||||
<div class="tab-pane fade show @if($loop->first) active @endif"
|
||||
id="{{ $lang->iso }}"
|
||||
role="tabpanel"
|
||||
aria-labelledby="tab-{{ $lang->iso }}">
|
||||
|
||||
<div class="row">
|
||||
<div class="col col-md-6">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">{{ trans('admin.HEADLINE') }}</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
<img src="{{ config('cp.admin_path') }}/images/flags/languages/16/{{ $lang->iso }}.png" alt="">
|
||||
</span>
|
||||
</div>
|
||||
<input class="form-control" type="text" name="prevod[{{ $lang->iso }}][headline]" value="{{ $translation[$lang->iso]['headline'] ?? null}}">
|
||||
</div> <!-- end .input-group -->
|
||||
</div> <!-- end .form-group -->
|
||||
|
||||
|
||||
<label class="label-control">{{trans('admin.CONTENT')}} 1</label>
|
||||
<textarea name="prevod[{{ $lang->iso }}][content1]"
|
||||
class="tinymce2"
|
||||
style="width:100%;height:150px;">{{ $translation[$lang->iso]['content1'] ?? null }}
|
||||
</textarea>
|
||||
|
||||
<label class="label-control">{{trans('admin.CONTENT')}} 2</label>
|
||||
<textarea name="prevod[{{ $lang->iso }}][content2]"
|
||||
class="tinymce2"
|
||||
style="width:100%;height:150px;">{{ $translation[$lang->iso]['content2'] ?? null }}
|
||||
</textarea>
|
||||
|
||||
|
||||
</div> <!-- end .col -->
|
||||
|
||||
<div class="col col-md-6">
|
||||
<label class="label-control">{{trans('admin.CONTENT')}} 3</label>
|
||||
<textarea name="prevod[{{ $lang->iso }}][content3]"
|
||||
class="tinymce2"
|
||||
style="width:100%;height:100px;">{{ $translation[$lang->iso]['content3'] ?? null }}
|
||||
</textarea>
|
||||
|
||||
|
||||
<label class="label-control">{{trans('admin.CONTENT')}} 4</label>
|
||||
<textarea name="prevod[{{ $lang->iso }}][content4]"
|
||||
class="tinymce2"
|
||||
style="width:100%;height:100px;">{{ $translation[$lang->iso]['content4'] ?? null }}
|
||||
</textarea>
|
||||
|
||||
|
||||
<label class="label-control">{{trans('admin.CONTENT')}} 5</label>
|
||||
<textarea name="prevod[{{ $lang->iso }}][content5]"
|
||||
class="tinymce2"
|
||||
style="width:100%;height:100px;">{{
|
||||
$translation[$lang->iso]['content5'] ?? null }}
|
||||
</textarea>
|
||||
|
||||
</div> <!-- end .col -->
|
||||
</div> <!-- end .row -->
|
||||
|
||||
<hr>
|
||||
|
||||
</div> <!-- end .tab-pane -->
|
||||
@endforeach
|
||||
|
||||
<label>
|
||||
<input type="hidden" name="active" value="N">
|
||||
<input type="checkbox" class="minimal" name="active" value="Y"
|
||||
@if (isset($table->active))
|
||||
@if($table->active == 'Y')
|
||||
checked
|
||||
@endif
|
||||
@endif
|
||||
> {{ trans('admin.ACTIVE') }}<br>
|
||||
</label>
|
||||
|
||||
@include('plugin.services::form.layout')
|
||||
|
||||
<div class="text-center">
|
||||
<button type="submit" class="btn btn-success"><i class="fa fa-save fa-fw"></i> {{ trans('admin.SAVE') }}</button>
|
||||
</div>
|
||||
|
||||
</div> <!-- end .tab-content -->
|
||||
@endcomponent
|
||||
</form>
|
||||
</section>
|
||||
|
||||
@section('header-addon')
|
||||
@append
|
||||
@section('footer-addon')
|
||||
<script>
|
||||
$(document).on("change", ".thumbPreview", function(evt) {
|
||||
var lang = $(this).data('lang');
|
||||
var files = evt.target.files;
|
||||
var f = files[0];
|
||||
var reader = new FileReader();
|
||||
|
||||
reader.onload = (function(theFile) {
|
||||
return function(e) {
|
||||
$('.quickPreview-' + lang).html('<img src="' + e.target.result + '" title="' + theFile.name + '" class="img-responsive">');
|
||||
};
|
||||
})(f);
|
||||
|
||||
reader.readAsDataURL(f);
|
||||
});
|
||||
|
||||
var app = new Vue({
|
||||
el: '#serviceApp',
|
||||
data: {
|
||||
content1: null,
|
||||
content2: null,
|
||||
content3: null,
|
||||
content4: null,
|
||||
content5: null,
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@append
|
||||
377
oldSite/Plugins/Services/Resources/views/form/layout.blade.php
Normal file
377
oldSite/Plugins/Services/Resources/views/form/layout.blade.php
Normal file
@@ -0,0 +1,377 @@
|
||||
<br>
|
||||
<hr>
|
||||
<h1>{{ trans('admin.LAYOUT') }}</h1>
|
||||
<br>
|
||||
<div class="services-grid">
|
||||
|
||||
|
||||
<div class="holder">
|
||||
<article class="article article01">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="text-holder">
|
||||
<div class="text" data-text="01">
|
||||
<p>CONTENT 1</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="img-box">
|
||||
|
||||
<div class="upload-box">
|
||||
<div class="resolution">309x461</div>
|
||||
<div class="upload">
|
||||
<div class="upload-btn-wrapper">
|
||||
<i class="fa fa-upload"></i>
|
||||
<input type="file"
|
||||
name="picture_1"
|
||||
class="pictureUploadPreview"
|
||||
data-preview="quickPreviewPicture1">
|
||||
</div> <!-- end .btn -->
|
||||
</div> <!-- end .upload -->
|
||||
</div> <!-- end .upload-box -->
|
||||
|
||||
<div id="quickPreviewPicture1">
|
||||
@if (!empty($table->picture_1))
|
||||
<img src="/{{ $uploadPath }}{{ $table->picture_1 ?? null }}"
|
||||
class="img-fluid">
|
||||
@else
|
||||
<img src="https://via.placeholder.com/309X461" class="img-fluid upload-box">
|
||||
@endif
|
||||
</div> <!-- end #quickPreview -->
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="img-box">
|
||||
|
||||
<div class="upload-box">
|
||||
<div class="resolution">1132x792</div>
|
||||
<div class="upload">
|
||||
<div class="upload-btn-wrapper">
|
||||
<i class="fa fa-upload"></i>
|
||||
<input type="file"
|
||||
name="picture_2"
|
||||
class="pictureUploadPreview"
|
||||
data-preview="quickPreviewPicture2">
|
||||
</div> <!-- end .btn -->
|
||||
</div> <!-- end .upload -->
|
||||
</div> <!-- end .upload-box -->
|
||||
|
||||
<div id="quickPreviewPicture2">
|
||||
@if (!empty($table->picture_2))
|
||||
<img src="/{{ $uploadPath }}{{ $table->picture_2 ?? null }}"
|
||||
class="img-fluid">
|
||||
@else
|
||||
<img src="https://via.placeholder.com/1132X792" class="img-fluid" alt="image description">
|
||||
@endif
|
||||
</div> <!-- end #quickPreview -->
|
||||
</div> <!-- end .img-box -->
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
<hr>
|
||||
|
||||
<article class="article article02">
|
||||
<div class="row align-items-start">
|
||||
<div class="col-md-3 offset-md-3">
|
||||
<div class="text-holder">
|
||||
<div class="text" data-text="02">
|
||||
<p>CONTENT 2</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="img-box">
|
||||
|
||||
<div class="upload-box">
|
||||
<div class="resolution">746x746</div>
|
||||
<div class="upload">
|
||||
<div class="upload-btn-wrapper">
|
||||
<i class="fa fa-upload"></i>
|
||||
<input type="file"
|
||||
name="picture_3"
|
||||
class="pictureUploadPreview"
|
||||
data-preview="quickPreviewPicture3">
|
||||
</div> <!-- end .btn -->
|
||||
</div> <!-- end .upload -->
|
||||
</div> <!-- end .upload-box -->
|
||||
|
||||
<div id="quickPreviewPicture3">
|
||||
@if (!empty($table->picture_3))
|
||||
<img src="/{{ $uploadPath }}{{ $table->picture_3 ?? null }}"
|
||||
class="img-fluid">
|
||||
@else
|
||||
<img src="https://via.placeholder.com/746x746" class="img-fluid" alt="image description">
|
||||
@endif
|
||||
</div> <!-- end #quickPreview -->
|
||||
|
||||
</div> <!-- end .img-box -->
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<hr>
|
||||
|
||||
<article class="article article03">
|
||||
<div class="row">
|
||||
<div class="col-md-3 order-md-2">
|
||||
<div class="text-holder">
|
||||
<div class="text" data-text="03">
|
||||
<p>CONTENT 3</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 img-col">
|
||||
<div class="img-box">
|
||||
|
||||
<div class="upload-box">
|
||||
<div class="resolution">746x909</div>
|
||||
<div class="upload">
|
||||
<div class="upload-btn-wrapper">
|
||||
<i class="fa fa-upload"></i>
|
||||
<input type="file"
|
||||
name="picture_4"
|
||||
class="pictureUploadPreview"
|
||||
data-preview="quickPreviewPicture4">
|
||||
</div> <!-- end .btn -->
|
||||
</div> <!-- end .upload -->
|
||||
</div> <!-- end .upload-box -->
|
||||
|
||||
<div id="quickPreviewPicture4">
|
||||
@if (!empty($table->picture_4))
|
||||
<img src="/{{ $uploadPath }}{{ $table->picture_4 ?? null }}"
|
||||
class="img-fluid">
|
||||
@else
|
||||
<img src="https://via.placeholder.com/746x909" class="img-fluid" alt="image description">
|
||||
@endif
|
||||
</div> <!-- end #quickPreview -->
|
||||
</div> <!-- end .img-box -->
|
||||
</div>
|
||||
<div class="col-md-3 order-md-3">
|
||||
<div class="img-box">
|
||||
|
||||
<div class="upload-box">
|
||||
<div class="resolution">358x358</div>
|
||||
<div class="upload">
|
||||
<div class="upload-btn-wrapper">
|
||||
<i class="fa fa-upload"></i>
|
||||
<input type="file"
|
||||
name="picture_5"
|
||||
class="pictureUploadPreview"
|
||||
data-preview="quickPreviewPicture5">
|
||||
</div> <!-- end .btn -->
|
||||
</div> <!-- end .upload -->
|
||||
</div> <!-- end .upload-box -->
|
||||
<div id="quickPreviewPicture5">
|
||||
@if (!empty($table->picture_5))
|
||||
<img src="/{{ $uploadPath }}{{ $table->picture_5 ?? null }}"
|
||||
class="img-fluid">
|
||||
@else
|
||||
<img src="https://via.placeholder.com/358x358" class="img-fluid" alt="image description">
|
||||
@endif
|
||||
</div> <!-- end #quickPreview -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<hr>
|
||||
|
||||
<article class="article article04">
|
||||
<div class="row">
|
||||
<div class="col-md-3 order-md-4">
|
||||
<div class="text-holder">
|
||||
<div class="text" data-text="04">
|
||||
<p>CONTENT 4</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 img-col">
|
||||
<div class="img-box">
|
||||
|
||||
<div class="upload-box">
|
||||
<div class="resolution">358x358</div>
|
||||
<div class="upload">
|
||||
<div class="upload-btn-wrapper">
|
||||
<i class="fa fa-upload"></i>
|
||||
<input type="file"
|
||||
name="picture_6"
|
||||
class="pictureUploadPreview"
|
||||
data-preview="quickPreviewPicture6">
|
||||
</div> <!-- end .btn -->
|
||||
</div> <!-- end .upload -->
|
||||
</div> <!-- end .upload-box -->
|
||||
|
||||
<div id="quickPreviewPicture6">
|
||||
@if (!empty($table->picture_6))
|
||||
<img src="/{{ $uploadPath }}{{ $table->picture_6 ?? null }}"
|
||||
class="img-fluid">
|
||||
@else
|
||||
<img src="https://via.placeholder.com/358x358" class="img-fluid" alt="image description">
|
||||
@endif
|
||||
</div> <!-- end #quickPreview -->
|
||||
|
||||
</div>
|
||||
<br>
|
||||
<div class="img-box">
|
||||
<div class="upload-box">
|
||||
<div class="resolution">358x358</div>
|
||||
<div class="upload">
|
||||
<div class="upload-btn-wrapper">
|
||||
<i class="fa fa-upload"></i>
|
||||
<input type="file"
|
||||
name="picture_7"
|
||||
class="pictureUploadPreview"
|
||||
data-preview="quickPreviewPicture7">
|
||||
</div> <!-- end .btn -->
|
||||
</div> <!-- end .upload -->
|
||||
</div> <!-- end .upload-box -->
|
||||
|
||||
<div id="quickPreviewPicture7">
|
||||
@if (!empty($table->picture_7))
|
||||
<img src="/{{ $uploadPath }}{{ $table->picture_7 ?? null }}"
|
||||
class="img-fluid">
|
||||
@else
|
||||
<img src="https://via.placeholder.com/358x358" class="img-fluid" alt="image description">
|
||||
@endif
|
||||
</div> <!-- end #quickPreview -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="img-box">
|
||||
|
||||
<div class="upload-box">
|
||||
<div class="resolution">748x765</div>
|
||||
<div class="upload">
|
||||
<div class="upload-btn-wrapper">
|
||||
<i class="fa fa-upload"></i>
|
||||
<input type="file"
|
||||
name="picture_8"
|
||||
class="pictureUploadPreview"
|
||||
data-preview="quickPreviewPicture8">
|
||||
</div> <!-- end .btn -->
|
||||
</div> <!-- end .upload -->
|
||||
</div> <!-- end .upload-box -->
|
||||
|
||||
<div id="quickPreviewPicture8">
|
||||
@if (!empty($table->picture_8))
|
||||
<img src="/{{ $uploadPath }}{{ $table->picture_8 ?? null }}"
|
||||
class="img-fluid">
|
||||
@else
|
||||
<img src="https://via.placeholder.com/748x765" class="img-fluid" alt="image description">
|
||||
@endif
|
||||
</div> <!-- end #quickPreview -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-6 col-lg-4 col-xl-3 offset-md-6 offset-lg-8 offset-xl-9">
|
||||
<div class="text-info-box" data-speed="130">
|
||||
<div class="info">
|
||||
CONTENT 5
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
@section('header-addon')
|
||||
<style>
|
||||
.text-info-box {
|
||||
background: black;
|
||||
color:white;
|
||||
font-size:15px;
|
||||
min-height:150px;
|
||||
display:grid;
|
||||
align-items: center;
|
||||
text-align:center;
|
||||
}
|
||||
.upload-box {
|
||||
display:grid;
|
||||
grid-template-columns: auto 20px;
|
||||
grid-template-rows: 20px;
|
||||
grid-gap:0;
|
||||
color:#999;
|
||||
font-size:10px;
|
||||
margin-bottom:1px;
|
||||
}
|
||||
|
||||
.upload-box > div.resolution {
|
||||
color:#ccc;
|
||||
align-self: end;
|
||||
}
|
||||
|
||||
.upload-box > div.upload {
|
||||
color:#bbb;
|
||||
max-height:16px;
|
||||
font-size:12px;
|
||||
text-align:right;
|
||||
align-self: end;
|
||||
}
|
||||
|
||||
.upload-box > div.upload:hover {
|
||||
cursor:pointer;
|
||||
color:#909;
|
||||
}
|
||||
|
||||
.img-box, .text {
|
||||
border:dotted 1px #ccc;
|
||||
padding:3px;
|
||||
margin-bottom:3px;
|
||||
}
|
||||
|
||||
.image-preview > img {
|
||||
object-fit: contain;
|
||||
width:100%;
|
||||
height:200px;
|
||||
}
|
||||
|
||||
.upload-btn-wrapper {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
display: inline-block;
|
||||
padding:0;
|
||||
margin:0;
|
||||
}
|
||||
|
||||
.upload-btn-wrapper input[type=file] {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.upload-box {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
@append
|
||||
|
||||
@section('footer-addon')
|
||||
<script>
|
||||
$(document).on("change", ".pictureUploadPreview", function(evt) {
|
||||
|
||||
var files = evt.target.files;
|
||||
var f = files[0];
|
||||
var reader = new FileReader();
|
||||
let obj = $(this).data('preview');
|
||||
|
||||
reader.onload = (function(theFile) {
|
||||
return function(e) {
|
||||
|
||||
document.getElementById(obj).innerHTML = ['<img src="', e.target.result,'" title="', theFile.name, '" class="img-fluid" />'].join('');
|
||||
};
|
||||
})(f);
|
||||
|
||||
reader.readAsDataURL(f);
|
||||
});
|
||||
|
||||
</script>
|
||||
@append
|
||||
13
oldSite/Plugins/Services/Resources/views/heading.blade.php
Normal file
13
oldSite/Plugins/Services/Resources/views/heading.blade.php
Normal file
@@ -0,0 +1,13 @@
|
||||
@component('admin::blocks.heading')
|
||||
@slot('mainRoute')
|
||||
{{ route('admin.plugin.services') }}
|
||||
@endslot
|
||||
|
||||
@slot('addRoute')
|
||||
{{ route('admin.plugin.services.create') }}
|
||||
@endslot
|
||||
|
||||
@slot('title')
|
||||
{{ trans('admin.SERVICES') }}
|
||||
@endslot
|
||||
@endcomponent
|
||||
63
oldSite/Plugins/Services/Resources/views/main.blade.php
Normal file
63
oldSite/Plugins/Services/Resources/views/main.blade.php
Normal file
@@ -0,0 +1,63 @@
|
||||
@extends('admin::layout.default')
|
||||
|
||||
@section('content')
|
||||
@include('plugin.services::heading')
|
||||
|
||||
<section class="content">
|
||||
@component('admin::blocks.card')
|
||||
@slot('title')
|
||||
{{ trans('admin.LIST') }}
|
||||
@endslot
|
||||
@slot('actions')
|
||||
@endslot
|
||||
@include('admin::blocks.notification_error')
|
||||
|
||||
<table class="table table-bordered table-striped table-hover table-advance">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('admin.OPTIONS') }}</th>
|
||||
<th>{{ trans('admin.TITLE') }}</th>
|
||||
<th>{{ trans('admin.VISIBLE') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($table as $row)
|
||||
<tr id="{{$row->service_id}}">
|
||||
<td width="36">
|
||||
|
||||
<x-table-options
|
||||
editURL="{{ route('admin.plugin.services.edit', $row->service_id) }}"
|
||||
deleteURL="{{ route('admin.plugin.services.delete', $row->service_id) }}"
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ route('admin.plugin.services.edit', $row->service_id) }}">
|
||||
{{ $row->headline ?? null }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
@if ($row->active == 'Y')
|
||||
<i style="color:#0a0" class="fa fa-check-circle"></i>
|
||||
@else
|
||||
<i style="color:#a00" class="fa fa-ban"></i>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@endcomponent
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@section('footer-addon')
|
||||
<script>
|
||||
var slider = document.getElementById("myRange");
|
||||
slider.oninput = function() {
|
||||
$('.slider-image').width(this.value + '%');
|
||||
}
|
||||
</script>
|
||||
@append
|
||||
13
oldSite/Plugins/Services/Routes/routes.php
Normal file
13
oldSite/Plugins/Services/Routes/routes.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
Route::group(['middleware' => 'admin',
|
||||
'namespace' => 'Klevze\ControlPanel\Plugins\Services\Controllers',
|
||||
'prefix' => 'cp'],
|
||||
function () {
|
||||
|
||||
$route = 'content/services';
|
||||
$as = 'admin.plugin.services';
|
||||
$uses = 'ServicesController';
|
||||
cpRoute::addGroup($route, $as, $uses, false);
|
||||
|
||||
});
|
||||
34
oldSite/Plugins/Services/ServiceProvider.php
Normal file
34
oldSite/Plugins/Services/ServiceProvider.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
namespace Klevze\ControlPanel\Plugins\Services;
|
||||
|
||||
use App;
|
||||
use Menu;
|
||||
use Illuminate\Support\ServiceProvider as LaravelServiceProvider;
|
||||
|
||||
class ServiceProvider extends LaravelServiceProvider
|
||||
{
|
||||
/**
|
||||
* Bootstrap the application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
public function boot()
|
||||
{
|
||||
$this->loadMigrationsFrom(__DIR__ . '/Migrations');
|
||||
$this->loadViewsFrom(__DIR__ . '/Resources/views', 'plugin.services');
|
||||
Menu::addItem(trans('admin.CONTENT'), trans('admin.SERVICES'), 'fa fa-th-large', 'admin.plugin.services');
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
//
|
||||
include __DIR__ . '/Routes/routes.php';
|
||||
|
||||
}
|
||||
}
|
||||
15
oldSite/Plugins/Services/composer.json
Normal file
15
oldSite/Plugins/Services/composer.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "klevze/slider",
|
||||
"description": "CP Admin: Services Plugin",
|
||||
"type": "package",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Gregor Klevže",
|
||||
"email": "gregor@klevze.si"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=7.0.0",
|
||||
"klevze/admin": ">=1.0",
|
||||
}
|
||||
}
|
||||
1
oldSite/Plugins/Slider
Submodule
1
oldSite/Plugins/Slider
Submodule
Submodule oldSite/Plugins/Slider added at 37f6b5453a
1
oldSite/Plugins/Video
Submodule
1
oldSite/Plugins/Video
Submodule
Submodule oldSite/Plugins/Video added at 37f6b5453a
1
oldSite/Plugins/Words
Submodule
1
oldSite/Plugins/Words
Submodule
Submodule oldSite/Plugins/Words added at 37f6b5453a
1
oldSite/Production/Blocks
Submodule
1
oldSite/Production/Blocks
Submodule
Submodule oldSite/Production/Blocks added at 740513e8bb
1
oldSite/Production/CookieSense
Submodule
1
oldSite/Production/CookieSense
Submodule
Submodule oldSite/Production/CookieSense added at 467bdf2af2
1
oldSite/Production/Favicon
Submodule
1
oldSite/Production/Favicon
Submodule
Submodule oldSite/Production/Favicon added at 0e4f5578be
1
oldSite/Production/Gallery
Submodule
1
oldSite/Production/Gallery
Submodule
Submodule oldSite/Production/Gallery added at 8bda3d976b
1
oldSite/Production/Menu
Submodule
1
oldSite/Production/Menu
Submodule
Submodule oldSite/Production/Menu added at 0821e9974d
1
oldSite/Production/Pages
Submodule
1
oldSite/Production/Pages
Submodule
Submodule oldSite/Production/Pages added at c589e3d28d
1
oldSite/Production/Popup
Submodule
1
oldSite/Production/Popup
Submodule
Submodule oldSite/Production/Popup added at 3cec436305
1
oldSite/Production/Slider
Submodule
1
oldSite/Production/Slider
Submodule
Submodule oldSite/Production/Slider added at 9d3195c9df
1
oldSite/cPadPlugins/Blocks
Submodule
1
oldSite/cPadPlugins/Blocks
Submodule
Submodule oldSite/cPadPlugins/Blocks added at 893938e9f7
1
oldSite/cPadPlugins/CookieSense
Submodule
1
oldSite/cPadPlugins/CookieSense
Submodule
Submodule oldSite/cPadPlugins/CookieSense added at 467bdf2af2
1
oldSite/cPadPlugins/Gallery
Submodule
1
oldSite/cPadPlugins/Gallery
Submodule
Submodule oldSite/cPadPlugins/Gallery added at 8bda3d976b
1
oldSite/cPadPlugins/Menu
Submodule
1
oldSite/cPadPlugins/Menu
Submodule
Submodule oldSite/cPadPlugins/Menu added at 0821e9974d
1
oldSite/cPadPlugins/Pages
Submodule
1
oldSite/cPadPlugins/Pages
Submodule
Submodule oldSite/cPadPlugins/Pages added at c589e3d28d
1
oldSite/cPadPlugins/Popup
Submodule
1
oldSite/cPadPlugins/Popup
Submodule
Submodule oldSite/cPadPlugins/Popup added at 3cec436305
1
oldSite/cPadPlugins/Slider
Submodule
1
oldSite/cPadPlugins/Slider
Submodule
Submodule oldSite/cPadPlugins/Slider added at 9d3195c9df
Reference in New Issue
Block a user