Skip to content
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.

Commit

Permalink
#319: Elysion template updates
Browse files Browse the repository at this point in the history
- Added kodekit UI v1.0.0
- Styled articles, categories and tags
- General optimizations and cleanup
  • Loading branch information
robinpoort committed Feb 27, 2018
1 parent f194334 commit b48e311
Show file tree
Hide file tree
Showing 99 changed files with 17,427 additions and 8,977 deletions.
24 changes: 17 additions & 7 deletions app/administrator/language/en-GB/en-GB.tpl_elysio.ini
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
; Filters
TPL_ELYSIO_CLIENT="Client";
TPL_ELYSIO_DESCRIPTION="Description";
TPL_ELYSIO_EDIT_ACCOUNT="Edit account";
TPL_ELYSIO_LOGOUT="Logout";
TPL_ELYSIO_DEBUG="Debug";
TPL_ELYSIO_MENU="Menu";

COM_CATEGORIES_FILTER_PUBLISHED="Published";

COM_CONTENT_FILTER_PUBLISHED="Published";
COM_CONTENT_FILTER_AUTHOR="Author";

COM_MENUS_FILTER_PUBLISHED="Published";
COM_MENUS_FILTER_CATEGORY="Menu type";

COM_USERS_FILTER_GROUP="- Select Group -";

JOPTION_FILTER_ACCESS="Access";
JOPTION_FILTER_LANGUAGE="Language";
JOPTION_FILTER_LEVEL="Filter";
TPL_ELYSIO_CLIENT="Client";
TPL_ELYSIO_DESCRIPTION="Description";
TPL_ELYSIO_EDIT_ACCOUNT="Edit account";
TPL_ELYSIO_LOGOUT="Logout";
TPL_ELYSIO_DEBUG="Debug";
TPL_ELYSIO_MENU="Menu";
JOPTION_FILTER_CATEGORY="Category";
JOPTION_FILTER_TAG="Tag";

6 changes: 1 addition & 5 deletions web/administrator/templates/elysio/bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,10 @@
"svg-injector": "https://github.com/iconic/SVGInjector.git#1.1.3",
"bootstrap": "~3.3.5",
"jqtree": "https://github.com/mbraak/jqTree.git#1.2.1",
"select2": "https://github.com/select2/select2.git#4.0.0",
"select2-bootstrap": "https://github.com/select2/select2-bootstrap-theme.git#0.1.0-beta.4",
"bootstrap-chosen": "https://github.com/alxlit/bootstrap-chosen.git#1.0.1",
"bootstrap-sass": "3.3.4",
"bootstrap-sass": "3.3.6",
"neat": "1.7.2",
"footable": "2.0.3",
"kodekit-ui": "https://github.com/timble/kodekit-ui.git#master",
"floatThead": "1.3.0",
"modernizr": "https://github.com/Modernizr/Modernizr.git#2.8.3",
"magnific-popup": "1.0.0"
}
Expand Down
2 changes: 1 addition & 1 deletion web/administrator/templates/elysio/component.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<jdoc:include type="head" />
</head>
<body class="contentpane component">
<div class="k-ui-namespace k-ui-container" style="overflow: auto;">
<div class="k-ui-namespace k-ui-container">
<jdoc:include type="message" />
<jdoc:include type="component" />
</div>
Expand Down
22,929 changes: 14,542 additions & 8,387 deletions web/administrator/templates/elysio/css/admin.css

Large diffs are not rendered by default.

41 changes: 26 additions & 15 deletions web/administrator/templates/elysio/error.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,41 +72,52 @@
</head>

<body class="koowa admin <?php echo $option . ' view-' . $view . ' layout-' . $layout . ' task-' . $task . ' itemid-' . $itemid; ?> no-js">
<script type="text/javascript">function hasClass(e,t){return e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}var el=document.body;var cl="no-js";if(hasClass(el,cl)){var reg=new RegExp("(\\s|^)"+cl+"(\\s|$)");el.className=el.className.replace(reg," k-js-enabled")}</script>
<script src="templates/elysio/js/kui-initialize.js"></script>

<div id="koowa" class="koowa">
<!-- Koowa -->
<div class="k-ui-namespace k-ui-container">

<?php
$layout = 'error';
include_once('navigation.php');
?>

<!-- Koowa container -->
<section class="koowa-container">
<!-- Wrapper -->
<div class="k-wrapper k-js-wrapper">

<!-- Content wrapper -->
<div class="k-content-wrapper">

<!-- Content -->
<div class="k-content">

<!-- Component -->
<div class="k-component">
<!-- Component wrapper -->
<div class="k-component-wrapper">

<!-- Container -->
<div class="k-container">
<!-- Component -->
<div class="k-component">

<h1><?php echo JText::_('JERROR_AN_ERROR_HAS_OCCURRED'); ?></h1>
<!-- Container -->
<div class="k-container">

<blockquote>
<span class="label label-info"><?php echo $this->code; ?></span> <?php echo htmlspecialchars($this->message, ENT_QUOTES, 'UTF-8');?>
</blockquote>
<div class="k-container__full">

<p><a href="<?php echo $this->baseurl; ?>" class="btn btn-default"><?php echo JText::_('JGLOBAL_TPL_CPANEL_LINK_TEXT'); ?></a></p>
<h1><?php echo JText::_('JERROR_AN_ERROR_HAS_OCCURRED'); ?></h1>

</div>
<blockquote>
<span class="k-label k-label--info"><?php echo $this->code; ?></span>
<?php echo htmlspecialchars($this->message, ENT_QUOTES, 'UTF-8');?>
</blockquote>

</div><!-- .k-component -->
<p><a href="<?php echo $this->baseurl; ?>" class="k-button k-button--default"><?php echo JText::_('JGLOBAL_TPL_CPANEL_LINK_TEXT'); ?></a></p>

</div>

</div>

</div><!-- .k-component -->

</div><!-- .k-component-wrapper -->

</div><!-- k-content -->

Expand Down
10 changes: 6 additions & 4 deletions web/administrator/templates/elysio/gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ module.exports = function(grunt) {
// Compile sass files
sass: {
options: {
outputStyle: 'compact',
includePaths: [
'bower_components', // bower
'node_modules' // npm
Expand Down Expand Up @@ -72,14 +71,17 @@ module.exports = function(grunt) {
build: {
files: {
'js/admin.js': [
'bower_components/kodekit-ui/dist/js/admin.min.js',
'node_modules/kodekit-ui/dist/js/admin.min.js',
'scripts/main.js'
],
'js/jquery.js': [
'bower_components/kodekit-ui/dist/js/jquery.min.js'
'node_modules/kodekit-ui/dist/js/jquery.min.js'
],
'js/modernizr.js': [
'bower_components/kodekit-ui/dist/js/modernizr.min.js'
'node_modules/kodekit-ui/dist/js/modernizr.min.js'
],
'js/kui-initialize.js': [
'node_modules/kodekit-ui/dist/js/kui-initialize.min.js'
]
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
<?php
defined('_JEXEC') or die;

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');

$app = JFactory::getApplication();
$user = JFactory::getUser();
$userId = $user->get('id');
$extension = $this->escape($this->state->get('filter.extension'));
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
$ordering = ($listOrder == 'a.lft');
$saveOrder = ($listOrder == 'a.lft' && strtolower($listDirn) == 'asc');

if ($saveOrder)
{
$saveOrderingUrl = 'index.php?option=com_categories&task=categories.saveOrderAjax&tmpl=component';
JHtml::_('sortablelist.sortable', 'categoryList', 'adminForm', strtolower($listDirn), $saveOrderingUrl, false, true);
}

$sortFields = $this->getSortFields();
?>

<?php JFactory::getDocument()->setBuffer($this->sidebar, 'modules', 'submenu'); ?>

<!-- Form -->
<form class="k-component k-js-component k-js-grid-controller k-js-grid" action="<?php echo JRoute::_('index.php?option=com_categories&view=categories'); ?>" method="post" name="adminForm" id="adminForm">

<!-- Scopebar -->
<?php echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this), null, array('debug' => false)); ?>

<!-- Onboarding -->
<?php echo JLayoutHelper::render('elysio.onboarding', array('items' => $this->items, 'type' => 'article')); ?>

<!-- Table -->
<div class="k-table-container<?php echo (!$this->items) ? ' k-hidden' : '' ?>">
<div class="k-table">
<table class="k-js-responsive-table" id="categoryList">
<thead>
<tr>
<th width="1%" class="k-table-data--icon">
<?php echo JHtml::_('searchtools.sort', '', 'a.lft', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
</th>
<th width="1%" class="k-table-data--form">
<?php echo JHtml::_('grid.checkall'); ?>
</th>
<th width="1%" class="k-table-data--toggle" data-toggle="true"></th>
<th>
<?php echo JHtml::_('searchtools.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?>
</th>
<th width="1%" data-hide="phone">
<?php echo JHtml::_('searchtools.sort', 'JSTATUS', 'a.published', $listDirn, $listOrder); ?>
</th>
<th width="1%" data-hide="phone,tablet">
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_ACCESS', 'a.access', $listDirn, $listOrder); ?>
</th>
<?php if ($this->assoc) : ?>
<th width="1%" data-hide="phone,tablet">
<?php echo JHtml::_('searchtools.sort', 'COM_CATEGORY_HEADING_ASSOCIATION', 'association', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<th width="1%" data-hide="phone,tablet">
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'language', $this->state->get('list.direction'), $this->state->get('list.ordering')); ?>
</th>
<th width="1%" data-hide="phone,tablet">
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
</th>
</tr>
</thead>
<tbody>
<?php foreach ($this->items as $i => $item) : ?>
<?php
$orderkey = array_search($item->id, $this->ordering[$item->parent_id]);
$canEdit = $user->authorise('core.edit', $extension . '.category.' . $item->id);
$canCheckin = $item->checked_out == $userId || $item->checked_out == 0;
$canEditOwn = $user->authorise('core.edit.own', $extension . '.category.' . $item->id) && $item->created_user_id == $userId;
$canChange = $user->authorise('core.edit.state', $extension . '.category.' . $item->id) && $canCheckin;

// Get the parents of item for sorting
if ($item->level > 1)
{
$parentsStr = "";
$_currentParentId = $item->parent_id;
$parentsStr = " " . $_currentParentId;
for ($i2 = 0; $i2 < $item->level; $i2++)
{
foreach ($this->ordering as $k => $v)
{
$v = implode("-", $v);
$v = "-" . $v . "-";
if (strpos($v, "-" . $_currentParentId . "-") !== false)
{
$parentsStr .= " " . $k;
$_currentParentId = $k;
break;
}
}
}
}
else
{
$parentsStr = "";
}
?>
<tr sortable-group-id="<?php echo $item->parent_id; ?>" item-id="<?php echo $item->id ?>" parents="<?php echo $parentsStr ?>" level="<?php echo $item->level ?>">
<td>
<?php
$iconClass = '';
if (!$canChange)
{
$iconClass = ' inactive';
}
elseif (!$saveOrder)
{
$iconClass = ' inactive tip-top hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED');
}
?>
<span class="sortable-handler<?php echo $iconClass ?>">
<i class="icon-menu"></i>
</span>
<?php if ($canChange && $saveOrder) : ?>
<input type="text" style="display:none" name="order[]" size="5" value="<?php echo $orderkey + 1; ?>" />
<?php endif; ?>
</td>
<td>
<?php echo JHtml::_('grid.id', $i, $item->id); ?>
</td>
<td class="k-table-data--toggle"></td>
<td>
<?php echo str_repeat('<span class="gi">&mdash;</span>', $item->level - 1) ?>
<?php if ($item->checked_out) : ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'categories.', $canCheckin); ?>
<?php endif; ?>
<?php if ($canEdit || $canEditOwn) : ?>
<a href="<?php echo JRoute::_('index.php?option=com_categories&task=category.edit&id=' . $item->id . '&extension=' . $extension); ?>">
<?php echo $this->escape($item->title); ?></a>
<?php else : ?>
<?php echo $this->escape($item->title); ?>
<?php endif; ?>
<span class="small" title="<?php echo $this->escape($item->path); ?>">
<?php if (empty($item->note)) : ?>
<?php echo JText::sprintf('JGLOBAL_LIST_ALIAS', $this->escape($item->alias)); ?>
<?php else : ?>
<?php echo JText::sprintf('JGLOBAL_LIST_ALIAS_NOTE', $this->escape($item->alias), $this->escape($item->note)); ?>
<?php endif; ?>
</span>
</td>
<td>
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'categories.', $canChange); ?>
</td>
<td>
<?php echo $this->escape($item->access_level); ?>
</td>
<?php if ($this->assoc) : ?>
<td>
<?php if ($item->association): ?>
<?php echo JHtml::_('CategoriesAdministrator.association', $item->id, $extension); ?>
<?php endif; ?>
</td>
<?php endif; ?>
<td>
<?php if ($item->language == '*') : ?>
<?php echo JText::alt('JALL', 'language'); ?>
<?php else: ?>
<?php echo $item->language_title ? $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?>
<?php endif; ?>
</td>
<td>
<span title="<?php echo sprintf('%d-%d', $item->lft, $item->rgt); ?>">
<?php echo (int) $item->id; ?></span>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div><!-- .k-table -->

<!-- Pagination -->
<?php echo JLayoutHelper::render('elysio.pagination', array('view' => $this, 'pages' => $this->pagination->getListFooter())); ?>

<input type="hidden" name="extension" value="<?php echo $extension; ?>" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<?php echo JHtml::_('form.token'); ?>

</div><!-- .k-table-container -->

</form><!-- .k-component -->

<div class="k-dynamic-content-holder">
<?php //Load the batch processing form. ?>
<?php echo $this->loadTemplate('batch'); ?>

<script type="text/javascript">
Joomla.orderTable = function()
{
table = document.getElementById("sortTable");
direction = document.getElementById("directionTable");
order = table.options[table.selectedIndex].value;
if (order != '<?php echo $listOrder; ?>')
{
dirn = 'asc';
}
else
{
dirn = direction.options[direction.selectedIndex].value;
}
Joomla.tableOrdering(order, dirn, '');
}
</script>
</div>
Loading

0 comments on commit b48e311

Please sign in to comment.