mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-22 07:54:11 -05:00
Allow edit-list title-columns to be specified as arrays for multiple items and use monospaced fonts so the same number of characters will take the same amount of space
This commit is contained in:
parent
5336c21a93
commit
6ec9531074
3 changed files with 18 additions and 2 deletions
|
@ -79,7 +79,7 @@ First add a function to generate the page:
|
|||
* `heading`: The title that will appear for this page
|
||||
* `model`: The model that will be accessed 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 (an array can be used to specify multiple columns)
|
||||
* `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`
|
||||
* `create`: A `new` button will appear in the heading if this is set to `true`
|
||||
|
|
6
resources/assets/sass/dashboard.scss
vendored
6
resources/assets/sass/dashboard.scss
vendored
|
@ -249,6 +249,12 @@ body {
|
|||
padding-top: 6px;
|
||||
padding-bottom: 6px;
|
||||
padding-left: 0px;
|
||||
font-family: "Lucida Console", Monaco, monospace;
|
||||
|
||||
.column {
|
||||
float: left;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.button-column {
|
||||
|
|
|
@ -23,7 +23,17 @@
|
|||
<i class="fa fa-bars sort-icon" title="Click and drag to reorder"></i>
|
||||
@endif
|
||||
|
||||
{{ $row[$column] }}
|
||||
@if(is_array($column))
|
||||
@foreach($column as $col)
|
||||
<div class="column">{{ $row[$col] }}</div>
|
||||
|
||||
@if(!$loop->last)
|
||||
<div class="column">|</div>
|
||||
@endif
|
||||
@endforeach
|
||||
@else
|
||||
{{ $row[$column] }}
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="col-xs-3 button-column">
|
||||
|
|
Loading…
Reference in a new issue