Browse Source

Update view files to use trans (lang) helper

pull/3/head
Nafies Luthfi 8 years ago
parent
commit
2bbdb0242c
  1. 1
      resources/lang/en/app.php
  2. 1
      resources/lang/id/app.php
  3. 10
      resources/views/users/chart.blade.php
  4. 8
      resources/views/users/partials/action-buttons.blade.php
  5. 4
      resources/views/users/partials/chart-sibling.blade.php
  6. 2
      resources/views/users/show.blade.php
  7. 6
      resources/views/users/tree.blade.php

1
resources/lang/en/app.php

@ -5,6 +5,7 @@ return [
'unknown' => 'Unknown',
'male' => 'Male',
'female' => 'Female',
'family_chart' => 'Family Chart',
'family_tree' => 'Family Tree',
'child_count' => 'Child Count',
'grand_child_count' => 'Grand Child Count',

1
resources/lang/id/app.php

@ -5,6 +5,7 @@ return [
'unknown' => 'Tidak diketahui',
'male' => 'Laki-laki',
'female' => 'Perempuan',
'family_chart' => 'Bagan Keluarga',
'family_tree' => 'Pohon Keluarga',
'child_count' => 'Jumlah Anak',
'grand_child_count' => 'Jumlah Cucu',

10
resources/views/users/chart.blade.php

@ -5,14 +5,14 @@
<div class="container-fluid">
<h1 class="page-header">
@include('users.partials.action-buttons')
{{ $user->name }} <small>Bagan Keluarga</small>
{{ $user->name }} <small>{{ trans('app.family_chart') }}</small>
</h1>
<div class="panel panel-default table-responsive">
<table class="table table-bordered table-striped">
<tbody>
<tr>
<th style="width: 9%">Kakek & Nenek</th>
<th style="width: 9%">{{ trans('user.grand_father') }} & {{ trans('user.grand_mother') }}</th>
<td class="text-center">
{{ $fatherGrandpa ? $fatherGrandpa->profileLink('chart') : '?' }}
</td>
@ -27,7 +27,7 @@
</td>
</tr>
<tr>
<th>Ayah & Ibu</th>
<th>{{ trans('user.father') }} & {{ trans('user.mother') }}</th>
<td class="text-center" colspan="2">
{{ $father ? $father->profileLink('chart') : '?' }}
</td>
@ -42,7 +42,7 @@
</td>
</tr>
<tr>
<th>Anak-Anak & Cucu-Cucu</th>
<th>{{ trans('user.childs') }} & {{ trans('user.grand_childs') }}</th>
<td colspan="4">
<?php $no = 0; ?>
@foreach($childs->chunk(4) as $chunkedChild)
@ -69,7 +69,7 @@
</div>
<h4 class="page-header">
Saudara, Keponakan, dan Cucu
{{ trans('user.siblings') }}, {{ trans('user.nieces') }}, & {{ trans('user.grand_childs') }}
</h4>
@foreach ($siblings->chunk(3) as $chunkedSiblings)
<div class="row">

8
resources/views/users/partials/action-buttons.blade.php

@ -1,8 +1,8 @@
<div class="pull-right btn-group" role="group">
@can ('edit', $user)
{{ link_to_route('users.edit', 'Edit Data', [$user->id], ['class' => 'btn btn-warning']) }}
{{ link_to_route('users.edit', trans('app.edit'), [$user->id], ['class' => 'btn btn-warning']) }}
@endcan
{{ link_to_route('users.show', 'Lihat Profil '.$user->name, [$user->id], ['class' => Request::segment(3) == null ? 'btn btn-default active' : 'btn btn-default']) }}
{{ link_to_route('users.chart', 'Lihat Bagan Keluarga', [$user->id], ['class' => Request::segment(3) == 'chart' ? 'btn btn-default active' : 'btn btn-default']) }}
{{ link_to_route('users.tree', 'Lihat Pohon Keluarga', [$user->id], ['class' => Request::segment(3) == 'tree' ? 'btn btn-default active' : 'btn btn-default']) }}
{{ link_to_route('users.show', trans('app.show_profile').' '.$user->name, [$user->id], ['class' => Request::segment(3) == null ? 'btn btn-default active' : 'btn btn-default']) }}
{{ link_to_route('users.chart', trans('app.show_family_chart'), [$user->id], ['class' => Request::segment(3) == 'chart' ? 'btn btn-default active' : 'btn btn-default']) }}
{{ link_to_route('users.tree', trans('app.show_family_tree'), [$user->id], ['class' => Request::segment(3) == 'tree' ? 'btn btn-default active' : 'btn btn-default']) }}
</div>

4
resources/views/users/partials/chart-sibling.blade.php

@ -2,11 +2,11 @@
<table class="table table-bordered table-striped">
<tbody>
<tr>
<th style="width: 35%">Saudara</th>
<th style="width: 35%">{{ trans('user.siblings') }}</th>
<th class="text-center" colspan="{{ $sibling->childs->count() }}">{{ $sibling->profileLink('chart') }} ({{ $sibling->gender }})</th>
</tr>
<tr>
<th>Keponakan & Cucu-Cucu</th>
<th>{{ trans('user.nieces') }} & {{ trans('user.grand_childs') }}</th>
<td>
<ol style="padding-left: 15px">
@foreach($sibling->childs as $child)

2
resources/views/users/show.blade.php

@ -3,7 +3,7 @@
@section('content')
<h1 class="page-header">
@include('users.partials.action-buttons', ['user' => $currentUser])
{{ $currentUser->name }} <small>Profil</small>
{{ $currentUser->name }} <small>{{ trans('app.profile') }}</small>
</h1>
<div class="row">
<div class="col-md-6">

6
resources/views/users/tree.blade.php

@ -5,7 +5,7 @@
<div class="container-fluid">
<h1 class="page-header">
@include('users.partials.action-buttons')
{{ $user->name }} <small>Pohon Keluarga</small>
{{ $user->name }} <small>{{ trans('app.family_tree') }}</small>
</h1>
<?php
$childsTotal = 0;
@ -74,11 +74,11 @@ $ggccTotal = 0;
<div class="row">
<div class="col-md-1">&nbsp;</div>
@if ($childsTotal)
<div class="col-md-1 text-right">Jumlah Anak</div>
<div class="col-md-1 text-right">{{ trans('app.child_count') }}</div>
<div class="col-md-1 text-left"><strong style="font-size:30px">{{ $childsTotal }}</strong></div>
@endif
@if ($grandChildsTotal)
<div class="col-md-1 text-right">Jumlah Cucu</div>
<div class="col-md-1 text-right">{{ trans('app.grand_child_count') }}</div>
<div class="col-md-1 text-left"><strong style="font-size:30px">{{ $grandChildsTotal }}</strong></div>
@endif
@if ($ggTotal)

Loading…
Cancel
Save