Merge pull request #197 from cachethq/component-groups
[WIP] Component Groups
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
@extends('layout.dashboard')
|
||||
|
||||
@section('content')
|
||||
<div class="header">
|
||||
<span class="uppercase">
|
||||
<i class="icons ion-ios-keypad"></i> {{ trans('cachet.dashboard.components') }}
|
||||
</span>
|
||||
> <small>Create a component group</small>
|
||||
</div>
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@if($group = Session::get('group'))
|
||||
<div class='alert alert-{{ $group->isValid() ? "success" : "danger" }}'>
|
||||
@if($group->isValid())
|
||||
<strong>Awesome.</strong> Component group created.
|
||||
@else
|
||||
<strong>Whoops.</strong> Something went wrong with the group. {{ $group->getErrors() }}
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form name='CreateComponentGroupForm' class='form-vertical' role='form' action='/dashboard/components/groups/add' method='POST'>
|
||||
<fieldset>
|
||||
<div class='form-group'>
|
||||
<label for='incident-name'>Name</label>
|
||||
<input type='text' class='form-control' name='group[name]' id='group-name' required />
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<button type="submit" class="btn btn-success">Submit</button>
|
||||
<a class="btn btn-default" href="{{ route('dashboard.components.groups') }}">Cancel</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
@@ -38,6 +38,15 @@
|
||||
<label>Description</label>
|
||||
<textarea name='component[description]' class='form-control' rows='5'></textarea>
|
||||
</div>
|
||||
<div class='form-group'>
|
||||
<label>Group</label>
|
||||
<select name='component[group_id]' class='form-control'>
|
||||
<option selected></option>
|
||||
@foreach($groups as $group)
|
||||
<option value='{{ $group->id }}'>{{ $group->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<hr />
|
||||
<div class='form-group'>
|
||||
<label>Link</label>
|
||||
|
||||
@@ -38,6 +38,15 @@
|
||||
<label>Description</label>
|
||||
<textarea name='component[description]' class='form-control' rows='5'>{{ $component->description }}</textarea>
|
||||
</div>
|
||||
<div class='form-group'>
|
||||
<label>Group</label>
|
||||
<select name='component[group_id]' class='form-control'>
|
||||
<option {{ $component->group_id === null ? "selected" : null }}></option>
|
||||
@foreach($groups as $group)
|
||||
<option value='{{ $group->id }}' {{ $component->group_id === $group->id ? "selected" : null }}>{{ $group->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<hr />
|
||||
<div class='form-group'>
|
||||
<label>Link</label>
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
@extends('layout.dashboard')
|
||||
|
||||
@section('content')
|
||||
<div class="header fixed">
|
||||
@if(isset($subMenu))
|
||||
@include('partials.dashboard.sub-sidebar')
|
||||
@endif
|
||||
<div class='content-panel'>
|
||||
<div class="header">
|
||||
<span class="uppercase">
|
||||
<i class="icons ion-ios-keypad"></i> {{ trans('cachet.dashboard.components') }}
|
||||
</span>
|
||||
@@ -40,4 +44,5 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
@extends('layout.dashboard')
|
||||
|
||||
@section('content')
|
||||
@if(isset($subMenu))
|
||||
@include('partials.dashboard.sub-sidebar')
|
||||
@endif
|
||||
<div class='content-panel'>
|
||||
<div class="header">
|
||||
<span class="uppercase">
|
||||
<i class="icons ion-ios-keypad"></i> {{ trans('cachet.dashboard.component-groups') }}
|
||||
</span>
|
||||
<a class="btn btn-sm btn-success pull-right" href="{{ route('dashboard.components.groups.add') }}">
|
||||
{{ trans('cachet.dashboard.component-groups-add') }}
|
||||
</a>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 striped-list">
|
||||
@forelse($groups as $group)
|
||||
<div class='row striped-list-item'>
|
||||
<div class='col-md-8'>
|
||||
<strong>{{ $group->name }}</strong>
|
||||
</div>
|
||||
<div class='col-md-4 text-right'>
|
||||
<a href='#' class='btn btn-default'>Edit</a>
|
||||
<a href='#' class='btn btn-danger'>Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
@empty
|
||||
<div class='list-group-item text-danger'>You should add a component.</div>
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
Reference in New Issue
Block a user