Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/1.9.4.x' into 20.0
Browse files Browse the repository at this point in the history
  • Loading branch information
colinmollenhour committed Aug 20, 2020
2 parents e878064 + f632d75 commit 1317bca
Show file tree
Hide file tree
Showing 60 changed files with 5,879 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
/app/etc/local.xml
/media/catalog
/dev/tests/functional/generated
/dev/tests/functional/vendor
11 changes: 8 additions & 3 deletions app/code/core/Mage/Adminhtml/Controller/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,17 @@ protected function _addJs(Mage_Core_Block_Abstract $block)
*/
public function preDispatch()
{
// override admin store design settings via stores section
// get legacy theme choice form backend config
if (Mage::getStoreConfigFlag('admin/design/use_legacy_theme')) {
$theme = Mage::getConfig()->getNode("stores/admin/design/theme/default");
} else {
$theme = Mage::getConfig()->getNode("stores/admin/design/theme/openmage");
}

Mage::getDesign()
->setArea($this->_currentArea)
->setPackageName((string)Mage::getConfig()->getNode('stores/admin/design/package/name'))
->setTheme((string)Mage::getConfig()->getNode('stores/admin/design/theme/default'))
;
->setTheme((string)$theme);
foreach (array('layout', 'template', 'skin', 'locale') as $type) {
if ($value = (string)Mage::getConfig()->getNode("stores/admin/design/theme/{$type}")) {
Mage::getDesign()->setTheme($type, $value);
Expand Down
6 changes: 6 additions & 0 deletions app/code/core/Mage/Adminhtml/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,11 @@
<help>
<target_version>ce</target_version>
</help>
<admin>
<design>
<use_legacy_theme>0</use_legacy_theme>
</design>
</admin>
</default>
<stores>
<admin>
Expand All @@ -243,6 +248,7 @@
</package>
<theme>
<default>default</default>
<openmage>openmage</openmage>
</theme>
</design>
</admin>
Expand Down
21 changes: 21 additions & 0 deletions app/code/core/Mage/Core/etc/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,27 @@
<show_in_website>0</show_in_website>
<show_in_store>0</show_in_store>
<groups>
<design translate="label">
<label>Admin Theme</label>
<frontend_type>text</frontend_type>
<sort_order>5</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>0</show_in_website>
<show_in_store>0</show_in_store>
<fields>
<use_legacy_theme translate="label comment">
<label>Enable legacy Admin Theme</label>
<comment>Use legacy theme from Magento CE</comment>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_yesno</source_model>
<sort_order>1</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>0</show_in_website>
<show_in_store>0</show_in_store>
</use_legacy_theme>
</fields>
</design>

<emails translate="label">
<label>Admin User Emails</label>
<frontend_type>text</frontend_type>
Expand Down
11 changes: 11 additions & 0 deletions app/design/adminhtml/default/openmage/layout/local.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<layout version="0.1.0">
<default>
<reference name="head">
<action method="addItem"><type>skin_css</type><name>override.css</name></action>
<action method="addItem"><type>skin_css</type><name>form.css</name></action>
<action method="removeItem"><type>js_css</type><name>calendar/calendar-win2k-1.css</name></action>
<action method="addItem"><type>skin_css</type><name>calendar-blue2.css</name><params/></action>
</reference>
</default>
</layout>
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magento.com for more information.
*
* @category design
* @package default_default
* @copyright Copyright (c) 2006-2018 Magento, Inc. (http://www.magento.com)
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo Mage::helper('adminhtml')->__('Log into OpenMage LTS Admin Page'); ?></title>
<link type="text/css" rel="stylesheet" href="<?php echo $this->getSkinUrl('login.css') ?>" media="all" />
<link rel="icon" href="<?php echo $this->getSkinUrl('favicon.ico'); ?>" type="image/x-icon" />
<link rel="shortcut icon" href="<?php echo $this->getSkinUrl('favicon.ico'); ?>" type="image/x-icon" />

<script type="text/javascript" src="<?php echo $this->getJsUrl(); ?>index.php/x.js?f=prototype/prototype.js,prototype/validation.js,mage/adminhtml/events.js,mage/adminhtml/form.js,scriptaculous/effects.js"></script>
<script type="text/javascript" src="<?php echo $this->getJsUrl('mage/captcha.js') ?>"></script>

<!--[if IE]> <link rel="stylesheet" href="<?php echo $this->getSkinUrl('iestyles.css'); ?>" type="text/css" media="all" /> <![endif]-->
<!--[if lt IE 7]> <link rel="stylesheet" href="<?php echo $this->getSkinUrl('below_ie7.css'); ?>" type="text/css" media="all" /> <![endif]-->
<!--[if IE 7]> <link rel="stylesheet" href="<?php echo $this->getSkinUrl('ie7.css'); ?>" type="text/css" media="all" /> <![endif]-->
</head>
<body id="page-login">
<div class="login-container">
<div class="login-box">
<form method="post" action="" id="loginForm">
<fieldset class="login-form">
<input name="form_key" type="hidden" value="<?php echo $this->getFormKey(); ?>" />
<h2><?php echo Mage::helper('adminhtml')->__('Forgot your user name or password?'); ?></h2>
<div id="messages">
<?php echo $this->getMessagesBlock()->toHtml(); ?>
</div>
<div class="input-box forgot-password"><label for="email"><?php echo Mage::helper('adminhtml')->__('Email Address:'); ?></label><br />
<input type="text" id="email" name="email" value="" class="required-entry input-text forgot-password validate-email" style="width:461px;" />
</div>
<?php echo $this->getChildHtml('form.additional.info'); ?>
<div class="clear"></div>
<div class="form-buttons">
<a class="left" href="<?php echo $this->getUrl('adminhtml', array('_nosecret' => true)); ?>">&laquo; <?php echo Mage::helper('adminhtml')->__('Back to Login'); ?></a>
<input type="submit" class="form-button" onclick="loginForm.submit()" value="<?php echo Mage::helper('adminhtml')->__('Retrieve Password'); ?>">
</div>
</fieldset>
<p class="legal"><?php echo Mage::helper('adminhtml')->__('OpenMage LTS') ?></p>
</form>
<div class="bottom"></div>
<script type="text/javascript">
var loginForm = new varienForm('loginForm');
</script>
</div>
</div>
</body>
</html>

77 changes: 77 additions & 0 deletions app/design/adminhtml/default/openmage/template/login.phtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magento.com for more information.
*
* @category design
* @package default_default
* @copyright Copyright (c) 2006-2018 Magento, Inc. (http://www.magento.com)
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo Mage::helper('adminhtml')->__('Log into OpenMage LTS Admin Page') ?></title>
<link type="text/css" rel="stylesheet" href="<?php echo $this->getSkinUrl('login.css') ?>" media="all" />

<link rel="icon" href="<?php echo $this->getSkinUrl('favicon.ico') ?>" type="image/x-icon" />
<link rel="shortcut icon" href="<?php echo $this->getSkinUrl('favicon.ico') ?>" type="image/x-icon" />

<script type="text/javascript" src="<?php echo $this->getJsUrl('prototype/prototype.js') ?>"></script>
<script type="text/javascript" src="<?php echo $this->getJsUrl('prototype/validation.js') ?>"></script>
<script type="text/javascript" src="<?php echo $this->getJsUrl('scriptaculous/effects.js') ?>"></script>
<script type="text/javascript" src="<?php echo $this->getJsUrl('mage/adminhtml/form.js') ?>"></script>
<script type="text/javascript" src="<?php echo $this->getJsUrl('mage/captcha.js') ?>"></script>

<!--[if IE]> <link rel="stylesheet" href="<?php echo $this->getSkinUrl('iestyles.css') ?>" type="text/css" media="all" /> <![endif]-->
<!--[if lt IE 7]> <link rel="stylesheet" href="<?php echo $this->getSkinUrl('below_ie7.css') ?>" type="text/css" media="all" /> <![endif]-->
<!--[if IE 7]> <link rel="stylesheet" href="<?php echo $this->getSkinUrl('ie7.css') ?>" type="text/css" media="all" /> <![endif]-->
</head>
<body id="page-login" onload="document.forms.loginForm.username.focus();">
<div class="login-container">
<div class="login-box">
<form method="post" action="" id="loginForm" autocomplete="on">
<div class="login-form">
<input name="form_key" type="hidden" value="<?php echo $this->getFormKey() ?>" />
<h2><?php echo Mage::helper('adminhtml')->__('Log in to Admin Panel') ?></h2>
<div id="messages">
<?php echo $this->getMessagesBlock()->toHtml() ?>
</div>
<div class="input-box"><label for="username"><?php echo Mage::helper('adminhtml')->__('User Name:') ?></label><br/>
<input type="text" id="username" name="login[username]" value="" class="required-entry input-text" /></div>
<div class="input-box"><label for="login"><?php echo Mage::helper('adminhtml')->__('Password:') ?></label><br />
<input type="password" id="login" name="login[password]" class="required-entry input-text" value="" /></div>
<?php echo $this->getChildHtml('form.additional.info'); ?>
<div class="clear"></div>
<div class="form-buttons">
<a class="left" href="<?php echo Mage::helper('adminhtml')->getUrl('adminhtml/index/forgotpassword', array('_nosecret' => true)) ?>"><?php echo Mage::helper('adminhtml')->__('Forgot your password?') ?></a>
<input type="submit" class="form-button" value="<?php echo Mage::helper('core')->quoteEscape(Mage::helper('adminhtml')->__('Login')) ?>" title="<?php echo Mage::helper('core')->quoteEscape(Mage::helper('adminhtml')->__('Login')) ?>" /></div>
</div>
<p class="legal"><?php echo Mage::helper('adminhtml')->__('OpenMage LTS') ?></p>
</form>
<div class="bottom"></div>
<script type="text/javascript">
var loginForm = new varienForm('loginForm');
</script>
</div>
</div>
</body>
</html>

81 changes: 81 additions & 0 deletions app/design/adminhtml/default/openmage/template/page/header.phtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magento.com for more information.
*
* @category design
* @package default_default
* @copyright Copyright (c) 2006-2018 Magento, Inc. (http://www.magento.com)
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/

/** @var $this Mage_Adminhtml_Block_Page_Header */
?>
<div class="header-top">
<a href="<?php echo $this->getHomeLink() ?>" class="logo" title="<?php echo $this->__('OpenMage ver. %s', Mage::getOpenMageVersion()) ?>">
<svg version="1.1" id="magentologo" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="20px" height="40px" viewBox="0 0 20 40" enable-background="new 0 0 20 40" xml:space="preserve">
<path fill="#FFFFFF" d="M12.9,23.4V30H7.5v-6.3c0-1,0.3-1.8,0.8-2.3c0.5-0.5,1.2-0.8,2-0.8c0.8,0,1.5,0.2,1.9,0.7 C12.7,21.8,12.9,22.5,12.9,23.4z M3.8,21.3c-0.5-0.5-1.1-0.7-1.9-0.7c-0.8,0-1.4,0.2-1.9,0.7V30h4.5v-6.6 C4.5,22.5,4.3,21.8,3.8,21.3z M16.2,10H0v9.1c0.2-0.2,0.4-0.4,0.6-0.5C1.3,18.2,2.1,18,3,18c1,0,1.8,0.2,2.5,0.7 c0.7,0.5,1.2,1.1,1.6,2c0.4-0.8,0.9-1.5,1.7-1.9c0.7-0.5,1.6-0.7,2.5-0.7c1.4,0,2.6,0.4,3.4,1.3c0.8,0.9,1.3,2.2,1.3,3.8V30H20V13.8 C20,11.7,18.3,10,16.2,10z"/>
</svg>
</a>
<div class="header-right">
<ul id="usermenu">
<li onmouseover="Element.addClassName(this,'over')" onmouseout="Element.removeClassName(this,'over')" class="parent level0 usermenulabel">
<a href="#" onclick="return false" title="<?php echo $this->__('User Menu') ?>">
<svg version="1.1" id="burger" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="40px" height="40px" viewBox="0 0 40 40" enable-background="new 0 0 40 40" xml:space="preserve">
<rect opacity="0.25" fill="#FFFFFF" width="40" height="40"></rect>
<path fill="#FFFFFF" d="M31,21H9v-2h22V21z M31,17H9v-2h22V17z M31,25H9v-2h22V25z"></path>
</svg>
</a>
<ul>
<li><span><?php echo $this->formatDate(null, 'medium') ?></span></li>
<li><a href="<?php echo Mage::helper("adminhtml")->getUrl("adminhtml/system_account"); ?>"><span><?php echo $this->__("Logged in as %s", $this->escapeHtml($this->getUser()->getUsername())); ?></span></a></li>
<li><a href="<?php echo Mage::getBaseUrl();; ?>" target="_blank"><span><?php echo $this->__('View') . ': ' . $this->escapeHtml(Mage::app()->getStore()->getFrontendName()); ?></span></a></li>
<li class="last"><a href="<?php echo $this->getLogoutLink() ?>"><span><?php echo $this->__('Log Out') ?></span></a></li>
</ul>
</li>
</ul>
<?php if ( Mage::getSingleton('admin/session')->isAllowed('admin/global_search') ): ?>
<fieldset>
<legend>Search</legend>
<span id="global_search_indicator" class="autocomplete-indicator" style="display: none">
<img src="<?php echo $this->getSkinUrl('images/ajax-loader.gif') ?>" alt="<?php echo Mage::helper('core')->quoteEscape($this->__('Loading...')) ?>" class="v-middle"/>
</span>
<?php $defSearch = $this->__('Global Record Search') ?>
<input id="global_search" name="query" type="text" class="input-text" value="<?php if(!empty($query)): ?><?php echo $query ?><?php else: ?><?php echo Mage::helper('core')->quoteEscape($defSearch) ?><?php endif ?>" onfocus="if(this.value=='<?php echo Mage::helper('core')->quoteEscape($defSearch, true) ?>')this.value=''; " onblur="if(this.value=='')this.value='<?php echo $defSearch ?>';" autocomplete="off" />
<div id="global_search_autocomplete" class="autocomplete"></div>
<script type="text/javascript">
new Ajax.Autocompleter(
'global_search',
'global_search_autocomplete',
'<?php echo $this->getUrl('adminhtml/index/globalSearch') ?>',
{
paramName:"query",
minChars:2,
indicator:"global_search_indicator",
updateElement:getSelectionId,
evalJSON:'force'
}
);
function getSelectionId(li) {
location.href = li.getAttribute('url');
}
</script>
</fieldset>
<?php endif; ?>
</div>
</div>
Loading

0 comments on commit 1317bca

Please sign in to comment.