Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX Make update button primary, add icon (SS 4.2+) for explore addons, reorder buttons #84

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Forms/GridFieldRefreshButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function getHTMLFragments($gridField)
null
);

$button->addExtraClass('btn btn-secondary font-icon-sync');
$button->addExtraClass('btn btn-primary font-icon-sync');

$button->setAttribute('data-check', $gridField->Link('check'));
$button->setAttribute(
Expand Down
29 changes: 17 additions & 12 deletions src/Reports/SiteSummary.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,23 @@

namespace BringYourOwnIdeas\Maintenance\Reports;

use BringYourOwnIdeas\Maintenance\Forms\GridFieldDropdownFilter;
use BringYourOwnIdeas\Maintenance\Forms\GridFieldHtmlFragment;
use BringYourOwnIdeas\Maintenance\Forms\GridFieldLinkButton;
use BringYourOwnIdeas\Maintenance\Forms\GridFieldRefreshButton;
use BringYourOwnIdeas\Maintenance\Model\Package;
use SilverStripe\Core\Config\Config;
use BringYourOwnIdeas\Maintenance\Tasks\UpdatePackageInfoTask;
use SilverStripe\Core\Config\Config;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\Forms\GridField\GridFieldConfig;
use SilverStripe\View\Requirements;
use SilverStripe\Forms\GridField\GridFieldExportButton;
use SilverStripe\View\ArrayData;
use SilverStripe\Core\Injector\Injector;
use BringYourOwnIdeas\Maintenance\Forms\GridFieldDropdownFilter;
use BringYourOwnIdeas\Maintenance\Forms\GridFieldRefreshButton;
use BringYourOwnIdeas\Maintenance\Forms\GridFieldLinkButton;
use BringYourOwnIdeas\Maintenance\Forms\GridFieldHtmlFragment;
use SilverStripe\Forms\GridField\GridFieldPaginator;
use SilverStripe\Forms\GridField\GridFieldPrintButton;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\Reports\Report;
use SilverStripe\View\ArrayData;
use SilverStripe\View\Requirements;

/**
* A report listing all installed modules used in this site (from a cache).
Expand Down Expand Up @@ -98,14 +99,18 @@ public function getReportField()
'buttons-before-left'
),
$this->getDropdownFilter(),
$this->getInfoLink(),
Injector::inst()->create(GridFieldHtmlFragment::class, 'header', $versionHtml)
);

// Re-order the paginator to ensure it counts correctly.
// Re-order the paginator to ensure it counts correctly, and reorder the buttons
$paginator = $config->getComponentByType(GridFieldPaginator::class);
$config->removeComponent($paginator);
$config->addComponent($paginator);
$config->removeComponent($paginator)->addComponent($paginator);

$exportButton = $config->getComponentByType(GridFieldExportButton::class);
$config->removeComponent($exportButton)->addComponent($exportButton);

$printButton = $config->getComponentByType(GridFieldPrintButton::class);
$config->removeComponentsByType($printButton)->addComponent($printButton);

return $grid;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<a class="gridfield-button-link btn btn-secondary"
href="$Link.ATT" target="_blank">
<a class="gridfield-button-link btn btn-secondary font-icon-explore-addons" href="$Link.ATT" target="_blank">
$Caption.XML
</a>