Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
webprofile-jwg2024
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Siti Aisah
webprofile-jwg2024
Commits
61e704e5
Commit
61e704e5
authored
5 years ago
by
Aan Choesni Herlingga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
master layouts
parent
f730c7a5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
306 additions
and
0 deletions
+306
-0
app/Http/Controllers/Webprofile/Backend/LayoutController.php
+124
-0
database/migrations/2019_11_12_112102_create_design_table.php
+1
-0
resources/lang/en/feature.php
+10
-0
resources/lang/en/label.php
+2
-0
resources/lang/id/feature.php
+10
-0
resources/lang/id/label.php
+2
-0
resources/views/webprofile/backend/design/create.blade.php
+78
-0
resources/views/webprofile/backend/design/edit.blade.php
+78
-0
resources/views/webprofile/backend/design/index.blade.php
+0
-0
routes/webprofile/backend.php
+1
-0
No files found.
app/Http/Controllers/Webprofile/Backend/LayoutController.php
0 → 100644
View file @
61e704e5
<?php
namespace
App\Http\Controllers\Webprofile\Backend
;
use
Illuminate\Http\Request
;
use
App\Http\Controllers\Controller
;
use
App\Repositories\Webprofile\DesignRepository
;
use
Crypt
;
class
LayoutController
extends
Controller
{
private
$repo
;
public
function
__construct
(
DesignRepository
$repo
)
{
$this
->
repo
=
$repo
;
}
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public
function
index
()
{
$layouts
=
$this
->
repo
->
get
();
$data
=
[
'layouts'
=>
$layouts
,
];
return
view
(
'webprofile.backend.design.index'
,
$data
)
->
withTitle
(
trans
(
'feature.layout'
));
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public
function
create
()
{
return
redirect
()
->
route
(
'layouts.index'
);
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public
function
store
(
Request
$request
)
{
$data
=
$request
->
except
(
'_token'
);
array_key_exists
(
'title_show'
,
$data
)
?
$data
[
'title_show'
]
=
1
:
$data
[
'title_show'
]
=
0
;
$this
->
repo
->
store
(
$data
);
return
redirect
()
->
route
(
'layouts.index'
);
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public
function
show
(
$id
)
{
$data
=
[
'position'
=>
$id
,
];
return
view
(
'webprofile.backend.design.create'
,
$data
)
->
withTitle
(
trans
(
'label.create'
)
.
' '
.
trans
(
'feature.'
.
$id
));
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public
function
edit
(
$id
)
{
$layout
=
$this
->
repo
->
findId
(
Crypt
::
decrypt
(
$id
));
$data
=
[
'data'
=>
$layout
,
];
return
view
(
'webprofile.backend.design.edit'
,
$data
)
->
withTitle
(
trans
(
'label.edit'
)
.
' '
.
trans
(
'feature.'
.
$layout
->
name_design
));
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public
function
update
(
Request
$request
,
$id
)
{
$data
=
$request
->
except
([
'_token'
,
'id'
]);
array_key_exists
(
'title_show'
,
$data
)
?
$data
[
'title_show'
]
=
1
:
$data
[
'title_show'
]
=
0
;
$layout
=
$this
->
repo
->
findId
(
$id
);
$edit
=
$this
->
repo
->
update
(
$data
,
$layout
);
return
redirect
()
->
route
(
'layouts.index'
);
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public
function
destroy
(
$id
)
{
$data
=
$this
->
repo
->
findId
(
Crypt
::
decrypt
(
$id
));
$this
->
repo
->
destroy
(
$data
);
return
redirect
()
->
route
(
'layouts.index'
);
}
}
This diff is collapsed.
Click to expand it.
database/migrations/2019_11_12_112102_create_design_table.php
View file @
61e704e5
...
@@ -19,6 +19,7 @@ class CreateDesignTable extends Migration
...
@@ -19,6 +19,7 @@ class CreateDesignTable extends Migration
$table
->
string
(
'title_design'
)
->
nullable
();
$table
->
string
(
'title_design'
)
->
nullable
();
$table
->
text
(
'value_design'
)
->
nullable
();
$table
->
text
(
'value_design'
)
->
nullable
();
$table
->
integer
(
'urutan'
)
->
nullable
();
$table
->
integer
(
'urutan'
)
->
nullable
();
$table
->
boolean
(
'title_show'
)
->
nullable
();
$table
->
string
(
'userid_created'
,
36
)
->
nullable
();
$table
->
string
(
'userid_created'
,
36
)
->
nullable
();
$table
->
string
(
'userid_updated'
,
36
)
->
nullable
();
$table
->
string
(
'userid_updated'
,
36
)
->
nullable
();
$table
->
timestamps
();
$table
->
timestamps
();
...
...
This diff is collapsed.
Click to expand it.
resources/lang/en/feature.php
View file @
61e704e5
...
@@ -42,4 +42,14 @@ return [
...
@@ -42,4 +42,14 @@ return [
'edit_slider'
=>
'Edit Slider'
,
'edit_slider'
=>
'Edit Slider'
,
'edit_layout'
=>
'Edit Layout'
,
'edit_layout'
=>
'Edit Layout'
,
'widget_right'
=>
'Widget Right'
,
'widget_left'
=>
'Widget Left'
,
'body'
=>
'Body'
,
'quote'
=>
'Quote'
,
'footer'
=>
'Footer'
,
'footer_row_1'
=>
'Footer 1'
,
'footer_row_2'
=>
'Footer 2'
,
'footer_row_3'
=>
'Footer 3'
,
'footer_row_4'
=>
'Footer 4'
,
];
];
This diff is collapsed.
Click to expand it.
resources/lang/en/label.php
View file @
61e704e5
...
@@ -27,4 +27,5 @@ return [
...
@@ -27,4 +27,5 @@ return [
'value'
=>
'Value'
,
'value'
=>
'Value'
,
'upload'
=>
'Upload'
,
'upload'
=>
'Upload'
,
'download'
=>
'Download'
,
'download'
=>
'Download'
,
'title_show'
=>
'Title Show'
,
];
];
\ No newline at end of file
This diff is collapsed.
Click to expand it.
resources/lang/id/feature.php
View file @
61e704e5
...
@@ -42,4 +42,14 @@ return [
...
@@ -42,4 +42,14 @@ return [
'edit_slider'
=>
'Ubah Slider'
,
'edit_slider'
=>
'Ubah Slider'
,
'edit_layout'
=>
'Ubah Tampilan'
,
'edit_layout'
=>
'Ubah Tampilan'
,
'widget_right'
=>
'Widget Kanan'
,
'widget_left'
=>
'Widget Kiri'
,
'body'
=>
'Body'
,
'quote'
=>
'Quote'
,
'footer'
=>
'Footer'
,
'footer_row_1'
=>
'Footer 1'
,
'footer_row_2'
=>
'Footer 2'
,
'footer_row_3'
=>
'Footer 3'
,
'footer_row_4'
=>
'Footer 4'
,
];
];
This diff is collapsed.
Click to expand it.
resources/lang/id/label.php
View file @
61e704e5
...
@@ -27,4 +27,5 @@ return [
...
@@ -27,4 +27,5 @@ return [
'value'
=>
'Nilai'
,
'value'
=>
'Nilai'
,
'upload'
=>
'Unggah'
,
'upload'
=>
'Unggah'
,
'download'
=>
'Unduh'
,
'download'
=>
'Unduh'
,
'title_show'
=>
'Judul ditampilkan'
,
];
];
\ No newline at end of file
This diff is collapsed.
Click to expand it.
resources/views/webprofile/backend/design/create.blade.php
0 → 100644
View file @
61e704e5
@
extends
(
'webprofile.backend.layouts.master'
)
@
section
(
'title'
)
{{
$title
}}
@
stop
@
section
(
'assets'
)
<
link
rel
=
"stylesheet"
href
=
"{!! asset('backend/assets/select2/select2.min.css') !!}"
>
<
style
media
=
"screen"
>
.
tkh
{
color
:
black
;
}
</
style
>
@
stop
@
section
(
'breadcrumbs'
)
<
li
><
a
href
=
"{{ url('dashboard') }}"
>@
lang
(
'label.dashboard'
)
</
a
></
li
>
<
li
class
="
active
">@lang('label.create') @lang('feature.' .
$position
)</li>
@stop
@section('content')
<!-- page start-->
<div class="
row
">
{!! Form::open(array('url' => route('layouts.store'), 'method' => 'POST')) !!}
{!! csrf_field() !!}
<div class="
col
-
md
-
12
">
<div class="
panel
panel
-
default
">
<div class="
panel
-
heading
">
<h3 class="
panel
-
title
"><strong>@lang('label.create')</strong> @lang('feature.' .
$position
)</h3>
</div>
<div class="
panel
-
body
">
<div class="
row
">
{{ Form::text('name_design',
$position
, ['style'=>'display:none;']) }}
<div class="
col
-
md
-
12
">
<div class="
form
-
group
@
if
(
$errors
->
has
(
'title_design'
))
has
-
error
@
endif
">
<div class="
col
-
md
-
11
">
{{ Form::text('title_design', old('title_design'), array('class' => 'form-control', 'placeholder'=>trans('label.title'), 'style'=>'font-size: 14pt;')) }}
@if (
$errors->has
('title_design'))
<label id="
login
-
error
" class="
error
" for="
login
">
{
{$errors->first('title_design')}
}
</label>
@endif
</div>
<div class="
col
-
md
-
1
">
<label class="
switch
">
{{ Form::checkbox('title_show', 1, true, ['data-toggle'=>'tooltip', 'data-original-title'=>trans('label.title_show')]) }}
<span></span>
</label>
</div>
</div>
</div>
<div class="
col
-
md
-
12
">
<div class="
block
">
{{ Form::textarea('value_design', null, array('class'=>'summernote')) }}
</div>
</div>
</div>
</div>
</div>
</div>
<div class="
col
-
md
-
12
">
<div class="
panel
panel
-
default
">
<div class="
panel
-
footer
">
<button class="
btn
btn
-
info
pull
-
right
">@lang('label.save')</button>
</div>
</div>
</div>
{!! Form::close() !!}
</div>
<!-- page end-->
@stop
@section('script')
{!! Html::script('backend/assets/select2/select2.full.min.js') !!}
{!! Html::script('backend/js/plugins/bootstrap/bootstrap-datepicker.js') !!}
{!! Html::script('backend/js/plugins/bootstrap/bootstrap-timepicker.min.js') !!}
{!! Html::script('backend/js/plugins/bootstrap/bootstrap-file-input.js') !!}
{!! Html::script('backend/js/plugins/summernote/summernote.js') !!}
@stop
\ No newline at end of file
This diff is collapsed.
Click to expand it.
resources/views/webprofile/backend/design/edit.blade.php
0 → 100644
View file @
61e704e5
@
extends
(
'webprofile.backend.layouts.master'
)
@
section
(
'title'
)
{{
$title
}}
@
stop
@
section
(
'assets'
)
<
link
rel
=
"stylesheet"
href
=
"{!! asset('backend/assets/select2/select2.min.css') !!}"
>
<
style
media
=
"screen"
>
.
tkh
{
color
:
black
;
}
</
style
>
@
stop
@
section
(
'breadcrumbs'
)
<
li
><
a
href
=
"{{ url('dashboard') }}"
>@
lang
(
'label.dashboard'
)
</
a
></
li
>
<
li
class
="
active
">@lang('label.edit') @lang('feature.' .
$data->name_design
)</li>
@stop
@section('content')
<!-- page start-->
<div class="
row
">
{!! Form::model(
$data
, ['route' => ['layouts.update',
$data->id
], 'method'=>'patch']) !!}
{!! csrf_field() !!}
<div class="
col
-
md
-
12
">
<div class="
panel
panel
-
default
">
<div class="
panel
-
heading
">
<h3 class="
panel
-
title
"><strong>@lang('label.create')</strong> @lang('feature.' .
$data->name_design
)</h3>
</div>
<div class="
panel
-
body
">
<div class="
row
">
{{ Form::text('name_design',
$data->name_design
, ['style'=>'display:none;']) }}
<div class="
col
-
md
-
12
">
<div class="
form
-
group
@
if
(
$errors
->
has
(
'title_design'
))
has
-
error
@
endif
">
<div class="
col
-
md
-
11
">
{{ Form::text('title_design', old('title_design'), array('class' => 'form-control', 'placeholder'=>trans('label.title'), 'style'=>'font-size: 14pt;')) }}
@if (
$errors->has
('title_design'))
<label id="
login
-
error
" class="
error
" for="
login
">
{
{$errors->first('title_design')}
}
</label>
@endif
</div>
<div class="
col
-
md
-
1
">
<label class="
switch
">
{{ Form::checkbox('title_show',
$data->title_show
,
$data->title_show
, ['data-toggle'=>'tooltip', 'data-original-title'=>trans('label.title_show')]) }}
<span></span>
</label>
</div>
</div>
</div>
<div class="
col
-
md
-
12
">
<div class="
block
">
{{ Form::textarea('value_design', null, array('class'=>'summernote')) }}
</div>
</div>
</div>
</div>
</div>
</div>
<div class="
col
-
md
-
12
">
<div class="
panel
panel
-
default
">
<div class="
panel
-
footer
">
<button class="
btn
btn
-
info
pull
-
right
">@lang('label.save')</button>
</div>
</div>
</div>
{!! Form::close() !!}
</div>
<!-- page end-->
@stop
@section('script')
{!! Html::script('backend/assets/select2/select2.full.min.js') !!}
{!! Html::script('backend/js/plugins/bootstrap/bootstrap-datepicker.js') !!}
{!! Html::script('backend/js/plugins/bootstrap/bootstrap-timepicker.min.js') !!}
{!! Html::script('backend/js/plugins/bootstrap/bootstrap-file-input.js') !!}
{!! Html::script('backend/js/plugins/summernote/summernote.js') !!}
@stop
\ No newline at end of file
This diff is collapsed.
Click to expand it.
resources/views/webprofile/backend/design/index.blade.php
0 → 100644
View file @
61e704e5
This diff is collapsed.
Click to expand it.
routes/webprofile/backend.php
View file @
61e704e5
...
@@ -11,6 +11,7 @@ Route::group(['middleware' => 'auth'], function () {
...
@@ -11,6 +11,7 @@ Route::group(['middleware' => 'auth'], function () {
Route
::
resource
(
'gallery'
,
'GalleryController'
);
Route
::
resource
(
'gallery'
,
'GalleryController'
);
Route
::
resource
(
'categoriesfile'
,
'CategoriesFileController'
);
Route
::
resource
(
'categoriesfile'
,
'CategoriesFileController'
);
Route
::
resource
(
'file'
,
'FileController'
);
Route
::
resource
(
'file'
,
'FileController'
);
Route
::
resource
(
'layouts'
,
'LayoutController'
);
});
});
// });
// });
});
});
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment