Skip to content

Commit

Permalink
修复管理员页面无法查看权限问题;修复表单block布局失效问题
Browse files Browse the repository at this point in the history
  • Loading branch information
jqhph committed Nov 16, 2020
1 parent 9fda1e0 commit e3a9f49
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 18 deletions.
8 changes: 3 additions & 5 deletions resources/views/grid/displayer/dialogtree.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
<i class='feather icon-align-right'></i> {{ trans('admin.view') }}
</a>

<template>
<template id="dialog-tree-tpl">
<div class="jstree-wrapper p-1" style="border:0"><div class="da-tree" style="margin-top:10px"></div></div>
</template>
<template id="dialog-tree-tpl">
<div class="jstree-wrapper p-1" style="border:0"><div class="da-tree" style="margin-top:10px"></div></div>
</template>

<script require="jstree" once>
<script require="@jstree" once>
window.resolveDialogTree = function (options) {
var tpl = $('#dialog-tree-tpl').html(),
t = $(this),
Expand Down
4 changes: 1 addition & 3 deletions src/Form/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,7 @@ protected function formatLabel($arguments = [])

$column = is_array($this->column) ? current($this->column) : $this->column;

$label = admin_trans_field($column);

return str_replace('_', ' ', $label);
return str_replace('_', ' ', admin_trans_field($column));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Form/Layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public function form(\Closure $callback = null)

$form->disableResetButton();
$form->disableSubmitButton();
$form->disableFormTag();
$form->useFormTag(false);
$form->ajax(false);

if ($callback) {
Expand Down
12 changes: 3 additions & 9 deletions src/Grid/Column.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ class Column
use Grid\Column\HasHeader;
use Grid\Column\HasDisplayers;
use Macroable {
__call as __macroCall;
}
__call as __macroCall;
}

const SELECT_COLUMN_NAME = '__row_selector__';
const ACTION_COLUMN_NAME = '__actions__';
Expand Down Expand Up @@ -410,13 +410,7 @@ public function getValue()
*/
protected function formatLabel($label)
{
if ($label) {
return $label;
}

$label = admin_trans_field($this->name);

return str_replace('_', ' ', $label);
return $label ?: str_replace('_', ' ', admin_trans_field($this->name));
}

/**
Expand Down

0 comments on commit e3a9f49

Please sign in to comment.