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
8d1ce446
Commit
8d1ce446
authored
Jan 13, 2020
by
Aan Choesni Herlingga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
front archive
parent
44f6f30d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
232 additions
and
1 deletions
+232
-1
app/Http/Controllers/Webprofile/Front/ArchiveController.php
+79
-0
resources/views/webprofile/front/jollyany/archive.blade.php
+76
-0
resources/views/webprofile/front/jollyany/en/archive.blade.php
+76
-0
routes/webprofile/front.php
+1
-1
No files found.
app/Http/Controllers/Webprofile/Front/ArchiveController.php
0 → 100644
View file @
8d1ce446
<?php
namespace
App\Http\Controllers\Webprofile\Front
;
use
App\Http\Controllers\Controller
;
use
App\Models\Webprofile\Categories
;
use
App\Models\Webprofile\Design
;
use
App\Models\Webprofile\Menu
;
use
App\Models\Webprofile\Posts
;
use
Session
;
class
ArchiveController
extends
Controller
{
public
function
index
()
{
$setting
=
webprofilesetting
();
if
(
!
Session
::
has
(
'selected_language'
))
{
session
([
'selected_language'
=>
'id'
]);
}
if
(
Session
::
get
(
'selected_language'
)
==
'id'
)
{
$data
=
$this
->
getDataId
(
$setting
);
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.archive'
,
$data
)
->
withTitle
(
'Arsip'
);
}
else
if
(
Session
::
get
(
'selected_language'
)
==
'en'
)
{
$data
=
$this
->
getDataEn
(
$setting
);
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.en.archive'
,
$data
)
->
withTitle
(
'Archive'
);
}
}
public
function
getDataId
(
$setting
)
{
$setting
=
webprofilesetting
();
$data
=
$data
=
Posts
::
where
(
'post_status'
,
'1'
)
->
orderBy
(
'post_date'
,
'desc'
)
->
paginate
(
$setting
[
'post_per_page'
]);
$resend
=
Posts
::
where
(
'post_status'
,
'1'
)
->
orderby
(
'post_date'
,
'desc'
)
->
limit
(
'5'
)
->
get
();
$hot
=
Posts
::
where
(
'post_status'
,
'1'
)
->
orderby
(
'viewer'
,
'desc'
)
->
limit
(
'5'
)
->
get
();
$categories
=
Categories
::
where
(
'is_active'
,
'1'
)
->
get
();
$menu
=
Menu
::
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$data
=
[
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'resend'
=>
$resend
,
'hot'
=>
$hot
,
'categories'
=>
$categories
,
];
return
$data
;
}
public
function
getDataEn
(
$setting
)
{
$setting
=
webprofilesetting
();
$data
=
$data
=
Posts
::
where
(
'post_status'
,
'1'
)
->
orderBy
(
'post_date'
,
'desc'
)
->
paginate
(
$setting
[
'post_per_page'
]);
$resend
=
Posts
::
with
([
'rEn'
])
->
where
(
'post_status'
,
'1'
)
->
orderby
(
'post_date'
,
'desc'
)
->
limit
(
'5'
)
->
get
();
$hot
=
Posts
::
with
([
'rEn'
])
->
where
(
'post_status'
,
'1'
)
->
orderby
(
'viewer'
,
'desc'
)
->
limit
(
'5'
)
->
get
();
$categories
=
Categories
::
with
([
'rEn'
])
->
where
(
'is_active'
,
'1'
)
->
get
();
$menu
=
Menu
::
with
([
'rEn'
])
->
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$data
=
[
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'resend'
=>
$resend
,
'hot'
=>
$hot
,
'categories'
=>
$categories
,
];
return
$data
;
}
}
resources/views/webprofile/front/jollyany/archive.blade.php
0 → 100644
View file @
8d1ce446
@
extends
(
'webprofile.front.jollyany.master'
)
@
section
(
'content'
)
<
section
class
="
post
-
wrapper
-
top
jt
-
shadow
clearfix
">
<div class="
container
">
<div class="
col
-
lg
-
12
">
<h2>{!!
$title
!!}</h2>
</div>
</div>
</section><!-- end post-wrapper-top -->
<section class="
blog
-
wrapper
">
<div class="
container
">
<div class="
row
">
<div id="
content
" class="
col
-
lg
-
8
col
-
md
-
8
col
-
sm
-
12
col
-
xs
-
12
">
<div class="
row
">
<div class="
blog
-
masonry
">
<div class="
col
-
lg
-
12
">
<div class="
blog
-
carousel
">
<div class="">
<div class="
flexslider
">
@foreach(
$data
as
$value
)
@if (
$title
!= 'Agenda')
<div class="
row
">
<div class="
headline
">
<h2><a href="
{
!!
url
(
'post/'
.
$value
->
slug
)
!!
}
">{!!
$value->title
!!}</a></h2>
</div>
<div class="
news
-
text
">
<div class="
col
-
lg
-
4
">
<a href="
{
!!
url
(
'post/'
.
str_replace
(
' '
,
'-'
,
$value
->
title
))
!!
}
">
@if(
$value->thumbnail
)
@if (
$setting['external_storage']
== 1)
<img src="
{{
$setting
[
'url_static'
]
.
'/'
.
$setting
[
'directory'
]
.
'/thumbnail/'
.
$value
->
thumbnail
}}
" style="
max
-
width
:
200
px
" align="
left
" class="
img
-
responsive
">
@else
<img src="
{{
url
(
'/storage/thumbnail/'
.
$value
->
thumbnail
)
}}
" style="
max
-
width
:
200
px
" align="
left
" class="
img
-
responsive
">
@endif
@else
<img style="
max
-
width
:
200
px
" align="
left
" class="
img
-
responsive
" src="
https
://
www
.
unesa
.
ac
.
id
/
assets
/
switcher
/
images
/
logo
.
png
">
@endif
</a>
</div>
<strong>{!! InseoHelper::tglbulanindo2(
$value->post_date
) !!}</strong>
<p>{!! strip_tags(substr(html_entity_decode(
$value->content
,ENT_COMPAT,"
UTF
-
8
"),0 , 250)) !!}</p>
<br>
<a class="
pull
-
right
" style="
padding
-
right
:
20
px
;
" href="
{
!!
url
(
'post/'
.
$value
->
slug
)
!!
}
">Selengkapnya »»</a>
</div>
</div>
@else
<div class="
row
">
<div class="
headline
">
<h2><a target="
_blank
" href="
{
!!
url
(
'info/'
.
$value
->
slug
)
!!
}
">{!!
$value->title
!!}</a></h2>
</div>
<div class="
news
-
text
">
<strong> {!! InseoHelper::tglbulanindo2(
$value->event_date
) !!}</strong> —
{!! strip_tags(substr(html_entity_decode(
$value->content
,ENT_COMPAT,"
UTF
-
8
"),0 , 250)) !!}
<br><a target="
_blank
" href="
{
!!
url
(
'info/'
.
$value
->
slug
)
!!
}
">
Selengkapnya »»</a>
</div>
</div>
@endif
@endforeach
</div>
<div class="
clearfix
"></div>
<hr>
{!!
$data->render
() !!}
</div><!-- end post-slider -->
</div><!-- end entry -->
</div><!-- end blog-carousel -->
</div><!-- end blog-masonry -->
</div><!-- end widget -->
</div><!-- end left-sidebar -->
@include('webprofile.front.jollyany.widget')
</div>
</div><!-- end container -->
</section><!--end white-wrapper -->
@endsection
resources/views/webprofile/front/jollyany/en/archive.blade.php
0 → 100644
View file @
8d1ce446
@
extends
(
'webprofile.front.jollyany.master'
)
@
section
(
'content'
)
<
section
class
="
post
-
wrapper
-
top
jt
-
shadow
clearfix
">
<div class="
container
">
<div class="
col
-
lg
-
12
">
<h2>{!!
$title
!!}</h2>
</div>
</div>
</section><!-- end post-wrapper-top -->
<section class="
blog
-
wrapper
">
<div class="
container
">
<div class="
row
">
<div id="
content
" class="
col
-
lg
-
8
col
-
md
-
8
col
-
sm
-
12
col
-
xs
-
12
">
<div class="
row
">
<div class="
blog
-
masonry
">
<div class="
col
-
lg
-
12
">
<div class="
blog
-
carousel
">
<div class="">
<div class="
flexslider
">
@foreach(
$data
as
$value
)
@if (
$title
!= 'Agenda')
<div class="
row
">
<div class="
headline
">
<h2><a href="
{
!!
url
(
'post/'
.
$value
->
slug
)
!!
}
">{!!
$value->rEn
->title !!}</a></h2>
</div>
<div class="
news
-
text
">
<div class="
col
-
lg
-
4
">
<a href="
{
!!
url
(
'post/'
.
str_replace
(
' '
,
'-'
,
$value
->
title
))
!!
}
">
@if(
$value->thumbnail
)
@if (
$setting['external_storage']
== 1)
<img src="
{{
$setting
[
'url_static'
]
.
'/'
.
$setting
[
'directory'
]
.
'/thumbnail/'
.
$value
->
thumbnail
}}
" style="
max
-
width
:
200
px
" align="
left
" class="
img
-
responsive
">
@else
<img src="
{{
url
(
'/storage/thumbnail/'
.
$value
->
thumbnail
)
}}
" style="
max
-
width
:
200
px
" align="
left
" class="
img
-
responsive
">
@endif
@else
<img style="
max
-
width
:
200
px
" align="
left
" class="
img
-
responsive
" src="
https
://
www
.
unesa
.
ac
.
id
/
assets
/
switcher
/
images
/
logo
.
png
">
@endif
</a>
</div>
<strong>{!! InseoHelper::tglbulanindo2(
$value->post_date
) !!}</strong>
<p>{!! strip_tags(substr(html_entity_decode(
$value->rEn
->content,ENT_COMPAT,"
UTF
-
8
"),0 , 250)) !!}</p>
<br>
<a class="
pull
-
right
" style="
padding
-
right
:
20
px
;
" href="
{
!!
url
(
'post/'
.
$value
->
slug
)
!!
}
">Read more »»</a>
</div>
</div>
@else
<div class="
row
">
<div class="
headline
">
<h2><a target="
_blank
" href="
{
!!
url
(
'info/'
.
$value
->
slug
)
!!
}
">{!!
$value->rEn
->title !!}</a></h2>
</div>
<div class="
news
-
text
">
<strong> {!! InseoHelper::tglbulanindo2(
$value->event_date
) !!}</strong> —
{!! strip_tags(substr(html_entity_decode(
$value->content
,ENT_COMPAT,"
UTF
-
8
"),0 , 250)) !!}
<br><a target="
_blank
" href="
{
!!
url
(
'info/'
.
$value
->
slug
)
!!
}
">
Read more »»</a>
</div>
</div>
@endif
@endforeach
</div>
<div class="
clearfix
"></div>
<hr>
{!!
$data->render
() !!}
</div><!-- end post-slider -->
</div><!-- end entry -->
</div><!-- end blog-carousel -->
</div><!-- end blog-masonry -->
</div><!-- end widget -->
</div><!-- end left-sidebar -->
@include('webprofile.front.jollyany.en.widget')
</div>
</div><!-- end container -->
</section><!--end white-wrapper -->
@endsection
routes/webprofile/front.php
View file @
8d1ce446
...
@@ -3,7 +3,7 @@ Route::group(['namespace' => 'Webprofile\Front'], function () {
...
@@ -3,7 +3,7 @@ Route::group(['namespace' => 'Webprofile\Front'], function () {
Route
::
get
(
'/'
,
'FrontController@index'
);
Route
::
get
(
'/'
,
'FrontController@index'
);
Route
::
get
(
'page/{id}'
,
'PageController@index'
)
->
name
(
'page'
);
Route
::
get
(
'page/{id}'
,
'PageController@index'
)
->
name
(
'page'
);
Route
::
get
(
'post/{id}'
,
'PostController@index'
)
->
name
(
'post'
);
Route
::
get
(
'post/{id}'
,
'PostController@index'
)
->
name
(
'post'
);
Route
::
get
(
'archive'
,
'
FrontController@archive
'
)
->
name
(
'archive'
);
Route
::
get
(
'archive'
,
'
ArchiveController@index
'
)
->
name
(
'archive'
);
Route
::
get
(
'category/{id}'
,
'FrontController@category'
)
->
name
(
'category'
);
Route
::
get
(
'category/{id}'
,
'FrontController@category'
)
->
name
(
'category'
);
Route
::
get
(
'info/{id}'
,
'FrontController@info'
)
->
name
(
'infomation'
);
Route
::
get
(
'info/{id}'
,
'FrontController@info'
)
->
name
(
'infomation'
);
Route
::
get
(
'agenda'
,
'FrontController@agenda'
)
->
name
(
'agenda'
);
Route
::
get
(
'agenda'
,
'FrontController@agenda'
)
->
name
(
'agenda'
);
...
...
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