mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-22 16:04:10 -05:00
Make the 'new' button on the edit-list page optional
This commit is contained in:
parent
c031c6d18a
commit
61233c887e
2 changed files with 10 additions and 4 deletions
10
readme.md
10
readme.md
|
@ -50,6 +50,7 @@ First add a function to generate the page:
|
||||||
'column' => 'title',
|
'column' => 'title',
|
||||||
'sortcol' => false,
|
'sortcol' => false,
|
||||||
'delete' => true,
|
'delete' => true,
|
||||||
|
'create' => true,
|
||||||
'export' => true
|
'export' => true
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -68,7 +69,9 @@ First add a function to generate the page:
|
||||||
'rows' => News::getNewsList(),
|
'rows' => News::getNewsList(),
|
||||||
'column' => 'title',
|
'column' => 'title',
|
||||||
'sortcol' => 'order',
|
'sortcol' => 'order',
|
||||||
'delete' => false
|
'delete' => false,
|
||||||
|
'create' => true,
|
||||||
|
'export' => true
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -78,8 +81,9 @@ First add a function to generate the page:
|
||||||
* `rows`: A function returning an array containing the data to be shown on this page
|
* `rows`: A function returning an array containing the data to be shown on this page
|
||||||
* `column`: The column name in the array that contains the data to display in each row
|
* `column`: The column name in the array that contains the data to display in each row
|
||||||
* `sortcol`: The name of the column containing the sort order or `false` to disable
|
* `sortcol`: The name of the column containing the sort order or `false` to disable
|
||||||
* `delete`: A delete button will appear in the list if this is set to `true`
|
* `delete`: A `delete` button will appear in the list if this is set to `true`
|
||||||
* `export`: An export button will appear in the heading if this is set to `true`
|
* `create`: A `new` button will appear in the heading if this is set to `true`
|
||||||
|
* `export`: An `export` button will appear in the heading if this is set to `true`
|
||||||
|
|
||||||
#### Editable Item
|
#### Editable Item
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,9 @@
|
||||||
<a href="/dashboard/export/{{ $model }}"><button type="button" class="btn btn-default">Export</button></a>
|
<a href="/dashboard/export/{{ $model }}"><button type="button" class="btn btn-default">Export</button></a>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
@if($create == true)
|
||||||
<button type="button" class="new-button btn btn-default">New</button>
|
<button type="button" class="new-button btn btn-default">New</button>
|
||||||
|
@endif
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('dashboard-body')
|
@section('dashboard-body')
|
||||||
|
|
Loading…
Reference in a new issue