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

Commit

Permalink
#319: Styling table elements
Browse files Browse the repository at this point in the history
  • Loading branch information
robinpoort committed Jun 7, 2017
1 parent caa2697 commit a0ea604
Show file tree
Hide file tree
Showing 14 changed files with 250 additions and 68 deletions.
24 changes: 23 additions & 1 deletion web/administrator/templates/elysio/css/admin.css

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<td>
<?php echo $client;?>
</td>
<td class="k-table-data-button--override k-table-data--center">
<td class="k-table-data--center">
<?php echo JHtml::_('jgrid.isdefault', $row->published, $i, 'installed.', !$row->published && $canChange);?>
</td>
<td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
<td>
<?php echo JHtml::_('grid.id', $i, $item->lang_id); ?>
</td>
<td class="k-table-data-button--override k-table-data--center">
<td class="k-table-data--center">
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'languages.', $canChange); ?>
</td>
<td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@
<table class="k-js-fixed-table-header k-js-responsive-table">
<thead>
<tr>
<th width="1%">
<th width="1%" class="k-table-data--form">
<?php echo JHtml::_('grid.checkall'); ?>
</th>
<th width="1%">
</th>
<th data-toggle="true">
<th width="1%" class="k-table-data--toggle" data-toggle="true"></th>
<th width="1%"></th>
<th>
<?php echo JHtml::_('searchtools.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?>
</th>
<th data-hide="phone,tablet">
Expand All @@ -74,7 +74,7 @@
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'language', $this->state->get('list.direction'), $this->state->get('list.ordering')); ?>
</th>
<th data-hide="phone,tablet">
<?php echo JHtml::_('searchtools.sort', '', 'a.lft', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
<?php echo JHtml::_('searchtools.sort', '', 'a.lft', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'k-icon-move'); ?>
</th>
</tr>
</thead>
Expand Down Expand Up @@ -114,13 +114,14 @@
}
?>
<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>
<td class="k-table-data--form">
<?php echo JHtml::_('grid.id', $i, $item->id); ?>
</td>
<td class="k-table-data-button--override k-table-data--center">
<td class="k-table-data--toggle"></td>
<td class="k-table-data--center">
<?php echo JHtml::_('MenusHtml.Menus.state', $item->published, $i, $canChange, 'cb'); ?>
</td>
<td class="k-table-data-button--override">
<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, 'items.', $canCheckin); ?>
Expand Down Expand Up @@ -148,7 +149,7 @@
<?php echo $this->escape($item->item_type); ?></span>
</div>
</td>
<td class="k-table-data-button--override k-table-data--center">
<td class="k-table-data--center">
<?php if ($item->type == 'component') : ?>
<?php if ($item->language == '*' || $item->home == '0'):?>
<?php echo JHtml::_('jgrid.isdefault', $item->home, $i, 'items.', ($item->language != '*' || !$item->home) && $canChange);?>
Expand Down
138 changes: 122 additions & 16 deletions web/administrator/templates/elysio/html/com_menus/menus/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,57 +59,163 @@
<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::_('grid.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?>
<?php echo JHtml::_('searchtools.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?>
</th>
<th>
<th width="1%" data-hide="phone,tablet">
<?php echo JText::_('COM_MENUS_HEADING_PUBLISHED_ITEMS'); ?>
</th>
<th width="1%" data-hide="phone,tablet">
<?php echo JText::_('COM_MENUS_HEADING_UNPUBLISHED_ITEMS'); ?>
</th>
<th width="1%" data-hide="phone,tablet,desktop">
<?php echo JText::_('COM_MENUS_HEADING_TRASHED_ITEMS'); ?>
</th>
<th width="1%" data-hide="phone,tablet,desktop">
<?php echo JText::_('COM_MENUS_HEADING_LINKED_MODULES'); ?>
</th>
<th width="1%" data-hide="phone,tablet,desktop">
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
</th>
</tr>
</thead>
<tbody>
<?php foreach ($this->items as $i => $item) : ?>
<?php foreach ($this->items as $i => $item) :
$canEdit = $user->authorise('core.edit', 'com_menus.menu.' . (int) $item->id);
$canManageItems = $user->authorise('core.manage', 'com_menus.menu.' . (int) $item->id);
?>
<tr>
<td class="k-table-data--form">
<?php echo JHtml::_('grid.id', $i, $item->id); ?>
</td>
<td class="k-table-data--toggle"></td>
<td class="k-table-data--ellipsis">
<a href="<?php echo JRoute::_('index.php?option=com_menus&view=items&menutype='.$item->menutype) ?> ">
<?php echo $this->escape($item->title); ?></a>
<small>(<span><?php echo JText::_('COM_MENUS_MENU_MENUTYPE_LABEL') ?></span>
<?php if ($canManageItems) : ?>
<a href="<?php echo JRoute::_('index.php?option=com_menus&view=items&menutype=' . $item->menutype); ?>">
<?php echo $this->escape($item->title); ?></a>
<?php else : ?>
<?php echo $this->escape($item->title); ?>
<?php endif; ?>
<small>
<?php echo JText::_('COM_MENUS_MENU_MENUTYPE_LABEL'); ?>:
<?php if ($canEdit) : ?>
<?php echo '<a href="'.JRoute::_('index.php?option=com_menus&task=menu.edit&id='.$item->id).' title='.$this->escape($item->description).'">'.
$this->escape($item->menutype).'</a>'; ?>)
<a href="<?php echo JRoute::_('index.php?option=com_menus&task=menu.edit&id=' . $item->id); ?>" title="<?php echo $this->escape($item->description); ?>">
<?php echo $this->escape($item->menutype); ?></a>
<?php else : ?>
<?php echo $this->escape($item->menutype)?>)
<?php echo $this->escape($item->menutype); ?>
<?php endif; ?>
</small>
</td>
<td>
<?php if ($canManageItems) : ?>
<a class="k-button k-button--default k-button--small" href="<?php echo JRoute::_('index.php?option=com_menus&view=items&menutype=' . $item->menutype . '&filter[published]=1'); ?>">
<?php echo $item->count_published; ?>
</a>
<?php else : ?>
<?php echo $item->count_published; ?>
<?php endif; ?>
</td>
<td>
<?php if ($canManageItems) : ?>
<a class="k-button k-button--default k-button--small" href="<?php echo JRoute::_('index.php?option=com_menus&view=items&menutype=' . $item->menutype . '&filter[published]=0'); ?>">
<?php echo $item->count_unpublished; ?>
</a>
<?php else : ?>
<?php echo $item->count_unpublished; ?>
<?php endif; ?>
</td>
<td>
<?php if ($canManageItems) : ?>
<a class="k-button k-button--default k-button--small" href="<?php echo JRoute::_('index.php?option=com_menus&view=items&menutype=' . $item->menutype . '&filter[published]=-2'); ?>">
<?php echo $item->count_trashed; ?>
</a>
<?php else : ?>
<?php echo $item->count_trashed; ?>
<?php endif; ?>
</td>
<td>
<?php if (isset($this->modules[$item->menutype])) : ?>
<div class="btn-group">
<a href="#" class="k-button k-button--default k-button--small dropdown-toggle" data-toggle="dropdown">
<?php echo JText::_('COM_MENUS_MODULES') ?>
<b class="caret"></b>
<a href="#" class="k-button k-button--default k-button--small" data-toggle="dropdown">
<?php echo JText::_('COM_MENUS_MODULES'); ?>
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<?php foreach ($this->modules[$item->menutype] as &$module) : ?>
<li>
<?php if ($canEdit) : ?>
<a class="small modal" href="<?php echo JRoute::_('index.php?option=com_modules&task=module.edit&id='.$module->id.'&return='.$return.'&tmpl=component&layout=modal');?>" rel="{handler: 'iframe', size: {x: 1024, y: 450}, onClose: function() {window.location.reload()}}" title="<?php echo JText::_('COM_MENUS_EDIT_MODULE_SETTINGS');?>">
<?php $link = JRoute::_('index.php?option=com_modules&task=module.edit&id=' . $module->id . '&return=' . $return . '&tmpl=component&layout=modal'); ?>
<a href="#moduleEdit<?php echo $module->id; ?>Modal" role="button" class="button" data-toggle="modal" title="<?php echo JText::_('COM_MENUS_EDIT_MODULE_SETTINGS'); ?>">
<?php echo JText::sprintf('COM_MENUS_MODULE_ACCESS_POSITION', $this->escape($module->title), $this->escape($module->access_title), $this->escape($module->position)); ?></a>
<?php else :?>
<?php else : ?>
<?php echo JText::sprintf('COM_MENUS_MODULE_ACCESS_POSITION', $this->escape($module->title), $this->escape($module->access_title), $this->escape($module->position)); ?>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php foreach ($this->modules[$item->menutype] as &$module) : ?>
<?php if ($canEdit) : ?>
<?php $link = JRoute::_('index.php?option=com_modules&task=module.edit&id=' . $module->id . '&return=' . $return . '&tmpl=component&layout=modal'); ?>
<?php echo JHtml::_(
'bootstrap.renderModal',
'moduleEdit' . $module->id . 'Modal',
array(
'title' => JText::_('COM_MENUS_EDIT_MODULE_SETTINGS'),
'backdrop' => 'static',
'keyboard' => false,
'closeButton' => false,
'url' => $link,
'height' => '400px',
'width' => '800px',
'bodyHeight' => '70',
'modalWidth' => '80',
'footer' => '<a type="button" class="btn" data-dismiss="modal" aria-hidden="true"'
. ' onclick="jQuery(\'#moduleEdit' . $module->id . 'Modal iframe\').contents().find(\'#closeBtn\').click();">'
. JText::_("JLIB_HTML_BEHAVIOR_CLOSE") . '</a>'
. '<button type="button" class="btn btn-primary" aria-hidden="true"'
. ' onclick="jQuery(\'#moduleEdit' . $module->id . 'Modal iframe\').contents().find(\'#saveBtn\').click();">'
. JText::_("JSAVE") . '</button>'
. '<button type="button" class="btn btn-success" aria-hidden="true"'
. ' onclick="jQuery(\'#moduleEdit' . $module->id . 'Modal iframe\').contents().find(\'#applyBtn\').click();">'
. JText::_("JAPPLY") . '</button>',
)
); ?>
<?php endif; ?>
<?php endforeach; ?>
<?php elseif ($modMenuId) : ?>
<a href="<?php echo JRoute::_('index.php?option=com_modules&task=module.add&eid=' . $modMenuId . '&params[menutype]='.$item->menutype); ?>">
<?php echo JText::_('COM_MENUS_ADD_MENU_MODULE'); ?></a>
<?php $link = JRoute::_('index.php?option=com_modules&task=module.add&eid=' . $modMenuId . '&params[menutype]=' . $item->menutype . '&tmpl=component&layout=modal'); ?>
<a class="btn btn-small btn-primary" data-toggle="modal" role="button" href="#moduleAddModal"><?php echo JText::_('COM_MENUS_ADD_MENU_MODULE'); ?></a>
<?php echo JHtml::_(
'bootstrap.renderModal',
'moduleAddModal',
array(
'title' => JText::_('COM_MENUS_ADD_MENU_MODULE'),
'backdrop' => 'static',
'keyboard' => false,
'closeButton' => false,
'url' => $link,
'height' => '400px',
'width' => '800px',
'bodyHeight' => '70',
'modalWidth' => '80',
'footer' => '<a type="button" class="btn" data-dismiss="modal" aria-hidden="true"'
. ' onclick="jQuery(\'#moduleAddModal iframe\').contents().find(\'#closeBtn\').click();">'
. JText::_("JLIB_HTML_BEHAVIOR_CLOSE") . '</a>'
. '<button type="button" class="btn btn-primary" aria-hidden="true"'
. ' onclick="jQuery(\'#moduleAddModal iframe\').contents().find(\'#saveBtn\').click();">'
. JText::_("JSAVE") . '</button>'
. '<button type="button" class="btn btn-success" aria-hidden="true"'
. ' onclick="jQuery(\'#moduleAddModal iframe\').contents().find(\'#applyBtn\').click();">'
. JText::_("JAPPLY") . '</button>',
)
); ?>
<?php endif; ?>
</td>
<td>
<?php echo $item->id; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
<td>
<?php echo JHtml::_('grid.id', $i, $item->id); ?>
</td>
<td class="k-table-data-button--override">
<td>
<div class="btn-group" style="width: 36px;">
<?php echo JHtml::_('modules.state', $item->published, $i, $canChange, 'cb'); ?>
<?php
Expand All @@ -166,9 +166,7 @@
<td class="has-context">
<div class="pull-left">
<?php if ($item->checked_out) : ?>
<span class="k-table-data-button--override">
<?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'modules.', $canCheckin); ?>
</span>
<?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'modules.', $canCheckin); ?>
<?php endif; ?>
<?php if ($canEdit) : ?>
<a href="<?php echo JRoute::_('index.php?option=com_modules&task=module.edit&id='.(int) $item->id); ?>">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
<td>
<?php echo JHtml::_('grid.id', $i, $item->extension_id); ?>
</td>
<td class="k-table-data-button--override">
<td>
<?php echo JHtml::_('jgrid.published', $item->enabled, $i, 'plugins.', $canChange); ?>
</td>
<td>
Expand Down
Loading

0 comments on commit a0ea604

Please sign in to comment.