Iconography and language improvements for bulk plugin management

This commit is contained in:
Luke Towers 2018-02-01 20:07:33 -06:00
parent cc81ab25fa
commit 61914666f8
3 changed files with 46 additions and 42 deletions

View File

@ -829,6 +829,7 @@ class Updates extends Controller
$manager->enablePlugin($plugin->code, true);
Flash::success(Lang::get('system::lang.plugins.enable_success'));
break;
}
$plugin->save();

View File

@ -8,68 +8,73 @@
<button
data-primary-button
type="button"
class="btn btn-default"
class="btn btn-default oc-icon-caret-down dropdown-toggle"
data-toggle="dropdown"
data-trigger-action="enable"
data-trigger=".control-list .list-checkbox input[type=checkbox]"
data-trigger-condition="checked"
data-request-success="$(this).prop('disabled', true).next().prop('disabled', true)"
data-stripe-load-indicator>
data-request-success="$(this).prop('disabled', true).next().prop('disabled', true)">
<?= e(trans('system::lang.plugins.select_label')) ?>
</button>
<button
type="button"
class="btn btn-default dropdown-toggle"
data-trigger-action="enable"
data-trigger=".control-list .list-checkbox input[type=checkbox]"
data-trigger-condition="checked"
data-toggle="dropdown">
<span class="caret"></span>
</button>
<ul class="dropdown-menu" data-dropdown-title="<?= e(trans('rainlab.user::lang.users.bulk_actions')) ?>">
<li>
<a href="javascript:;" class="oc-icon-snowflake-o"
<a href="javascript:;" class="oc-icon-ban"
data-request="onBulkAction"
data-request-data="action: 'freeze', checked: $('.control-list').listWidget('getChecked')"
data-request-update="list_manage_toolbar: '#plugin-toolbar'"
data-request-confirm="<?= e(trans('system::lang.plugins.action_confirm', ['action' => e(trans('system::lang.plugins.freeze'))])) ?>">
data-request-confirm="<?= e(trans('system::lang.plugins.action_confirm', ['action' => e(trans('system::lang.plugins.freeze'))])) ?>"
data-stripe-load-indicator>
<?= e(trans('system::lang.plugins.freeze_label')) ?>
</a>
</li>
<li>
<a href="javascript:;" class="oc-icon-snowflake-o"
<a href="javascript:;" class="oc-icon-check"
data-request="onBulkAction"
data-request-data="action: 'unfreeze', checked: $('.control-list').listWidget('getChecked')"
data-request-update="list_manage_toolbar: '#plugin-toolbar'"
data-request-confirm="<?= e(trans('system::lang.plugins.action_confirm', ['action' => e(trans('system::lang.plugins.unfreeze'))])) ?>">
data-request-confirm="<?= e(trans('system::lang.plugins.action_confirm', ['action' => e(trans('system::lang.plugins.unfreeze'))])) ?>"
data-stripe-load-indicator>
<?= e(trans('system::lang.plugins.unfreeze_label')) ?>
</a>
</li>
<li role="separator" class="divider"></li>
<li>
<a href="javascript:;" class="oc-icon-power-off"
<a href="javascript:;" class="oc-icon-pause"
data-request="onBulkAction"
data-request-data="action: 'disable', checked: $('.control-list').listWidget('getChecked')"
data-request-update="list_manage_toolbar: '#plugin-toolbar'"
data-request-confirm="<?= e(trans('system::lang.plugins.action_confirm', ['action' => e(trans('system::lang.plugins.disable'))])) ?>">
data-request-confirm="<?= e(trans('system::lang.plugins.action_confirm', ['action' => e(trans('system::lang.plugins.disable'))])) ?>"
data-stripe-load-indicator>
<?= e(trans('system::lang.plugins.disable_label')) ?>
</a>
</li>
<li>
<a href="javascript:;" class="oc-icon-power-off"
<a href="javascript:;" class="oc-icon-play"
data-request="onBulkAction"
data-request-data="action: 'enable', checked: $('.control-list').listWidget('getChecked')"
data-request-update="list_manage_toolbar: '#plugin-toolbar'"
data-request-confirm="<?= e(trans('system::lang.plugins.action_confirm', ['action' => e(trans('system::lang.plugins.enable'))])) ?>">
data-request-confirm="<?= e(trans('system::lang.plugins.action_confirm', ['action' => e(trans('system::lang.plugins.enable'))])) ?>"
data-stripe-load-indicator>
<?= e(trans('system::lang.plugins.enable_label')) ?>
</a>
</li>
<li role="separator" class="divider"></li>
<li>
<a href="javascript:;" class="oc-icon-bomb"
data-request="onBulkAction"
data-request-data="action: 'refresh', checked: $('.control-list').listWidget('getChecked')"
data-request-update="list_manage_toolbar: '#plugin-toolbar'"
data-request-confirm="<?= e(trans('system::lang.plugins.refresh_confirm')) ?>"
data-stripe-load-indicator>
<?= e(trans('system::lang.plugins.refresh_label')) ?>
</a>
</li>
</ul>
</div>
<div class="btn-group">
<button
class="btn btn-default oc-icon-trash-o"
class="btn btn-danger oc-icon-trash-o"
disabled="disabled"
data-request="onRemovePlugins"
data-request-data="checked: $('.control-list').listWidget('getChecked')"

View File

@ -99,39 +99,37 @@ return [
],
'plugins' => [
'manage' => 'Manage plugins',
'enable' => 'enable',
'disable' => 'disable',
'freeze' => 'freeze',
'unfreeze' => 'unfreeze',
'install' => 'Install plugins',
'install_products' => 'Install products',
'search' => 'search plugins to install...',
'installed' => 'Installed plugins',
'no_plugins' => 'There are no plugins installed from the marketplace.',
'recommended' => 'Recommended',
'remove_label' => 'Remove Plugins',
'remove' => 'remove',
'refresh' => 'Refresh',
'plugin_label' => 'Plugin',
'enable_label' => 'Enable Plugins',
'disable_label' => 'Disable Plugins',
'freeze_label' => 'Freeze Updates',
'unfreeze_label' => 'Unfreeze Updates',
'selected_amount' => 'Plugins selected: :amount',
'unknown_plugin' => 'Plugin has been removed from the file system.',
'select_label' => 'Select Action...',
'check_yes' => 'Yes',
'check_no' => 'No',
'remove_confirm' => 'Are you sure you want to remove this plugin?',
'remove_success' => 'Successfully removed those plugins from the system.',
'refresh_confirm' => 'Are you sure?',
'refresh_success' => 'Successfully refreshed those plugins in the system.',
'freeze' => 'disable updates for',
'unfreeze' => 'enable updates for',
'enable' => 'enable',
'disable' => 'disable',
'refresh' => 'reset',
'remove' => 'Remove',
'freeze_label' => 'Disable Updates',
'unfreeze_label' => 'Enable Updates',
'enable_label' => 'Enable Plugins',
'disable_label' => 'Disable Plugins',
'refresh_label' => 'Reset Plugins',
'action_confirm' => 'Are you sure you want to :action these plugins?',
'disable_confirm' => 'Are you sure?',
'disable_success' => 'Successfully disabled the selected plugins.',
'freeze_success' => 'Successfully disabled updates for the selected plugins.',
'unfreeze_success' => 'Successfully enabled updates for the selected plugins.',
'enable_success' => 'Successfully enabled the selected plugins.',
'freeze_success' => 'Successfully froze the selected plugins.',
'unfreeze_success' => 'Successfully unfroze the selected plugins.',
'unknown_plugin' => 'Plugin has been removed from the file system.'
'disable_success' => 'Successfully disabled the selected plugins.',
'refresh_confirm' => 'Are you sure you want to reset the selected plugins? This will reset each plugin\'s data, restoring it to the intial install state.',
'refresh_success' => 'Successfully reset the selected plugins.',
'remove_confirm' => 'Are you sure you want to remove the selected plugins? This will remove all associated data as well.',
'remove_success' => 'Successfully removed the selected plugins.',
],
'project' => [
'name' => 'Project',