mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-12-22 17:50:22 -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',
|
||||
'sortcol' => false,
|
||||
'delete' => true,
|
||||
'create' => true,
|
||||
'export' => true
|
||||
]);
|
||||
}
|
||||
|
@ -68,7 +69,9 @@ First add a function to generate the page:
|
|||
'rows' => News::getNewsList(),
|
||||
'column' => 'title',
|
||||
'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
|
||||
* `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
|
||||
* `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`
|
||||
* `delete`: A `delete` button will appear in the list 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
|
||||
|
||||
|
|
|
@ -5,7 +5,9 @@
|
|||
<a href="/dashboard/export/{{ $model }}"><button type="button" class="btn btn-default">Export</button></a>
|
||||
@endif
|
||||
|
||||
<button type="button" class="new-button btn btn-default">New</button>
|
||||
@if($create == true)
|
||||
<button type="button" class="new-button btn btn-default">New</button>
|
||||
@endif
|
||||
@endsection
|
||||
|
||||
@section('dashboard-body')
|
||||
|
|
Loading…
Reference in a new issue