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
825e3be2
Commit
825e3be2
authored
Jan 13, 2020
by
Aan Choesni Herlingga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement auto translate
parent
d0939915
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
45 additions
and
12 deletions
+45
-12
app/Http/Controllers/Webprofile/Backend/InformationController.php
+1
-1
app/Http/Controllers/Webprofile/Backend/PageController.php
+1
-1
app/Http/Controllers/Webprofile/Backend/PostController.php
+1
-1
app/Repositories/Webprofile/En/InformationRepository.php
+8
-0
app/Repositories/Webprofile/En/PagesRepository.php
+8
-1
app/Repositories/Webprofile/En/PostRepository.php
+13
-2
app/Repositories/Webprofile/InformationRepository.php
+2
-0
app/Repositories/Webprofile/PagesRepository.php
+3
-0
app/Repositories/Webprofile/PostRepository.php
+2
-0
resources/views/webprofile/backend/informations/edit.blade.php
+2
-2
resources/views/webprofile/backend/pages/edit.blade.php
+2
-2
resources/views/webprofile/backend/posts/edit.blade.php
+2
-2
No files found.
app/Http/Controllers/Webprofile/Backend/InformationController.php
View file @
825e3be2
...
...
@@ -147,7 +147,7 @@ class InformationController extends Controller
$dataEn
[
'title'
]
=
$data
[
'title_en'
];
$dataEn
[
'content'
]
=
$data
[
'content_en'
];
$this
->
repoEn
->
update
(
$dataEn
,
$information
->
rEn
);
$this
->
repoEn
->
update
(
$dataEn
,
$information
);
}
/**
...
...
app/Http/Controllers/Webprofile/Backend/PageController.php
View file @
825e3be2
...
...
@@ -143,7 +143,7 @@ class PageController extends Controller
$dataEn
[
'title'
]
=
$data
[
'title_en'
];
$dataEn
[
'content'
]
=
$data
[
'content_en'
];
$this
->
repoEn
->
update
(
$dataEn
,
$page
->
rEn
);
$this
->
repoEn
->
update
(
$dataEn
,
$page
);
}
/**
...
...
app/Http/Controllers/Webprofile/Backend/PostController.php
View file @
825e3be2
...
...
@@ -150,7 +150,7 @@ class PostController extends Controller
$dataEn
[
'title'
]
=
$data
[
'title_en'
];
$dataEn
[
'content'
]
=
$data
[
'content_en'
];
$this
->
repoEn
->
update
(
$dataEn
,
$post
->
rEn
);
$this
->
repoEn
->
update
(
$dataEn
,
$post
);
}
/**
...
...
app/Repositories/Webprofile/En/InformationRepository.php
View file @
825e3be2
...
...
@@ -16,7 +16,15 @@ class InformationRepository extends Repository
public
function
get
()
{
}
public
function
paginate
()
{
}
public
function
update
(
$data
,
$information
)
{
return
$this
->
model
->
updateOrCreate
([
'information_id'
=>
$information
->
id
,
],
$data
);
}
}
app/Repositories/Webprofile/En/PagesRepository.php
View file @
825e3be2
...
...
@@ -4,7 +4,6 @@ namespace App\Repositories\Webprofile\En;
use
App\Models\Webprofile\En\Pages
;
use
App\Repositories\Repository
;
use
Illuminate\Database\Eloquent\Model
;
class
PagesRepository
extends
Repository
{
...
...
@@ -16,7 +15,15 @@ class PagesRepository extends Repository
public
function
get
()
{
}
public
function
paginate
()
{
}
public
function
update
(
$data
,
$page
)
{
return
$this
->
model
->
updateOrCreate
([
'page_id'
=>
$page
->
id
,
],
$data
);
}
}
app/Repositories/Webprofile/En/PostRepository.php
View file @
825e3be2
...
...
@@ -12,6 +12,17 @@ class PostRepository extends Repository
$this
->
model
=
$model
;
}
public
function
get
(){}
public
function
paginate
(){}
public
function
get
()
{
}
public
function
paginate
()
{
}
public
function
update
(
$data
,
$post
)
{
return
$this
->
model
->
updateOrCreate
([
'post_id'
=>
$post
->
id
,
],
$data
);
}
}
app/Repositories/Webprofile/InformationRepository.php
View file @
825e3be2
...
...
@@ -58,7 +58,9 @@ class InformationRepository extends Repository
})
->
addColumn
(
'title'
,
function
(
$row
)
{
$str
=
$row
->
title
.
'<br>'
;
if
(
$row
->
rEn
)
{
$str
.=
'<i style="color: blue;">'
.
$row
->
rEn
->
title
.
'</i>'
;
}
return
$str
;
})
...
...
app/Repositories/Webprofile/PagesRepository.php
View file @
825e3be2
...
...
@@ -51,7 +51,10 @@ class PagesRepository extends Repository
})
->
addColumn
(
'title'
,
function
(
$row
)
{
$str
=
$row
->
title
.
'<br>'
;
if
(
$row
->
rEn
)
{
$str
.=
'<i style="color: blue;">'
.
$row
->
rEn
->
title
.
'</i>'
;
}
return
$str
;
})
...
...
app/Repositories/Webprofile/PostRepository.php
View file @
825e3be2
...
...
@@ -91,7 +91,9 @@ class PostRepository extends Repository
})
->
addColumn
(
'title'
,
function
(
$row
)
{
$str
=
$row
->
title
.
'<br>'
;
if
(
$row
->
rEn
)
{
$str
.=
'<i style="color: blue;">'
.
$row
->
rEn
[
'title'
]
.
'</i>'
;
}
return
$str
;
})
...
...
resources/views/webprofile/backend/informations/edit.blade.php
View file @
825e3be2
...
...
@@ -57,7 +57,7 @@
<div class="
form
-
group
@
if
(
$errors
->
has
(
'title'
))
has
-
error
@
endif
">
<div class="
col
-
md
-
12
">
@if(
$data->rEn
)
{{ Form::text('title_en',
$data->rEn
->title
, array('class' => 'form-control', 'placeholder'=>trans('label.title'), 'style'=>'font-size: 14pt;')) }}
{{ Form::text('title_en',
$data->rEn
?
$data->rEn
->title : null
, array('class' => 'form-control', 'placeholder'=>trans('label.title'), 'style'=>'font-size: 14pt;')) }}
@else
{{ Form::text('title_en', null, array('class' => 'form-control', 'placeholder'=>trans('label.title'), 'style'=>'font-size: 14pt;')) }}
@endif
...
...
@@ -70,7 +70,7 @@
<div class="
col
-
md
-
12
">
<div class="
block
">
@if (
$data->rEn
)
{{ Form::textarea('content_en',
$data->rEn
->content
, array('id'=>'content_en')) }}
{{ Form::textarea('content_en',
$data->rEn
?
$data->rEn
->content : null
, array('id'=>'content_en')) }}
@else
{{ Form::textarea('content_en', null, array('id'=>'content_en')) }}
@endif
...
...
resources/views/webprofile/backend/pages/edit.blade.php
View file @
825e3be2
...
...
@@ -57,7 +57,7 @@
<div class="
form
-
group
@
if
(
$errors
->
has
(
'title'
))
has
-
error
@
endif
">
<div class="
col
-
md
-
12
">
@if(
$data->rEn
)
{{ Form::text('title_en',
$data->rEn
->title
, array('class' => 'form-control', 'placeholder'=>trans('label.title'), 'style'=>'font-size: 14pt;')) }}
{{ Form::text('title_en',
$data->rEn
?
$data->rEn
->title : null
, array('class' => 'form-control', 'placeholder'=>trans('label.title'), 'style'=>'font-size: 14pt;')) }}
@else
{{ Form::text('title_en', null, array('class' => 'form-control', 'placeholder'=>trans('label.title'), 'style'=>'font-size: 14pt;')) }}
@endif
...
...
@@ -70,7 +70,7 @@
<div class="
col
-
md
-
12
">
<div class="
block
">
@if (
$data->rEn
)
{{ Form::textarea('content_en',
$data->rEn
->content
, array('id'=>'content_en')) }}
{{ Form::textarea('content_en',
$data->rEn
?
$data->rEn
->content : null
, array('id'=>'content_en')) }}
@else
{{ Form::textarea('content_en', null, array('id'=>'content_en')) }}
@endif
...
...
resources/views/webprofile/backend/posts/edit.blade.php
View file @
825e3be2
...
...
@@ -66,7 +66,7 @@
<div class="
col
-
md
-
12
">
<div class="
form
-
group
@
if
(
$errors
->
has
(
'title'
))
has
-
error
@
endif
">
<div class="
col
-
md
-
12
">
{{ Form::text('title_en',
$data->rEn
->title
, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;')) }}
{{ Form::text('title_en',
$data->rEn
?
$data->rEn
->title : null
, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;')) }}
@if (
$errors->has
('title'))
<label id="
login
-
error
" class="
error
" for="
login
">
{
{$errors->first('title')}
}
</label>
@endif
...
...
@@ -75,7 +75,7 @@
</div>
<div class="
col
-
md
-
12
">
<div class="
block
">
{{ Form::textarea('content_en',
$data->rEn
->content
, array('id'=>'content_en')) }}
{{ Form::textarea('content_en',
$data->rEn
?
$data->rEn
->content : null
, array('id'=>'content_en')) }}
</div>
</div>
</div>
...
...
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