Skip to content

Commit

Permalink
Merge branch 'e107inc:master' into user_sendpm-bug
Browse files Browse the repository at this point in the history
  • Loading branch information
rica-carv authored Feb 11, 2025
2 parents c3cae85 + 5b46d60 commit 60ab558
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 30 deletions.
6 changes: 3 additions & 3 deletions e107_admin/cpage.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,12 @@ function options($parms, $value, $id, $attributes)
$query['id'] = $id;
$query = http_build_query($query, '', '&');

$text = "<a href='".e_SELF."?{$query}' class='btn btn-default' title='".LAN_EDIT."' data-toggle='tooltip' data-bs-toggle='tooltip' data-placement='left'>
$text = "<a href='".e_SELF."?{$query}' class='btn btn-primary' title='".LAN_EDIT."' data-toggle='tooltip' data-bs-toggle='tooltip' data-placement='left'>
".defset('ADMIN_EDIT_ICON')."</a>";

if($this->getController()->getMode() === 'overview' && getperms('J1')) // Page/Menu Delete Perms.
{
$text .= $this->submit_image('menu_delete['.$id.']', $id, 'delete', LAN_DELETE.' [ ID: '.$id.' ]', array('class' => 'action delete btn btn-default'));
$text .= $this->submit_image('menu_delete['.$id.']', $id, 'delete', LAN_DELETE.' [ ID: '.$id.' ]', array('class' => 'action delete btn btn-danger'));
}
return $text;
}
Expand Down Expand Up @@ -405,7 +405,7 @@ function options($parms, $value, $id, $attributes)
$att['readParms']['deleteClass'] = e_UC_NOBODY;
}

$text = "<div class='btn-group'>";
$text = "<div class='btn-group pull-left'>";

$text .= $this->renderValue('options',$value,$att,$id);

Expand Down
13 changes: 8 additions & 5 deletions e107_admin/history.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

// Generated e107 Plugin Admin Area

require_once('../class2.php');
if (!getperms('0'))
require_once(__DIR__.'/../class2.php');

if (!getperms('7'))
{
e107::redirect('admin');
exit;
Expand Down Expand Up @@ -43,6 +44,8 @@ class history_adminArea extends e_admin_dispatcher
);

protected $menuTitle = 'History';

protected $adminMenuIcon = '{e_IMAGE}admin_images/undo_32.png';
}


Expand Down Expand Up @@ -325,7 +328,7 @@ public function options($parms, $value, $id, $att = [])
$row = $controller->getListModel()->getData();

// Begin options group
$text = "<div class='btn-group pull-right'>";
$text = "<div class='btn-group'>";

// Check if the record can be restored
if (!empty($id))
Expand All @@ -335,7 +338,7 @@ public function options($parms, $value, $id, $att = [])

$type = $row['history_action'];
$name = ($type === 'delete') ? "restore_deleted[$id]" : "restore_updated[$id]";
$text .= "<button class='btn btn-default' type='submit' name='$name' title='{$restoreTitle}'><i class='admin-ui-option fa fa-undo fa-2x fa-fw'></i></button>";
$text .= "<button class='btn btn-primary' type='submit' name='$name' title='{$restoreTitle}'><i class='admin-ui-option fa fa-undo fa-2x fa-fw'></i></button>";
}

$att['readParms']['editClass'] = 999; // disable it.
Expand Down Expand Up @@ -385,5 +388,5 @@ function history_data($curVal,$mode)
e107::getAdminUI()->runPage();

require_once(e_ADMIN."footer.php");
exit;


10 changes: 5 additions & 5 deletions e107_core/templates/admin_icons_template.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,11 @@
$ADMIN_ICONS_TEMPLATE['ADMIN_WARNING_ICON_PATH'] = e_IMAGE_ABS . "admin_images/warning_32.png";


$ADMIN_ICONS_TEMPLATE['ADMIN_EDIT_ICON'] = "<i class='admin-ui-option fa fa-edit fa-2x fa-fw' style='font-size: 24px; line-height: 32px;'></i>"; // "<i class='S32 e-edit-32'></i>";
$ADMIN_ICONS_TEMPLATE['ADMIN_DELETE_ICON'] = "<i class='admin-ui-option fa fa-trash fa-2x fa-fw' style='font-size: 24px; line-height: 32px;'></i>"; // "<i class='S32 e-delete-32'></i>";
$ADMIN_ICONS_TEMPLATE['ADMIN_SORT_ICON'] = "<i class='admin-ui-option fa fa-sort fa-2x fa-fw' style='font-size: 24px; line-height: 32px;'></i>"; //
$ADMIN_ICONS_TEMPLATE['ADMIN_EXECUTE_ICON'] = "<i class='admin-ui-option fa fa-play fa-2x fa-fw' style='font-size: 24px; line-height: 32px;'></i>"; // "<i class='S32 e-execute-32'></i>";
$ADMIN_ICONS_TEMPLATE['ADMIN_PAGES_ICON'] = "<i class='admin-ui-option fa fa-file fa-2x fa-fw' style='font-size: 24px; line-height: 32px;'></i>"; //"<i class='S32 e-custom-32'></i>";
$ADMIN_ICONS_TEMPLATE['ADMIN_EDIT_ICON'] = "<i class='admin-ui-option fa fa-edit fa-2x fa-fw'></i>"; // "<i class='S32 e-edit-32'></i>";
$ADMIN_ICONS_TEMPLATE['ADMIN_DELETE_ICON'] = "<i class='admin-ui-option fa fa-trash fa-2x fa-fw'></i>"; // "<i class='S32 e-delete-32'></i>";
$ADMIN_ICONS_TEMPLATE['ADMIN_SORT_ICON'] = "<i class='admin-ui-option fa fa-sort fa-2x fa-fw'></i>"; //
$ADMIN_ICONS_TEMPLATE['ADMIN_EXECUTE_ICON'] = "<i class='admin-ui-option fa fa-play fa-2x fa-fw'></i>"; // "<i class='S32 e-execute-32'></i>";
$ADMIN_ICONS_TEMPLATE['ADMIN_PAGES_ICON'] = "<i class='admin-ui-option fa fa-file fa-2x fa-fw'></i>"; //"<i class='S32 e-custom-32'></i>";

$ADMIN_ICONS_TEMPLATE['E_32_TRUE'] = "<i class='S32 e-true-32'></i>";

Expand Down
6 changes: 3 additions & 3 deletions e107_handlers/form_handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -5301,7 +5301,7 @@ private function renderOptions($parms, $id, $attributes)

$att = [
'href' => e_SELF . "?$query",
'class' => "btn btn-default btn-secondary$eModal",
'class' => "btn btn-default btn-primary$eModal",
'data-modal-caption' => $eModalCap,
'title' => LAN_EDIT,
// 'data-toggle' => 'tooltip',
Expand All @@ -5324,15 +5324,15 @@ private function renderOptions($parms, $id, $attributes)

if(check_class($cls))
{
$parms['class'] = 'action delete btn btn-default'.$delcls;
$parms['class'] = 'action delete btn btn-danger'.$delcls;
unset($parms['deleteClass']);
$parms['icon'] = $deleteIconDefault;
$text .= $this->submit_image('etrigger_delete['.$id.']', $id, 'delete', LAN_DELETE.' [ ID: '.$id.' ]', $parms);
}
}
else
{
$parms['class'] = 'action delete btn btn-default'.$delcls;
$parms['class'] = 'action delete btn btn-danger'.$delcls;
$parms['icon'] = $deleteIconDefault;
$text .= $this->submit_image('etrigger_delete['.$id.']', $id, 'delete', LAN_DELETE.' [ ID: '.$id.' ]', $parms);
}
Expand Down
Binary file added e107_images/admin_images/undo_16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added e107_images/admin_images/undo_32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 14 additions & 13 deletions e107_tests/tests/unit/e107Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -1048,27 +1048,28 @@ public function testLoadAdminIcons()
'ADMIN_WARNING_ICON' => '<i class=\'fa fa-warning text-warning\'></i>',
'ADMIN_GRID_ICON' => '<i class=\'fa fa-th\'></i>',
'ADMIN_LIST_ICON' => '<i class=\'fas fa-list\'></i>',
'ADMIN_EDIT_ICON' => '<i class=\'S32 e-edit-32\'></i>',
'ADMIN_DELETE_ICON' => '<i class=\'S32 e-delete-32\'></i>',
'ADMIN_SORT_ICON' => '<i class=\'S32 e-sort-32\'></i>',
'ADMIN_EXECUTE_ICON' => '<i class=\'S32 e-execute-32\'></i>',
'ADMIN_PAGES_ICON' => '<i class=\'S32 e-custom-32\'></i>',
'ADMIN_EDIT_ICON' => "<i class='admin-ui-option fa fa-edit fa-2x fa-fw'></i>",
'ADMIN_DELETE_ICON' => "<i class='admin-ui-option fa fa-trash fa-2x fa-fw'></i>",
'ADMIN_SORT_ICON' => "<i class='admin-ui-option fa fa-sort fa-2x fa-fw'></i>",
'ADMIN_EXECUTE_ICON' => "<i class='admin-ui-option fa fa-play fa-2x fa-fw'></i>",
'ADMIN_PAGES_ICON' => "<i class='admin-ui-option fa fa-file fa-2x fa-fw'></i>",
'ADMIN_ADD_ICON' => '<i class=\'S32 e-add-32\'></i>',
'ADMIN_INFO_ICON' => '<i class=\'fa fa-question-circle\'></i>',
'ADMIN_CONFIGURE_ICON' => '<i class=\'S32 e-settings-32\'></i>',
'ADMIN_VIEW_ICON' => '<i class=\'S32 e-search-32\'></i>',
'ADMIN_CONFIGURE_ICON' => "<i class='admin-ui-option fa fa-cog fa-2x fa-fw'></i>",
'ADMIN_VIEW_ICON' => "<i class='admin-ui-option fa fa-search fa-2x fa-fw'></i>",
'ADMIN_URL_ICON' => '<i class=\'S16 e-forums-16\'></i>',
'ADMIN_INSTALLPLUGIN_ICON' => '<i class=\'S32 e-plugin_install-32\'></i>',
'ADMIN_UNINSTALLPLUGIN_ICON' => '<i class=\'S32 e-plugin_uninstall-32\'></i>',
'ADMIN_UPGRADEPLUGIN_ICON' => '<i class=\'S32 e-up-32\'></i>',
'ADMIN_REPAIRPLUGIN_ICON' => '<i class=\'S32 e-configure-32\'></i>',
'ADMIN_UP_ICON' => '<i class=\'S32 e-up-32\'></i>',
'ADMIN_DOWN_ICON' => '<i class=\'S32 e-down-32\'></i>',
'ADMIN_UNINSTALLPLUGIN_ICON' => "<i class='admin-ui-option fa fa-trash fa-2x fa-fw'></i>",
'ADMIN_UPGRADEPLUGIN_ICON' => "<i class='admin-ui-option fa fa-arrow-up fa-2x fa-fw'></i>",
'ADMIN_REPAIRPLUGIN_ICON' => "<i class='admin-ui-option fa fa-wrench fa-2x fa-fw'></i>",
'ADMIN_UP_ICON' => "<i class='admin-ui-option fa fa-chevron-up fa-2x fa-fw'></i>",
'ADMIN_DOWN_ICON' => "<i class='admin-ui-option fa fa-chevron-down fa-2x fa-fw'></i>",
'ADMIN_EDIT_ICON_PATH' => '/e107_images/admin_images/edit_32.png',
'ADMIN_DELETE_ICON_PATH' => '/e107_images/admin_images/delete_32.png',
'ADMIN_WARNING_ICON_PATH' => '/e107_images/admin_images/warning_32.png',
'E_24_PLUGIN' => "<i class='S24 e-plugins-24'></i> ",

'E_16_UNDO' => "<img class='icon S16' src='" . e_IMAGE . "admin_images/undo_16.png' alt='' />",
'E_32_UNDO' => "<img class='icon S32' src='" . e_IMAGE . "admin_images/undo_32.png' alt='' />"
);


Expand Down
9 changes: 9 additions & 0 deletions e107_tests/tests/unit/e_navigationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,15 @@ public function testAdminLinksLegacy()
5 => '<i class=\'S16 e-emoticons-16\'></i>',
6 => '<i class=\'S32 e-emoticons-32\'></i> ',
),
9 => array (
0 => './e107_admin/history.php',
1 => 'History',
2 => 'History',
3 => '7',
4 => 4,
5 => '<img class=\'icon S16\' src=\'./e107_images/admin_images/undo_16.png\' alt=\'\' />',
6 => '<img class=\'icon S32\' src=\'./e107_images/admin_images/undo_32.png\' alt=\'\' />'
),
10 =>
array (
0 => '/e107_admin/frontpage.php',
Expand Down
3 changes: 2 additions & 1 deletion e107_themes/bootstrap3/admin_style.css
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ td .file.well { margin-bottom:0 }



td.options .btn-group { display: flex; }
td.options .btn-group { display: flex; justify-content: center; }


.table .nav-tabs a,
Expand Down Expand Up @@ -632,6 +632,7 @@ i.s-message-icon {
width:32px;
height:32px;
float:left;
line-height: 28px;
}

i.s-message-success { background-position: -592px -37px; width: 32px; height: 32px; }
Expand Down

0 comments on commit 60ab558

Please sign in to comment.