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
fad2715d
Commit
fad2715d
authored
5 years ago
by
Aan Choesni Herlingga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
show front image
parent
46465ada
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
89 additions
and
30 deletions
+89
-30
app/Http/Controllers/Webprofile/Backend/PostController.php
+3
-4
app/Repositories/StorageRepository.php
+10
-5
app/Repositories/Webprofile/PostRepository.php
+2
-14
resources/views/webprofile/front/jollyany/en/index.blade.php
+34
-3
resources/views/webprofile/front/jollyany/index.blade.php
+40
-4
No files found.
app/Http/Controllers/Webprofile/Backend/PostController.php
View file @
fad2715d
...
...
@@ -68,8 +68,7 @@ class PostController extends Controller
array_key_exists
(
'post_status'
,
$data
)
?
$data
[
'post_status'
]
=
1
:
$data
[
'post_status'
]
=
0
;
array_key_exists
(
'cover_status'
,
$data
)
?
$data
[
'cover_status'
]
=
1
:
$data
[
'cover_status'
]
=
0
;
$save
=
$this
->
repo
->
store
(
$data
);
$save
=
$this
->
repo
->
store
(
$request
,
'thumbnail'
,
'off'
);
if
(
webprofilesetting
()[
'auto_translate'
]
==
1
)
{
// save translate
...
...
@@ -138,7 +137,7 @@ class PostController extends Controller
array_key_exists
(
'cover_status'
,
$data
)
?
$data
[
'cover_status'
]
=
1
:
$data
[
'cover_status'
]
=
0
;
$post
=
$this
->
repo
->
findId
(
$id
,
[
'rEn'
]);
$edit
=
$this
->
repo
->
update
(
$
data
,
$post
);
$edit
=
$this
->
repo
->
update
(
$
request
,
$post
,
'thumbnail'
,
'off'
);
$this
->
updateEn
(
$dataEn
,
$post
);
...
...
@@ -162,7 +161,7 @@ class PostController extends Controller
public
function
destroy
(
$id
)
{
$data
=
$this
->
repo
->
findId
(
$id
,
[
'rEn'
]);
$this
->
repo
->
destroy
(
$data
);
$this
->
repo
->
destroy
(
$data
,
'thumbnail'
);
if
(
$data
->
rEn
)
{
$this
->
repoEn
->
destroy
(
$data
->
rEn
);
...
...
This diff is collapsed.
Click to expand it.
app/Repositories/StorageRepository.php
View file @
fad2715d
...
...
@@ -36,7 +36,7 @@ abstract class StorageRepository
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public
function
store
(
$request
,
$tipe
)
public
function
store
(
$request
,
$tipe
,
$is_active
=
'on'
)
{
$setting
=
webprofilesetting
();
...
...
@@ -55,8 +55,11 @@ abstract class StorageRepository
$data
[
$tipe
]
=
$filename
;
}
array_key_exists
(
'is_active'
,
$data
)
?
$data
[
'is_active'
]
=
1
:
$data
[
'is_active'
]
=
0
;
$request
[
'userid_created'
]
=
auth
()
->
user
()
->
id
;
if
(
$is_active
==
'on'
)
{
array_key_exists
(
'is_active'
,
$data
)
?
$data
[
'is_active'
]
=
1
:
$data
[
'is_active'
]
=
0
;
}
$data
[
'userid_created'
]
=
auth
()
->
user
()
->
id
;
return
$this
->
model
->
create
(
$data
);
}
...
...
@@ -67,7 +70,7 @@ abstract class StorageRepository
* @param Model $model
* @return \Illuminate\Http\Response
*/
public
function
update
(
$request
,
$model
,
$tipe
)
public
function
update
(
$request
,
$model
,
$tipe
,
$is_active
=
'on'
)
{
$setting
=
webprofilesetting
();
...
...
@@ -87,7 +90,9 @@ abstract class StorageRepository
$data
[
$tipe
]
=
$filename
;
}
array_key_exists
(
'is_active'
,
$data
)
?
$data
[
'is_active'
]
=
1
:
$data
[
'is_active'
]
=
0
;
if
(
$is_active
==
'on'
)
{
array_key_exists
(
'is_active'
,
$data
)
?
$data
[
'is_active'
]
=
1
:
$data
[
'is_active'
]
=
0
;
}
$data
[
'userid_updated'
]
=
auth
()
->
user
()
->
id
;
return
$model
->
update
(
$data
);
...
...
This diff is collapsed.
Click to expand it.
app/Repositories/Webprofile/PostRepository.php
View file @
fad2715d
...
...
@@ -3,10 +3,10 @@
namespace
App\Repositories\Webprofile
;
use
App\Models\Webprofile\Posts
;
use
App\Repositories\Repository
;
use
App\Repositories\
Storage
Repository
;
use
DataTables
;
class
PostRepository
extends
Repository
class
PostRepository
extends
Storage
Repository
{
protected
$model
;
...
...
@@ -30,18 +30,6 @@ class PostRepository extends Repository
->
get
();
}
/**
* Custom Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public
function
store
(
$request
)
{
$request
[
'userid_created'
]
=
auth
()
->
user
()
->
id
;
return
$this
->
model
->
create
(
$request
);
}
public
function
datatable
(
$data
)
{
return
DataTables
::
of
(
$data
)
...
...
This diff is collapsed.
Click to expand it.
resources/views/webprofile/front/jollyany/en/index.blade.php
View file @
fad2715d
...
...
@@ -39,7 +39,13 @@
<div class="
blog
-
carousel
">
<div class="
entry
">
@if(
$value->thumbnail
)
<center><img src="
https
://
statik
.
unesa
.
ac
.
id
/
profileunesa_konten_statik
/
uploads
/
{
!!
Session
::
get
(
'ss_setting'
)[
'statik_konten'
]
!!
}
/
posts
/
{
!!
$value
->
thumbnail
!!
}
" alt="" class="
img
-
responsive
" style="
height
:
150
px
;
width
:
auto
;
"></center>
<center>
@if (
$setting['external_storage']
== 1)
<img src="
{{
$setting
[
'url_static'
]
.
'/'
.
$setting
[
'directory'
]
.
'/thumbnail/'
.
$value
->
thumbnail
}}
" alt="" class="
img
-
responsive
" style="
height
:
150
px
;
width
:
auto
;
">
@else
<img src="
{{
url
(
'/storage/thumbnail/'
.
$value
->
thumbnail
)
}}
" alt="" class="
img
-
responsive
" style="
height
:
150
px
;
width
:
auto
;
">
@endif
</center>
@endif
</div>
<div class="
blog
-
carousel
-
header
">
...
...
@@ -78,6 +84,18 @@
</div><!-- end content -->
<div id="
sidebar
" class="
col
-
lg
-
4
col
-
md
-
4
col
-
sm
-
12
col
-
xs
-
12
">
{{-- <div class="
widget
">
<div id="
google_translate_element
"></div>
<script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'id'
}, 'google_translate_element');
}
</script>
<script src="
http
://
translate
.
google
.
com
/
translate_a
/
element
.
js
?
cb
=
googleTranslateElementInit
"></script>
</div> --}}
<div class="
widget
">
<div class="
title
">
<h2>AGENDA</h2>
...
...
@@ -104,7 +122,15 @@
<ul class="
recent_posts_widget
">
@foreach(
$resend
as
$value
)
<li>
<a href="
{
!!
url
(
'post/'
.
$value
->
slug
)
!!
}
">@if(
$value->thumbnail
)<img src="
https
://
statik
.
unesa
.
ac
.
id
/
profileunesa_konten_statik
/
uploads
/
{
!!
Session
::
get
(
'ss_setting'
)[
'statik_konten'
]
!!
}
/
posts
/
{
!!
$value
->
thumbnail
!!
}
" alt="" />@endif{!!
$value->rEn
->title !!}</a>
<a href="
{
!!
url
(
'post/'
.
$value
->
slug
)
!!
}
">
@if(
$value->thumbnail
)
@if (
$setting['external_storage']
== 1)
<img src="
{{
$setting
[
'url_static'
]
.
'/'
.
$setting
[
'directory'
]
.
'/thumbnail/'
.
$value
->
thumbnail
}}
" alt="" class="
img
-
responsive
" style="
height
:
150
px
;
width
:
auto
;
">
@else
<img src="
{{
url
(
'/storage/thumbnail/'
.
$value
->
thumbnail
)
}}
" alt="" class="
img
-
responsive
" style="
height
:
150
px
;
width
:
auto
;
">
@endif
@endif{!!
$value->rEn
->title !!}
</a>
<a class="
readmore
" href="
{
!!
url
(
'post/'
.
$value
->
slug
)
!!
}
">{!! InseoHelper::tglbulanindo2(
$value->post_date
) !!}</a>
</li>
@endforeach
...
...
@@ -114,7 +140,12 @@
<ul class="
recent_posts_widget
">
@foreach(
$hot
as
$value
)
<li>
<a href="
{
!!
url
(
'post/'
.
$value
->
slug
)
!!
}
">@if(
$value->thumbnail
)<img src="
https
://
statik
.
unesa
.
ac
.
id
/
profileunesa_konten_statik
/
uploads
/
{
!!
Session
::
get
(
'ss_setting'
)[
'statik_konten'
]
!!
}
/
posts
/
{
!!
$value
->
thumbnail
!!
}
" alt="" />@endif{!!
$value->rEn
->title !!}</a>
<a href="
{
!!
url
(
'post/'
.
$value
->
slug
)
!!
}
">@if(
$value->thumbnail
)@if (
$setting['external_storage']
== 1)
<img src="
{{
$setting
[
'url_static'
]
.
'/'
.
$setting
[
'directory'
]
.
'/thumbnail/'
.
$value
->
thumbnail
}}
" alt="" class="
img
-
responsive
" style="
height
:
150
px
;
width
:
auto
;
">
@else
<img src="
{{
url
(
'/storage/thumbnail/'
.
$value
->
thumbnail
)
}}
" alt="" class="
img
-
responsive
" style="
height
:
150
px
;
width
:
auto
;
">
@endif
@endif{!!
$value->rEn
->title !!}</a>
<a class="
readmore
" href="
{
!!
url
(
'post/'
.
$value
->
slug
)
!!
}
">{!! InseoHelper::tglbulanindo2(
$value->post_date
) !!}</a>
</li>
@endforeach
...
...
This diff is collapsed.
Click to expand it.
resources/views/webprofile/front/jollyany/index.blade.php
View file @
fad2715d
...
...
@@ -39,7 +39,13 @@
<div class="
blog
-
carousel
">
<div class="
entry
">
@if(
$value->thumbnail
)
<center><img src="
https
://
statik
.
unesa
.
ac
.
id
/
profileunesa_konten_statik
/
uploads
/
{
!!
Session
::
get
(
'ss_setting'
)[
'statik_konten'
]
!!
}
/
posts
/
{
!!
$value
->
thumbnail
!!
}
" alt="" class="
img
-
responsive
" style="
height
:
150
px
;
width
:
auto
;
"></center>
<center>
@if (
$setting['external_storage']
== 1)
<img src="
{{
$setting
[
'url_static'
]
.
'/'
.
$setting
[
'directory'
]
.
'/thumbnail/'
.
$value
->
thumbnail
}}
" alt="" class="
img
-
responsive
" style="
height
:
150
px
;
width
:
auto
;
">
@else
<img src="
{{
url
(
'/storage/thumbnail/'
.
$value
->
thumbnail
)
}}
" alt="" class="
img
-
responsive
" style="
height
:
150
px
;
width
:
auto
;
">
@endif
</center>
@endif
</div>
<div class="
blog
-
carousel
-
header
">
...
...
@@ -78,6 +84,18 @@
</div><!-- end content -->
<div id="
sidebar
" class="
col
-
lg
-
4
col
-
md
-
4
col
-
sm
-
12
col
-
xs
-
12
">
{{-- <div class="
widget
">
<div id="
google_translate_element
"></div>
<script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'id'
}, 'google_translate_element');
}
</script>
<script src="
http
://
translate
.
google
.
com
/
translate_a
/
element
.
js
?
cb
=
googleTranslateElementInit
"></script>
</div> --}}
<div class="
widget
">
<div class="
title
">
<h2>AGENDA</h2>
...
...
@@ -104,8 +122,18 @@
<ul class="
recent_posts_widget
">
@foreach(
$resend
as
$value
)
<li>
<a href="
{
!!
url
(
'post/'
.
$value
->
slug
)
!!
}
">@if(
$value->thumbnail
)<img src="
https
://
statik
.
unesa
.
ac
.
id
/
profileunesa_konten_statik
/
uploads
/
{
!!
Session
::
get
(
'ss_setting'
)[
'statik_konten'
]
!!
}
/
posts
/
{
!!
$value
->
thumbnail
!!
}
" alt="" />@endif{!!
$value->title
!!}</a>
<a class="
readmore
" href="
{
!!
url
(
'post/'
.
$value
->
slug
)
!!
}
">{!! InseoHelper::tglbulanindo2(
$value->post_date
) !!}</a>
<a href="
{
!!
url
(
'post/'
.
$value
->
slug
)
!!
}
">
@if(
$value->thumbnail
)
@if (
$setting['external_storage']
== 1)
<img src="
{{
$setting
[
'url_static'
]
.
'/'
.
$setting
[
'directory'
]
.
'/thumbnail/'
.
$value
->
thumbnail
}}
" alt="" class="
img
-
responsive
" style="
height
:
150
px
;
width
:
auto
;
">
@else
<img src="
{{
url
(
'/storage/thumbnail/'
.
$value
->
thumbnail
)
}}
" alt="" class="
img
-
responsive
" style="
height
:
150
px
;
width
:
auto
;
">
@endif
@endif{!!
$value->title
!!}
</a>
<a class="
readmore
" href="
{
!!
url
(
'post/'
.
$value
->
slug
)
!!
}
">
{!! InseoHelper::tglbulanindo2(
$value->post_date
) !!}
</a>
</li>
@endforeach
</ul><!-- recent posts -->
...
...
@@ -114,7 +142,15 @@
<ul class="
recent_posts_widget
">
@foreach(
$hot
as
$value
)
<li>
<a href="
{
!!
url
(
'post/'
.
$value
->
slug
)
!!
}
">@if(
$value->thumbnail
)<img src="
https
://
statik
.
unesa
.
ac
.
id
/
profileunesa_konten_statik
/
uploads
/
{
!!
Session
::
get
(
'ss_setting'
)[
'statik_konten'
]
!!
}
/
posts
/
{
!!
$value
->
thumbnail
!!
}
" alt="" />@endif{!!
$value->title
!!}</a>
<a href="
{
!!
url
(
'post/'
.
$value
->
slug
)
!!
}
">
@if(
$value->thumbnail
)
@if (
$setting['external_storage']
== 1)
<img src="
{{
$setting
[
'url_static'
]
.
'/'
.
$setting
[
'directory'
]
.
'/thumbnail/'
.
$value
->
thumbnail
}}
" alt="" class="
img
-
responsive
" style="
height
:
150
px
;
width
:
auto
;
">
@else
<img src="
{{
url
(
'/storage/thumbnail/'
.
$value
->
thumbnail
)
}}
" alt="" class="
img
-
responsive
" style="
height
:
150
px
;
width
:
auto
;
">
@endif
@endif{!!
$value->title
!!}
</a>
<a class="
readmore
" href="
{
!!
url
(
'post/'
.
$value
->
slug
)
!!
}
">{!! InseoHelper::tglbulanindo2(
$value->post_date
) !!}</a>
</li>
@endforeach
...
...
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