Browse Source

Add project features sort button to sort features priorities

pull/1/head
Nafies Luthfi 8 years ago
parent
commit
9e38399fe2
  1. 1
      resources/lang/id/project.php
  2. 20
      resources/views/projects/features.blade.php

1
resources/lang/id/project.php

@ -28,6 +28,7 @@ return [
'features_export_html' => 'Export HTML', 'features_export_html' => 'Export HTML',
'features_export_excel' => 'Export Excel', 'features_export_excel' => 'Export Excel',
'features_export_progress_excel' => 'Export Progress', 'features_export_progress_excel' => 'Export Progress',
'sort_features' => 'Urutkan Prioritas Fitur',
// Attributes // Attributes
'name' => 'Nama Project', 'name' => 'Nama Project',

20
resources/views/projects/features.blade.php

@ -17,12 +17,18 @@
@foreach($features->groupBy('type_id') as $key => $groupedFeatures) @foreach($features->groupBy('type_id') as $key => $groupedFeatures)
<div class="panel panel-default table-responsive">
<div id="project-features" class="panel panel-default table-responsive">
<div class="panel-heading"> <div class="panel-heading">
<div class="pull-right"> <div class="pull-right">
@if (request('action') == 'sort_features')
{{ link_to_route('projects.features', trans('app.done'), [$project->id], ['class' => 'btn btn-default btn-xs pull-right', 'style' => 'margin-top: -2px; margin-left: 6px; margin-right: -8px']) }}
@else
{{ link_to_route('projects.features', trans('project.sort_features'), [$project->id, 'action' => 'sort_features', '#project-features'], ['class' => 'btn btn-default btn-xs pull-right', 'style' => 'margin-top: -2px; margin-left: 6px; margin-right: -8px']) }}
{!! link_to_route('projects.features-export', trans('project.features_export_html'), [$project->id, 'html', 'feature_type' => $key], ['class' => '','target' => '_blank']) !!} | {!! link_to_route('projects.features-export', trans('project.features_export_html'), [$project->id, 'html', 'feature_type' => $key], ['class' => '','target' => '_blank']) !!} |
{!! link_to_route('projects.features-export', trans('project.features_export_excel'), [$project->id, 'excel', 'feature_type' => $key], ['class' => '']) !!} | {!! link_to_route('projects.features-export', trans('project.features_export_excel'), [$project->id, 'excel', 'feature_type' => $key], ['class' => '']) !!} |
{!! link_to_route('projects.features-export', trans('project.features_export_progress_excel'), [$project->id, 'excel-progress', 'feature_type' => $key], ['class' => '']) !!} {!! link_to_route('projects.features-export', trans('project.features_export_progress_excel'), [$project->id, 'excel-progress', 'feature_type' => $key], ['class' => '']) !!}
@endif
</div> </div>
<h3 class="panel-title"> <h3 class="panel-title">
{{ $key == 1 ? 'Daftar Fitur' : 'Fitur Tambahan' }} {{ $key == 1 ? 'Daftar Fitur' : 'Fitur Tambahan' }}
@ -78,7 +84,13 @@
<span title="Overal Progress" style="font-weight:300">({{ formatDecimal($project->getFeatureOveralProgress()) }} %)</span> <span title="Overal Progress" style="font-weight:300">({{ formatDecimal($project->getFeatureOveralProgress()) }} %)</span>
</th> </th>
<th class="text-right">{{ formatRp($groupedFeatures->sum('price')) }}</th> <th class="text-right">{{ formatRp($groupedFeatures->sum('price')) }}</th>
<th colspan="2"></th>
<th colspan="2">
@if (request('action') == 'sort_features')
{{ link_to_route('projects.features', trans('app.done'), [$project->id], ['class' => 'btn btn-default btn-xs pull-right']) }}
@else
{{ link_to_route('projects.features', trans('project.sort_features'), [$project->id, 'action' => 'sort_features', '#project-features'], ['class' => 'btn btn-default btn-xs pull-right']) }}
@endif
</th>
</tr> </tr>
</tfoot> </tfoot>
</table> </table>
@ -87,6 +99,8 @@
@endsection @endsection
@if (request('action') == 'sort_features')
@section('ext_js') @section('ext_js')
{!! Html::script(url('assets/js/plugins/jquery-ui.min.js')) !!} {!! Html::script(url('assets/js/plugins/jquery-ui.min.js')) !!}
@endsection @endsection
@ -104,3 +118,5 @@
})(); })();
</script> </script>
@endsection @endsection
@endif
Loading…
Cancel
Save