Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jqhph committed Apr 16, 2020
1 parent 0ba9f2a commit c4537d2
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
4 changes: 2 additions & 2 deletions resources/views/dashboard/title.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
<h1 class="mb-3 mt-2 text-primary-darker">Dcat Admin</h1>
<div class="links">
<a href="https://github.com/jqhph/dcat-admin" target="_blank">Github</a>
<a href="https://jqhph.github.io/dcat-admin/docs.html" id="doc-link" target="_blank">{{ __('admin.documentation') }}</a>
<a href="https://jqhph.github.io/dcat-admin/docs/master/extensions.html" id="demo-link" target="_blank">{{ __('admin.extensions') }}</a>
<a href="http://www.dcatadmin.com/" id="doc-link" target="_blank">{{ __('admin.documentation') }}</a>
<a href="http://www.dcatadmin.com/" id="demo-link" target="_blank">{{ __('admin.extensions') }}</a>
<a href="https://jqhph.github.io/dcat-admin/demo.html" id="demo-link" target="_blank">{{ __('admin.demo') }}</a>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Admin
*
* @var string
*/
const VERSION = '0.9.0';
const VERSION = '1.0.0';

/**
* @var array
Expand Down
2 changes: 1 addition & 1 deletion src/Grid/Tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public function disableRefreshButton(bool $disable = true)
{
$this->tools = $this->tools->map(function ($tool) use ($disable) {
if ($tool instanceof RefreshButton) {
return $tool->disable($disable);
return $tool->display(! $disable);
}

return $tool;
Expand Down
13 changes: 13 additions & 0 deletions src/Grid/Tools/RefreshButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,26 @@

class RefreshButton implements Renderable
{
protected $display = true;

public function display($value)
{
$this->display = $value;

return $this;
}

/**
* Render refresh button of grid.
*
* @return string
*/
public function render()
{
if (! $this->display) {
return;
}

$refresh = trans('admin.refresh');

return <<<EOT
Expand Down

0 comments on commit c4537d2

Please sign in to comment.