10 changed files with 98 additions and 28 deletions
-
2app/Entities/Projects/FeaturesRepository.php
-
20app/Http/Controllers/Projects/ProjectsController.php
-
2app/Http/Requests/Features/CreateRequest.php
-
2app/Http/routes/projects.php
-
3resources/lang/id/project.php
-
8resources/views/features/partials/feature-tasks.blade.php
-
2resources/views/projects/features-export-excel.blade.php
-
69resources/views/projects/features-export-html.blade.php
-
13resources/views/projects/features.blade.php
-
5resources/views/projects/partials/nav-tabs.blade.php
@ -0,0 +1,69 @@ |
|||
<?php |
|||
// $filename = str_slug(trans('project.features') . '-' . $project->name) . '.xls';
|
|||
// header("Content-Disposition: attachment; filename=\"$filename\"");
|
|||
// header("Content-Type: application/vnd.ms-excel");
|
|||
?>
|
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
{{-- <meta http-equiv="X-UA-Compatible" content="IE=edge"> --}} |
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
|||
<title>{{ $project->name }}</title> |
|||
{!! Html::style('assets/css/app.css') !!} |
|||
</head> |
|||
<body> |
|||
<div class="container"> |
|||
<h1 class="page-header text-center">{{ trans('project.features') }} {{ $project->name }}</h1> |
|||
|
|||
@foreach($features as $key => $feature) |
|||
<h2 class="feature-title">{{ $feature->name }}</h2> |
|||
<table class="table table-condensed table-bordered"> |
|||
<tbody> |
|||
<tr style="background-color: #FFCC00"><th colspan="2">{{ trans('app.description') }}</th></tr> |
|||
<tr><td colspan="2">{!! nl2br($feature->description) !!}</td></tr> |
|||
|
|||
@if ($feature->tasks->count()) |
|||
<tr><td colspan="2"> </td></tr> |
|||
<tr style="background-color: #FFCC00"> |
|||
<th class="col-md-3">Sub Fitur</th> |
|||
<th class="col-md-6">{{ trans('app.description') }}</th> |
|||
</tr> |
|||
@foreach($feature->tasks as $task) |
|||
<tr> |
|||
<td>{{ $task->name }}</td> |
|||
<td>{!! nl2br($task->description) !!}</td> |
|||
</tr> |
|||
@endforeach |
|||
@endif |
|||
</tbody> |
|||
</table> |
|||
@endforeach |
|||
|
|||
<h1 class="page-header text-center">Biaya Pembuatan</h1> |
|||
<table class="table table-condensed table-bordered"> |
|||
<tbody> |
|||
<tr> |
|||
<th class="text-center">{{ trans('app.table_no') }}</th> |
|||
<th>{{ trans('feature.name') }}</th> |
|||
<th class="text-center">{{ trans('feature.price') }}</th> |
|||
</tr> |
|||
@foreach($features as $key => $feature) |
|||
<tr> |
|||
<td class="text-center">{{ 1 + $key }}</td> |
|||
<td>{{ $feature->name }}</td> |
|||
<td class="text-right">{{ formatRp($feature->price) }}</td> |
|||
</tr> |
|||
@endforeach |
|||
</tbody> |
|||
<tfoot> |
|||
<tr> |
|||
<th class="text-right" colspan="2">Total</th> |
|||
<th class="text-right">{{ formatRp($features->sum('price')) }}</th> |
|||
</tr> |
|||
</tfoot> |
|||
</table> |
|||
</div> |
|||
|
|||
</body> |
|||
</html> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue