Skip to content

Commit

Permalink
Fix icon for upload plugin in Jails datagrid
Browse files Browse the repository at this point in the history
Merge:	releng/9.1.0
  • Loading branch information
william-gr committed Jul 25, 2013
1 parent caa245d commit 875b489
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions gui/jails/admin.py
Expand Up @@ -105,10 +105,14 @@ def _action_builder(
url = "_%s_url" % (name, )

if icon is None:
icon = name
if icon is not False:
icon = '<img src="%simages/ui/buttons/%s.png" width="18px" height="18px">' % (
settings.STATIC_URL,
name,
icon,
)
else:
icon = label

on_select_after = """function(evt, actionName, action) {
for(var i=0;i < evt.rows.length;i++) {
Expand Down Expand Up @@ -164,11 +168,21 @@ def _action_builder(
def get_actions(self):
actions = OrderedDict()

actions['edit'] = self._action_builder('edit', icon=_("Edit Jail"), label=_("Edit Jail"))
actions['storage'] = self._action_builder('jail_storage_add', label=_("Add Storage"))
actions['plugins'] = self._action_builder('upload', label=_("Install Plugins"))
#actions['export'] = self._action_builder('jail_export', label=_("Export Jail"))
#actions['import'] = self._action_builder('jail_import', label=_("Import Jail"))
actions['edit'] = self._action_builder(
'edit', icon=False, label=_("Edit Jail")
)
actions['storage'] = self._action_builder(
'jail_storage_add', label=_("Add Storage")
)
actions['plugins'] = self._action_builder(
'upload', icon='plugin_install', label=_("Upload Plugin")
)
#actions['export'] = self._action_builder(
# 'jail_export', label=_("Export Jail")
#)
#actions['import'] = self._action_builder(
# 'jail_import', label=_("Import Jail")
#)
actions['start'] = self._action_builder('jail_start', label=_("Start"))
actions['stop'] = self._action_builder('jail_stop', label=_("Stop"))
actions['shell'] = {
Expand Down

0 comments on commit 875b489

Please sign in to comment.