edit static pages in backend
This commit is contained in:
parent
e771c4921f
commit
783ac823ba
59 changed files with 1644 additions and 761 deletions
|
@ -3,9 +3,24 @@
|
|||
* includes Vue and other libraries. It is a great starting point when
|
||||
* building robust, powerful web applications using Vue and Laravel.
|
||||
*/
|
||||
require('./bootstrap');
|
||||
window.Vue = require('vue');
|
||||
Vue.prototype.$http = axios;
|
||||
// window.axios = require('axios');
|
||||
// window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
||||
|
||||
/**
|
||||
* Next we will register the CSRF Token as a common header with Axios so that
|
||||
* all outgoing HTTP requests automatically have it attached. This is just
|
||||
* a simple convenience so we don't have to attach every token manually.
|
||||
*/
|
||||
// let token = document.head.querySelector('meta[name="csrf-token"]');
|
||||
|
||||
// if (token) {
|
||||
// window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
|
||||
// }
|
||||
// else {
|
||||
// console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
|
||||
// }
|
||||
// window.Vue = require('vue');
|
||||
// Vue.prototype.$http = axios;
|
||||
|
||||
// Vue.component('example', require('./components/Example.vue'));
|
||||
const STATUS_INITIAL = 0, STATUS_SAVING = 1, STATUS_SUCCESS = 2, STATUS_FAILED = 3;
|
||||
|
@ -32,6 +47,7 @@ const app = new Vue({
|
|||
type: '',
|
||||
state: '',
|
||||
rights: 0,
|
||||
project_id: '',
|
||||
|
||||
creating_corporation: "GBA",
|
||||
embargo_date: '',
|
||||
|
@ -97,7 +113,7 @@ const app = new Vue({
|
|||
formData.append('files[' + i + '][file]', file.file);
|
||||
formData.append('files[' + i + '][label]', file.label);
|
||||
formData.append('files[' + i + '][sorting]', i + 1);
|
||||
|
||||
|
||||
// formData.append('files[' + i + ']', JSON.stringify(file));
|
||||
}
|
||||
/*
|
||||
|
@ -107,12 +123,13 @@ const app = new Vue({
|
|||
formData.append('server_state', this.dataset.state);
|
||||
formData.append('rights', this.dataset.rights);
|
||||
formData.append('creating_corporation', this.dataset.creating_corporation);
|
||||
formData.append('project_id', this.dataset.project_id);
|
||||
formData.append('embargo_date', this.dataset.embargo_date);
|
||||
formData.append('belongs_to_bibliography', this.dataset.belongs_to_bibliography);
|
||||
formData.append('main_title[value]', this.dataset.title_main.value);
|
||||
formData.append('main_title[language]', this.dataset.title_main.language);
|
||||
formData.append('abstract_main[value]', this.dataset.title_main.value);
|
||||
formData.append('abstract_main[language]', this.dataset.title_main.language);
|
||||
formData.append('title_main[value]', this.dataset.title_main.value);
|
||||
formData.append('title_main[language]', this.dataset.title_main.language);
|
||||
formData.append('abstract_main[value]', this.dataset.abstract_main.value);
|
||||
formData.append('abstract_main[language]', this.dataset.abstract_main.language);
|
||||
|
||||
for (var i = 0; i < this.dataset.checkedLicenses.length; i++) {
|
||||
formData.append('licenses[' + i + ']', this.dataset.checkedLicenses[i]);
|
||||
|
@ -135,16 +152,26 @@ const app = new Vue({
|
|||
// this.items = response.data;
|
||||
//Vue.set(app.skills, 1, "test55");
|
||||
this.currentStatus = STATUS_SUCCESS;
|
||||
|
||||
if (response.data.redirect) {
|
||||
window.location = response.data.redirect;
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
// this.loading = false;
|
||||
console.log("test");
|
||||
// console.log("test");
|
||||
let errorObject = JSON.parse(JSON.stringify(error));
|
||||
console.log(errorObject);
|
||||
var errorsArray = errorObject.response.data.errors;
|
||||
for (var index in errorsArray) {
|
||||
console.log(errorsArray[index]);
|
||||
this.errors.push(errorsArray[index]);
|
||||
// console.log(errorObject);
|
||||
if (errorObject.response.data.errors) {
|
||||
var errorsArray = errorObject.response.data.errors;
|
||||
for (var index in errorsArray) {
|
||||
console.log(errorsArray[index]);
|
||||
this.errors.push(errorsArray[index]);
|
||||
}
|
||||
}
|
||||
if (errorObject.response.data.error) {
|
||||
var error = errorObject.response.data.error;
|
||||
this.errors.push(error.message);
|
||||
}
|
||||
this.currentStatus = STATUS_FAILED;
|
||||
});
|
||||
|
@ -205,14 +232,3 @@ const app = new Vue({
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
// const app = new Vue({
|
||||
// el: '#app',
|
||||
|
||||
// data: {
|
||||
// loading: false,
|
||||
// downloading: false,
|
||||
// items: [],
|
||||
// message: "Just a test",
|
||||
// }
|
||||
// });
|
23
resources/lang/en/alerts.php
Normal file
23
resources/lang/en/alerts.php
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Alert Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines contain alert messages for various scenarios
|
||||
| during CRUD operations. You are free to modify these language lines
|
||||
| according to your application's requirements.
|
||||
|
|
||||
*/
|
||||
|
||||
'backend' => [
|
||||
'pages' => [
|
||||
'created' => 'The Page was successfully created.',
|
||||
'deleted' => 'The Page was successfully deleted.',
|
||||
'updated' => 'The Page was successfully updated.',
|
||||
],
|
||||
],
|
||||
];
|
55
resources/lang/en/buttons.php
Normal file
55
resources/lang/en/buttons.php
Normal file
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Buttons Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used in buttons throughout the system.
|
||||
| Regardless where it is placed, a button can be listed here so it is easily
|
||||
| found in a intuitive way.
|
||||
|
|
||||
*/
|
||||
|
||||
'backend' => [
|
||||
'access' => [
|
||||
'users' => [
|
||||
'activate' => 'Activate',
|
||||
'change_password' => 'Change Password',
|
||||
'clear_session' => 'Clear Session',
|
||||
'deactivate' => 'Deactivate',
|
||||
'delete_permanently' => 'Delete Permanently',
|
||||
'login_as' => 'Login As :user',
|
||||
'resend_email' => 'Resend Confirmation E-mail',
|
||||
'restore_user' => 'Restore User',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
'emails' => [
|
||||
'auth' => [
|
||||
'confirm_account' => 'Confirm Account',
|
||||
'reset_password' => 'Reset Password',
|
||||
],
|
||||
],
|
||||
|
||||
'general' => [
|
||||
'cancel' => 'Cancel',
|
||||
'continue' => 'Continue',
|
||||
'preview' => 'Preview',
|
||||
'save' => 'Save',
|
||||
'view' => 'View',
|
||||
|
||||
'crud' => [
|
||||
'create' => 'Create',
|
||||
'add' => 'Add',
|
||||
'delete' => 'Delete',
|
||||
'edit' => 'Edit',
|
||||
'update' => 'Update',
|
||||
'view' => 'View',
|
||||
],
|
||||
|
||||
],
|
||||
];
|
27
resources/lang/en/exceptions.php
Normal file
27
resources/lang/en/exceptions.php
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Exception Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used in Exceptions thrown throughout the system.
|
||||
| Regardless where it is placed, a button can be listed here so it is easily
|
||||
| found in a intuitive way.
|
||||
|
|
||||
*/
|
||||
|
||||
'backend' => [
|
||||
|
||||
'pages' => [
|
||||
'already_exists' => 'That Page already exists. Please choose a different name.',
|
||||
'create_error' => 'There was a problem creating this Page. Please try again.',
|
||||
'delete_error' => 'There was a problem deleting this Page. Please try again.',
|
||||
'not_found' => 'That Page does not exist.',
|
||||
'update_error' => 'There was a problem updating this Page. Please try again.',
|
||||
],
|
||||
],
|
||||
'frontend' => [],
|
||||
];
|
82
resources/lang/en/labels.php
Normal file
82
resources/lang/en/labels.php
Normal file
|
@ -0,0 +1,82 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Labels Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used in labels throughout the system.
|
||||
| Regardless where it is placed, a label can be listed here so it is easily
|
||||
| found in a intuitive way.
|
||||
|
|
||||
*/
|
||||
|
||||
'general' => [
|
||||
'all' => 'All',
|
||||
'yes' => 'Yes',
|
||||
'no' => 'No',
|
||||
'custom' => 'Custom',
|
||||
'actions' => 'Actions',
|
||||
'active' => 'Active',
|
||||
'buttons' => [
|
||||
'save' => 'Save',
|
||||
'update' => 'Update',
|
||||
],
|
||||
'hide' => 'Hide',
|
||||
'inactive' => 'Inactive',
|
||||
'none' => 'None',
|
||||
'show' => 'Show',
|
||||
'toggle_navigation' => 'Toggle Navigation',
|
||||
],
|
||||
|
||||
'backend' => [
|
||||
'profile_updated' => 'Your profile has been updated.',
|
||||
'access' => [
|
||||
'roles' => [
|
||||
'create' => 'Create Role',
|
||||
'edit' => 'Edit Role',
|
||||
'management' => 'Role Management',
|
||||
|
||||
'table' => [
|
||||
'number_of_users' => 'Number of Users',
|
||||
'permissions' => 'Permissions',
|
||||
'role' => 'Role',
|
||||
'sort' => 'Sort',
|
||||
'total' => 'role total|roles total',
|
||||
],
|
||||
],
|
||||
|
||||
'permissions' => [
|
||||
'create' => 'Create Permission',
|
||||
'edit' => 'Edit Permission',
|
||||
'management' => 'Permission Management',
|
||||
|
||||
'table' => [
|
||||
'permission' => 'Permission',
|
||||
'display_name' => 'Display Name',
|
||||
'sort' => 'Sort',
|
||||
'status' => 'Status',
|
||||
'total' => 'role total|roles total',
|
||||
],
|
||||
]
|
||||
],
|
||||
|
||||
'pages' => [
|
||||
'create' => 'Create Page',
|
||||
'edit' => 'Edit Page',
|
||||
'management' => 'Page Management',
|
||||
'title' => 'Pages',
|
||||
|
||||
'table' => [
|
||||
'title' => 'Title',
|
||||
'status' => 'Status',
|
||||
'createdat' => 'Created At',
|
||||
'updatedat' => 'Updated At',
|
||||
'createdby' => 'Created By',
|
||||
'all' => 'All',
|
||||
],
|
||||
]
|
||||
]
|
||||
];
|
22
resources/lang/en/menus.php
Normal file
22
resources/lang/en/menus.php
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Menus Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used in menu items throughout the system.
|
||||
| Regardless where it is placed, a menu item can be listed here so it is easily
|
||||
| found in a intuitive way.
|
||||
|
|
||||
*/
|
||||
|
||||
'backend' => [
|
||||
'access' => [
|
||||
'title' => 'Access Management',
|
||||
|
||||
],
|
||||
],
|
||||
];
|
|
@ -102,6 +102,35 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'attributes' => [],
|
||||
'attributes' => [
|
||||
'backend' => [
|
||||
'create-dataset' => [
|
||||
// 'email' => 'E-mail Address',
|
||||
// 'firstName' => 'First Name',
|
||||
// 'lastName' => 'Last Name',
|
||||
// 'password' => 'Password',
|
||||
// 'address' => 'Address',
|
||||
// 'country' => 'Country',
|
||||
// 'state' => 'Select State',
|
||||
// 'city' => 'Select City',
|
||||
// 'zipcode' => 'Zip Code',
|
||||
// 'ssn' => 'SSN',
|
||||
// 'password_confirmation' => 'Password Confirmation',
|
||||
// 'old_password' => 'Old Password',
|
||||
// 'new_password' => 'New Password',
|
||||
// 'new_password_confirmation' => 'New Password Confirmation',
|
||||
'terms_and_conditions' => 'terms and conditions',
|
||||
],
|
||||
'pages' => [
|
||||
'title' => 'Title',
|
||||
'description' => 'Description',
|
||||
'cannonical_link' => 'Cannonical Link',
|
||||
'seo_title' => 'SEO Title',
|
||||
'seo_keyword' => 'SEO Keyword',
|
||||
'seo_description' => 'SEO Description',
|
||||
'is_active' => 'Active',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
];
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<div id="titlemain-wrapper">
|
||||
<div class="frontdoor_pagination">
|
||||
{{-- <a id="pagination-link-hitlist" href="{{ route('settings.document') }}">BACK</a> --}}
|
||||
<a href="{{ route('documents') }}" class="pure-button">
|
||||
<a href="{{ route('frontend.datasets') }}" class="pure-button">
|
||||
<span class="glyphicon glyphicon-chevron-left" ></span> BACK
|
||||
</a>
|
||||
|
5
resources/views/frontend/pages/index.blade.php
Normal file
5
resources/views/frontend/pages/index.blade.php
Normal file
|
@ -0,0 +1,5 @@
|
|||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
{!! $page->description !!}
|
||||
@endsection
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<span>
|
||||
<?php foreach ($years as $year) : ?>
|
||||
<a title="documents published in year <?= $year ?>" href="{{ URL::route('sitelinks.list',['year' => $year]) }}"><?= $year ?>
|
||||
<a title="datasets published in year <?= $year ?>" href="{{ URL::route('frontend.sitelinks.list',['year' => $year]) }}"><?= $year ?>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</span>
|
||||
|
@ -20,7 +20,7 @@
|
|||
<section class="post">
|
||||
<header class="post-header">
|
||||
<h2 class="post-title">
|
||||
<a href="{{ URL::route('document.show',['id' =>$document->id]) }}"><?= $document->type; $document->id; ?>
|
||||
<a href="{{ URL::route('frontend.dataset.show',['id' =>$document->id]) }}"><?= $document->type; $document->id; ?>
|
||||
</a>
|
||||
</h2>
|
||||
</header>
|
||||
|
@ -47,4 +47,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@endsection
|
|
@ -56,8 +56,8 @@
|
|||
<div class="block">
|
||||
<h3 class="block-title">About RDR</h3>
|
||||
<ul>
|
||||
<li><a href="{{ URL::route('home.about') }}">About Us</a></li>
|
||||
<li><a href="{{ URL::route('home.news') }}">News</a></li>
|
||||
<li><a href="{{ URL::route('frontend.home.about') }}">About Us</a></li>
|
||||
<li><a href="{{ URL::route('frontend.home.news') }}">News</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -68,9 +68,11 @@
|
|||
<h3 class="block-title">TOOLS & SUPPORT</h3>
|
||||
<ul id="secondary-nav" class="nav">
|
||||
{{-- <li>{{ Request::ip() }}</li> --}}
|
||||
<li class="first"><a href="{{ URL::route('home.contact') }}">Contact</a></li>
|
||||
<li><a href="{{ URL::route('home.imprint') }}">Impressum</a></li>
|
||||
<li class="last"><a href="{{ URL::route('sitelinks.index') }}">Sitelinks</a></li>
|
||||
<li class="first"><a href="{{ URL::route('frontend.home.contact') }}">Contact</a></li>
|
||||
<li><a href="{{ URL::route('frontend.home.imprint') }}">Impressum</a></li>
|
||||
<li class="last"><a href="{{ URL::route('frontend.sitelinks.index') }}">Sitelinks</a></li>
|
||||
<li class="last"><a href="{!! URL::route('frontend.pages.show', ['page_slug'=>'terms-and-conditions']) !!}">Terms and Conditions</a></li>
|
||||
|
||||
<li><a target="_blank" href="https://github.com/geolba"><i class="fa fa-github"></i> rdr bei GitHub</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -66,8 +66,8 @@
|
|||
<ul class="pure-menu-children" role="menu">
|
||||
<li class="pure-menu-item"><a class="pure-menu-link" href="{{ URL::route('oai') }}" target="_blank"> OAI-PMH 2.0</a></li>
|
||||
{{-- <li class="pure-menu-item"><a class="pure-menu-link" href="{{ URL::route('dataset.create1') }}">PUBLISH</a></li> --}}
|
||||
<li class="pure-menu-item"><a class="pure-menu-link" href="{{ URL::route('home.news') }}">NEWS</a></li>
|
||||
<li class="pure-menu-item"><a class="pure-menu-link" href="{{ route('documents') }}">DATASETS</a></li>
|
||||
<li class="pure-menu-item"><a class="pure-menu-link" href="{{ URL::route('frontend.home.news') }}">NEWS</a></li>
|
||||
<li class="pure-menu-item"><a class="pure-menu-link" href="{{ route('frontend.datasets') }}">DATASETS</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
@ -91,10 +91,10 @@
|
|||
<li class="pure-menu-item pure-menu-allow-hover custom-can-transform">
|
||||
<a href="#" class="pure-menu-link">{{ Auth::user()->login }} <span class="fa fa-angle-down"></span></a>
|
||||
<ul class="pure-menu-children" role="menu">
|
||||
<li class="pure-menu-item"><a class="pure-menu-link" href="{{route('settings.user.edit',['id'=>Auth::user()->id]) }}"><i class="fa fa-user"></i> EDIT</a> </li>
|
||||
<li class="pure-menu-item"><a class="pure-menu-link" href="{{route('access.user.edit',['id'=>Auth::user()->id]) }}"><i class="fa fa-user"></i> EDIT</a> </li>
|
||||
@role('administrator')
|
||||
<li class="pure-menu-item"><a class="pure-menu-link" href="{{route('settings.user.index') }}"><i class="fa fa-users"></i> EDIT USERS</a></li>
|
||||
<li class="pure-menu-item"><a class="pure-menu-link" href="{{route('role.index') }}"><i class="fa fa-key"></i> EDIT ROLES</a></li>
|
||||
<li class="pure-menu-item"><a class="pure-menu-link" href="{{route('access.user.index') }}"><i class="fa fa-users"></i> EDIT USERS</a></li>
|
||||
<li class="pure-menu-item"><a class="pure-menu-link" href="{{route('access.role.index') }}"><i class="fa fa-key"></i> EDIT ROLES</a></li>
|
||||
@endrole
|
||||
<li class="pure-menu-item"><a class="pure-menu-link" href="{{ route('logout') }}"><i class="fa fa-sign-out"></i> LOG OUT</a></li>
|
||||
</ul>
|
||||
|
|
|
@ -33,7 +33,12 @@
|
|||
<span class="required" title="Dieses Feld muss ausgefüllt werden.">*</span>
|
||||
</small>
|
||||
{{-- <input name="rights" value="0" type="hidden"> --}}
|
||||
<input class="form-checkbox" name="rights" id="rights" type="checkbox" v-model="dataset.rights" true-value="1" false-value="0">
|
||||
<label>
|
||||
<input class="form-checkbox" name="rights" id="rights" type="checkbox" v-model="dataset.rights" true-value="1" false-value="0">
|
||||
<p>
|
||||
I accept {!! link_to_route('frontend.pages.show', trans('validation.attributes.backend.create-dataset.terms_and_conditions').'*', ['page_slug'=>'terms-and-conditions']) !!}
|
||||
</p>
|
||||
</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
|
@ -244,10 +249,10 @@
|
|||
@section('after-scripts')
|
||||
{{-- <script type="text/javascript" src="{{ asset('js/lib.js') }}"></script> --}}
|
||||
|
||||
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
|
||||
<!-- production version, optimized for size and speed -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
|
||||
<script type="text/javascript" src="{{ asset('js/app.js') }}"></script>
|
||||
{{-- <script type="text/javascript" src="{{ resource_path('assets\js\app.js') }}"></script> --}}
|
||||
{{-- <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue"></script>--}}
|
||||
|
||||
{{-- <script type="text/javascript" src="{{ resource_path('assets\js\datasetPublish.js') }}"></script> --}}
|
||||
<script type="text/javascript" src="{{ asset('backend/publish/datasetPublish.js') }}"></script>
|
||||
@stop
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
@endsection
|
||||
|
||||
@section('after-scripts')
|
||||
<!-- <script src="bower_components/chart.js/dist/Chart.min.js"></script> -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.2.1/Chart.min.js"></script>
|
||||
<script>
|
||||
var ctx = document.getElementById("myChart");
|
||||
|
|
|
@ -8,16 +8,13 @@
|
|||
<link rel="shortcut icon" type="image/x-icon" href="{{ asset('favicon.ico') }}">
|
||||
|
||||
<link rel='stylesheet' href="{{ asset('css/pure-min.css') }}" />
|
||||
<link rel='stylesheet' href="{{ asset('css/grids-responsive-min.css') }}" />
|
||||
|
||||
<!-- <script src="bower_components/chart.js/dist/Chart.min.js"></script> -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.2.1/Chart.min.js"></script>
|
||||
<link rel='stylesheet' href="{{ asset('css/grids-responsive-min.css') }}" />
|
||||
<!--<link rel="stylesheet" type="text/css" href="bower_components/font-awesome/css/font-awesome.min.css">-->
|
||||
<link rel='stylesheet' href="{{ asset('css/font-awesome.css') }}" />
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="{{ asset('/assets/style.css') }}">
|
||||
<link rel="stylesheet" type="text/css" href="{{ asset('/assets/pagination.css') }}">
|
||||
<link rel="stylesheet" type="text/css" href="{{ asset('/backend/style.css') }}">
|
||||
<link rel="stylesheet" type="text/css" href="{{ asset('/backend/pagination.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
@ -84,9 +81,26 @@
|
|||
</li>
|
||||
@endpermission
|
||||
|
||||
@permission('page')
|
||||
<li class="{{ active_class(Active::checkUriPattern('settings/page*')) }}">
|
||||
<a class="pure-menu-link" href="{{ route('settings.page.index') }}">
|
||||
<i class="fa fa-file-text"></i>
|
||||
<span>{{ trans('labels.backend.pages.title') }}</span>
|
||||
</a>
|
||||
</li>
|
||||
@endpermission
|
||||
|
||||
|
||||
<li class="treeview">
|
||||
<h2 class="pure-menu-heading">Access Management <span class="fa fa-angle-down"></h2>
|
||||
<h2 class="pure-menu-heading">
|
||||
<span>{{ trans('menus.backend.access.title') }}</span>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</h2>
|
||||
{{-- <a href="#">
|
||||
<i class="fa fa-users"></i>
|
||||
<span>{{ trans('menus.backend.access.title') }}</span>
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</a> --}}
|
||||
<ul class="pure-menu-list treeview-menu {{ active_class(Route::is('access.*'), 'menu-open') }}" style="display: none; {{ active_class(Route::is('access.*'), 'display: block;') }}">
|
||||
@if (Auth::guest())
|
||||
<li class="pure-menu-item {{ Route::currentRouteName() == 'login' ? 'active' : '' }}">
|
||||
|
@ -108,16 +122,6 @@
|
|||
<a class="pure-menu-link" href="{{ route('logout') }}"><i class="fa fa-sign-out"></i>Logout</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
{{-- @if (Auth::guest())
|
||||
<li class="pure-menu-item {{ Route::currentRouteName() == 'login' ? 'active' : '' }}">
|
||||
<a class="pure-menu-link" href="{{ route('login') }}">LOGIN</a>
|
||||
</li>
|
||||
@else
|
||||
<li class="pure-menu-item"><a class="pure-menu-link" href="{{ route('logout') }}"><i class="fa fa-sign-out"></i>Logout</a></li>
|
||||
@endif --}}
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
@ -144,18 +148,23 @@
|
|||
</div>
|
||||
|
||||
<div class="content">
|
||||
{{-- <div class="breadcrumb">
|
||||
<i class="fa fa-home"></i><a href="#" rel="Dashboard">Dashboard</a>
|
||||
<i class="fa fa-angle-right"></i><a href="#" rel="Dashboard">Sales</a>
|
||||
</div> --}}
|
||||
{{-- @yield('breadcrumbs') --}}
|
||||
@if(Breadcrumbs::exists())
|
||||
{!! Breadcrumbs::render() !!}
|
||||
@endif
|
||||
<div class="l-box">
|
||||
@include('partials.flash')
|
||||
@yield('content')
|
||||
</div>
|
||||
<section class="content-header">
|
||||
@yield('page-header')
|
||||
{{-- <div class="breadcrumb">
|
||||
<i class="fa fa-home"></i><a href="#" rel="Dashboard">Dashboard</a>
|
||||
<i class="fa fa-angle-right"></i><a href="#" rel="Dashboard">Sales</a>
|
||||
</div> --}}
|
||||
{{-- @yield('breadcrumbs') --}}
|
||||
<!-- Breadcrumbs would render from routes/breadcrumb.php -->
|
||||
@if(Breadcrumbs::exists())
|
||||
{!! Breadcrumbs::render() !!}
|
||||
@endif
|
||||
</section>
|
||||
|
||||
<section class="l-box">
|
||||
@include('partials.flash')
|
||||
@yield('content')
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -166,7 +175,7 @@
|
|||
<script type="text/javascript">
|
||||
$('div.alert').not('alert-important');//.delay(3000).slideUp(300);
|
||||
</script>
|
||||
<script type="text/javascript" src="{{ asset('assets/functions.js') }}"></script>
|
||||
<script type="text/javascript" src="{{ asset('backend/functions.js') }}"></script>
|
||||
@yield('after-scripts')
|
||||
</div>
|
||||
|
||||
|
|
98
resources/views/settings/page/edit.blade.php
Normal file
98
resources/views/settings/page/edit.blade.php
Normal file
|
@ -0,0 +1,98 @@
|
|||
@extends ('settings.layouts.app')
|
||||
|
||||
@section ('title', trans('labels.backend.pages.management') . ' | ' . trans('labels.backend.pages.edit'))
|
||||
|
||||
{{-- @section('page-header')
|
||||
<h1>
|
||||
{{ trans('labels.backend.pages.management') }}
|
||||
<small>{{ trans('labels.backend.pages.edit') }}</small>
|
||||
</h1>
|
||||
@endsection --}}
|
||||
|
||||
@section('content')
|
||||
|
||||
{{ Form::model($page, ['method' => 'PATCH', 'route' => ['settings.page.update', $page], 'class' => 'pure-form pure-form-aligned', 'id' => 'edit-role', 'enctype' => 'multipart/form-data']) }}
|
||||
|
||||
<div class="box box-info">
|
||||
|
||||
<div class="header">
|
||||
<h3 class="header-title">{{ trans('labels.backend.pages.edit') }}
|
||||
</h3>
|
||||
<div class="box-tools pull-right">
|
||||
{{-- @include('backend.pages.partials.pages-header-buttons') --}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-body box-content">
|
||||
|
||||
<div class="pure-control-group">
|
||||
{{ Form::label('title', trans('validation.attributes.backend.pages.title'), ['class' => 'col-lg-2 control-label required']) }}
|
||||
<div class="col-lg-10">
|
||||
{{ Form::text('title', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.pages.title'), 'required' => 'required']) }}
|
||||
</div><!--col-lg-10-->
|
||||
</div><!--form control-->
|
||||
|
||||
<div class="pure-control-group">
|
||||
{{ Form::label('description', trans('validation.attributes.backend.pages.description'), ['class' => 'col-lg-2 control-label required']) }}
|
||||
<div class="col-lg-10">
|
||||
{{ Form::textarea('description', null,['class' => 'form-control', 'placeholder' => trans('validation.attributes.backend.pages.description')]) }}
|
||||
</div><!--col-lg-3-->
|
||||
</div><!--form control-->
|
||||
|
||||
<div class="pure-control-group">
|
||||
{{ Form::label('cannonical_link', trans('validation.attributes.backend.pages.cannonical_link'), ['class' => 'col-lg-2 control-label']) }}
|
||||
<div class="col-lg-10">
|
||||
{{ Form::text('cannonical_link', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.pages.cannonical_link')]) }}
|
||||
</div><!--col-lg-10-->
|
||||
</div><!--form control-->
|
||||
|
||||
<div class="pure-control-group">
|
||||
{{ Form::label('seo_title', trans('validation.attributes.backend.pages.seo_title'), ['class' => 'col-lg-2 control-label']) }}
|
||||
<div class="col-lg-10">
|
||||
{{ Form::text('seo_title', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.pages.seo_title')]) }}
|
||||
</div><!--col-lg-10-->
|
||||
</div><!--form control-->
|
||||
|
||||
<div class="pure-control-group">
|
||||
{{ Form::label('seo_keyword', trans('validation.attributes.backend.pages.seo_keyword'), ['class' => 'col-lg-2 control-label']) }}
|
||||
<div class="col-lg-10">
|
||||
{{ Form::text('seo_keyword', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.pages.seo_keyword')]) }}
|
||||
</div><!--col-lg-10-->
|
||||
</div><!--form control-->
|
||||
|
||||
<div class="pure-control-group">
|
||||
{{ Form::label('seo_description', trans('validation.attributes.backend.pages.seo_description'), ['class' => 'col-lg-2 control-label']) }}
|
||||
<div class="col-lg-10">
|
||||
{{ Form::textarea('seo_description', null,['class' => 'form-control', 'placeholder' => trans('validation.attributes.backend.pages.seo_description')]) }}
|
||||
</div><!--col-lg-3-->
|
||||
</div><!--form control-->
|
||||
|
||||
<div class="pure-control-group">
|
||||
{{ Form::label('status', trans('validation.attributes.backend.pages.is_active'), ['class' => 'col-lg-2 control-label']) }}
|
||||
|
||||
<div class="col-lg-10">
|
||||
<div class="control-group">
|
||||
<label class="control control--checkbox">
|
||||
{{ Form::checkbox('status', 1, ($page->status == 1) ? true : false ) }}
|
||||
<div class="control__indicator"></div>
|
||||
</label>
|
||||
</div>
|
||||
</div><!--col-lg-3-->
|
||||
</div><!--form control-->
|
||||
|
||||
<div class="pure-controls">
|
||||
{{ link_to_route('settings.page.index', trans('buttons.general.cancel'), [], ['class' => 'pure-button button-small is-warning']) }}
|
||||
{{ Form::submit(trans('buttons.general.crud.update'), ['class' => 'pure-button button-small is-primary']) }}
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
</div><!-- /.box-body -->
|
||||
</div><!--box-->
|
||||
{{ Form::close() }}
|
||||
@endsection
|
||||
|
||||
@section("after-scripts")
|
||||
<script type="text/javascript">
|
||||
// Backend.Pages.init();
|
||||
</script>
|
||||
@endsection
|
198
resources/views/settings/page/index.blade.php
Normal file
198
resources/views/settings/page/index.blade.php
Normal file
|
@ -0,0 +1,198 @@
|
|||
@extends ('settings.layouts.app')
|
||||
|
||||
@section ('title', trans('labels.backend.pages.management'))
|
||||
|
||||
{{-- @section('page-header')
|
||||
<h2>{{ trans('labels.backend.pages.management') }}</h1>
|
||||
@endsection --}}
|
||||
|
||||
@section('content')
|
||||
<div class="box box-info">
|
||||
|
||||
<div class="box-header with-border header">
|
||||
<h3 class="header-title">
|
||||
<i class="fa fa fa-edit"></i> {{ trans('labels.backend.pages.management') }}
|
||||
</h3>
|
||||
<div class="box-tools pull-right">
|
||||
{{-- @include('backend.pages.partials.pages-header-buttons') --}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-body pure-g box-content">
|
||||
<div class="table-responsive data-table-wrapper pure-u-1 pure-u-md-1">
|
||||
<table id="pages-table" class="table table-condensed table-hover table-bordered pure-table pure-table-horizontal">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('labels.backend.pages.table.title') }}</th>
|
||||
<th>{{ trans('labels.backend.pages.table.status') }}</th>
|
||||
<th>{{ trans('labels.backend.pages.table.createdat') }}</th>
|
||||
<th>{{ trans('labels.backend.pages.table.createdby') }}</th>
|
||||
<th>{{ trans('labels.general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<thead class="transparent-bg">
|
||||
<tr>
|
||||
<th>
|
||||
{!! Form::text('first_name', null, ["class" => "search-input-text form-control", "data-column" => 0, "placeholder" => trans('labels.backend.pages.table.title')]) !!}
|
||||
<a class="reset-data" href="javascript:void(0)"><i class="fa fa-times"></i></a>
|
||||
</th>
|
||||
<th>
|
||||
{!! Form::select('status', [0 => "InActive", 1 => "Active"], null, ["class" => "search-input-select form-control", "data-column" => 1, "placeholder" => trans('labels.backend.pages.table.all')]) !!}
|
||||
</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div><!--table-responsive-->
|
||||
</div><!-- /.box-body -->
|
||||
</div><!--box-->
|
||||
@endsection
|
||||
|
||||
@section('after-scripts')
|
||||
{{-- For DataTables --}}
|
||||
{{ Html::script(mix('js/dataTable.js')) }}
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
var dataTable = $('#pages-table').dataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
ajax: {
|
||||
headers: {
|
||||
'CSRFToken': document.head.querySelector('meta[name="csrf-token"]').content
|
||||
},
|
||||
url: '{{ route("settings.page.get") }}',
|
||||
type: 'get'
|
||||
},
|
||||
columns: [
|
||||
{data: 'title', name: 'title'},
|
||||
{data: 'status', name: 'status'},
|
||||
{data: 'created_at', name: 'created_at'},
|
||||
{data: 'created_by', name: 'first_name'},
|
||||
{data: 'actions', name: 'actions', searchable: false, sortable: false}
|
||||
],
|
||||
order: [[1, "asc"]],
|
||||
searchDelay: 500,
|
||||
dom: 'lBfrtip',
|
||||
buttons: {
|
||||
buttons: [
|
||||
{ extend: 'copy', className: 'copyButton', exportOptions: {columns: [ 0, 1, 2, 3 ] }},
|
||||
{ extend: 'csv', className: 'csvButton', exportOptions: {columns: [ 0, 1, 2, 3 ] }},
|
||||
{ extend: 'excel', className: 'excelButton', exportOptions: {columns: [ 0, 1, 2, 3 ] }},
|
||||
{ extend: 'pdf', className: 'pdfButton', exportOptions: {columns: [ 0, 1, 2, 3 ] }},
|
||||
{ extend: 'print', className: 'printButton', exportOptions: {columns: [ 0, 1, 2, 3 ] }}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
var Backend = {}; // common variable used in all the files of the backend
|
||||
Backend = {
|
||||
|
||||
DataTableSearch: { //functionalities related to datable search at all the places
|
||||
selector: {},
|
||||
|
||||
init: function (dataTable) {
|
||||
|
||||
this.setSelectors();
|
||||
this.setSelectors.divAlerts.delay(2000).fadeOut(800);
|
||||
this.addHandlers(dataTable);
|
||||
|
||||
},
|
||||
setSelectors: function () {
|
||||
this.selector.searchInput = document.querySelector("div.dataTables_filter input");
|
||||
this.selector.columnSearchInput = document.querySelectorAll(".search-input-text");
|
||||
this.selector.columnSelectInput = document.querySelectorAll(".search-input-select");
|
||||
this.selector.restButton = document.querySelectorAll('.reset-data');
|
||||
this.setSelectors.copyButton = document.getElementById("copyButton");
|
||||
this.setSelectors.csvButton = document.getElementById("csvButton");
|
||||
this.setSelectors.excelButton = document.getElementById("excelButton");
|
||||
this.setSelectors.pdfButton = document.getElementById("pdfButton");
|
||||
this.setSelectors.printButton = document.getElementById("printButton");
|
||||
this.setSelectors.divAlerts = jQuery('div.alert').not('.alert-important');
|
||||
|
||||
},
|
||||
cloneElement: function (element, callback) {
|
||||
var clone = element.cloneNode();
|
||||
while (element.firstChild) {
|
||||
clone.appendChild(element.lastChild);
|
||||
}
|
||||
element.parentNode.replaceChild(clone, element);
|
||||
Backend.DataTableSearch.setSelectors();
|
||||
callback(this.selector.searchInput);
|
||||
},
|
||||
addHandlers: function (dataTable) {
|
||||
// get the datatable search input and on its key press check if we hit enter then search with datatable
|
||||
this.cloneElement(this.selector.searchInput, function (element) { //cloning done to remove any binding of the events
|
||||
element.onkeypress = function (event) {
|
||||
if (event.keyCode == 13) {
|
||||
dataTable.fnFilter(this.value);
|
||||
}
|
||||
};
|
||||
}); // to remove all the listinerers
|
||||
|
||||
// for text boxes
|
||||
//column input search if search box on the column of the datatable given with enter then search with datatable
|
||||
if (this.selector.columnSearchInput.length > 0) {
|
||||
this.selector.columnSearchInput.forEach(function (element) {
|
||||
element.onkeypress = function (event) {
|
||||
if (event.keyCode == 13) {
|
||||
var i = element.getAttribute("data-column"); // getting column index
|
||||
var v = element.value; // getting search input value
|
||||
dataTable.api().columns(i).search(v).draw();
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// Individual columns search
|
||||
if (this.selector.columnSelectInput.length >> 0) {
|
||||
this.selector.columnSelectInput.forEach(function (element) {
|
||||
element.onchange = function (event) {
|
||||
var i = element.getAttribute("data-column"); // getting column index
|
||||
var v = element.value; // getting search input value
|
||||
dataTable.api().columns(i).search(v).draw();
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
// Individual columns reset
|
||||
if (this.selector.restButton.length >> 0) {
|
||||
this.selector.restButton.forEach(function (element) {
|
||||
element.onclick = function (event) {
|
||||
var inputelement = this.previousElementSibling;
|
||||
var i = inputelement.getAttribute("data-column");
|
||||
inputelement.value = "";
|
||||
dataTable.api().columns(i).search("").draw();
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/*this.setSelectors.copyButton.onclick = function (element) {
|
||||
document.querySelector(".copyButton").click();
|
||||
};
|
||||
this.setSelectors.csvButton.onclick = function (element) {
|
||||
document.querySelector(".csvButton").click();
|
||||
};
|
||||
this.setSelectors.excelButton.onclick = function (element) {
|
||||
document.querySelector(".excelButton").click();
|
||||
};
|
||||
this.setSelectors.pdfButton.onclick = function (element) {
|
||||
document.querySelector(".pdfButton").click();
|
||||
};
|
||||
this.setSelectors.printButton.onclick = function (element) {
|
||||
document.querySelector(".printButton").click();
|
||||
};*/
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
Backend.DataTableSearch.init(dataTable);
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
@endsection
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue