diff --git a/readme.md b/readme.md index 44e494a..62818c5 100644 --- a/readme.md +++ b/readme.md @@ -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` diff --git a/resources/assets/sass/dashboard.scss b/resources/assets/sass/dashboard.scss index e95db6e..1f3838d 100644 --- a/resources/assets/sass/dashboard.scss +++ b/resources/assets/sass/dashboard.scss @@ -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 { diff --git a/resources/views/dashboard/edit-list.blade.php b/resources/views/dashboard/edit-list.blade.php index 2d9d1a7..1a1bc3a 100644 --- a/resources/views/dashboard/edit-list.blade.php +++ b/resources/views/dashboard/edit-list.blade.php @@ -23,7 +23,17 @@ @endif - {{ $row[$column] }} + @if(is_array($column)) + @foreach($column as $col) +
{{ $row[$col] }}
+ + @if(!$loop->last) +
|
+ @endif + @endforeach + @else + {{ $row[$column] }} + @endif