Skip to content

Commit

Permalink
Merge pull request #32 from C-Lodder/views
Browse files Browse the repository at this point in the history
BS4 views (Part 1)
  • Loading branch information
C-Lodder authored Oct 4, 2016
2 parents ae8edde + 0e73761 commit 7d00630
Show file tree
Hide file tree
Showing 178 changed files with 1,284 additions and 1,582 deletions.
4 changes: 2 additions & 2 deletions administrator/components/com_admin/helpers/html/directory.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ public static function writable($writable)
{
if ($writable)
{
return '<span class="badge badge-success">' . JText::_('COM_ADMIN_WRITABLE') . '</span>';
return '<span class="tag tag-success">' . JText::_('COM_ADMIN_WRITABLE') . '</span>';
}

return '<span class="badge badge-important">' . JText::_('COM_ADMIN_UNWRITABLE') . '</span>';
return '<span class="tag tag-danger">' . JText::_('COM_ADMIN_UNWRITABLE') . '</span>';
}

/**
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_admin/models/sysinfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ public function &getPHPInfo()
$output = preg_replace('#<table[^>]*>#', '<table class="table table-striped adminlist">', $output[1][0]);
$output = preg_replace('#(\w),(\w)#', '\1, \2', $output);
$output = preg_replace('#<hr />#', '', $output);
$output = str_replace('<div class="center">', '', $output);
$output = str_replace('<div class="text-xs-center">', '', $output);
$output = preg_replace('#<tr class="h">(.*)<\/tr>#', '<thead><tr class="h">$1</tr></thead><tbody>', $output);
$output = str_replace('</table>', '</tbody></table>', $output);
$output = str_replace('</div>', '', $output);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
$fieldsets = $this->form->getFieldsets();
?>

<form action="<?php echo JRoute::_('index.php?option=com_admin&view=profile&layout=edit&id=' . $this->item->id); ?>" method="post" name="adminForm" id="profile-form" class="form-validate form-horizontal" enctype="multipart/form-data">
<form action="<?php echo JRoute::_('index.php?option=com_admin&view=profile&layout=edit&id=' . $this->item->id); ?>" method="post" name="adminForm" id="profile-form" enctype="multipart/form-data">
<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'account')); ?>

<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'account', JText::_('COM_ADMIN_USER_ACCOUNT_DETAILS')); ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<form action="<?php echo JRoute::_('index.php?option=com_admin&view=sysinfo'); ?>" method="post" name="adminForm" id="adminForm">
<div class="row">
<!-- Begin Content -->
<?php // Begin Content ?>
<div class="col-md-12">
<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'site')); ?>

Expand Down Expand Up @@ -43,6 +43,6 @@
</div>
<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>
<!-- End Content -->
<?php // End Content ?>
</div>
</form>
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

<?php echo JLayoutHelper::render('joomla.edit.title_alias', $this); ?>

<div class="form-horizontal">
<div>
<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'details')); ?>

<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'details', JText::_('COM_BANNERS_BANNER_DETAILS')); ?>
Expand Down Expand Up @@ -79,7 +79,7 @@
<?php echo JHtml::_('bootstrap.endTab'); ?>

<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'publishing', JText::_('JGLOBAL_FIELDSET_PUBLISHING')); ?>
<div class="row form-horizontal-desktop">
<div class="row">
<div class="col-md-6">
<?php echo JLayoutHelper::render('joomla.edit.publishingdata', $this); ?>
</div>
Expand Down
48 changes: 20 additions & 28 deletions administrator/components/com_banners/views/banners/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,41 +38,41 @@
echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this));
?>
<?php if (empty($this->items)) : ?>
<div class="alert alert-no-items">
<div class="alert alert-warning alert-no-items">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php else : ?>
<table class="table table-striped" id="articleList">
<thead>
<tr>
<th width="1%" class="nowrap center hidden-phone">
<th width="1%" class="nowrap text-xs-center hidden-sm-down">
<?php echo JHtml::_('searchtools.sort', '', 'a.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
</th>
<th width="1%" class="center">
<th width="1%" class="text-xs-center">
<?php echo JHtml::_('grid.checkall'); ?>
</th>
<th width="1%" class="nowrap center">
<th width="1%" class="nowrap text-xs-center">
<?php echo JHtml::_('searchtools.sort', 'JSTATUS', 'a.state', $listDirn, $listOrder); ?>
</th>
<th>
<?php echo JHtml::_('searchtools.sort', 'COM_BANNERS_HEADING_NAME', 'a.name', $listDirn, $listOrder); ?>
</th>
<th width="1%" class="nowrap center hidden-phone">
<th width="1%" class="nowrap text-xs-center hidden-sm-down">
<?php echo JHtml::_('searchtools.sort', 'COM_BANNERS_HEADING_STICKY', 'a.sticky', $listDirn, $listOrder); ?>
</th>
<th width="10%" class="nowrap hidden-phone">
<th width="10%" class="nowrap hidden-sm-down">
<?php echo JHtml::_('searchtools.sort', 'COM_BANNERS_HEADING_CLIENT', 'client_name', $listDirn, $listOrder); ?>
</th>
<th width="10%" class="nowrap hidden-phone">
<th width="10%" class="nowrap hidden-sm-down">
<?php echo JHtml::_('searchtools.sort', 'COM_BANNERS_HEADING_IMPRESSIONS', 'impmade', $listDirn, $listOrder); ?>
</th>
<th width="10%" class="nowrap hidden-phone">
<th width="10%" class="nowrap hidden-sm-down">
<?php echo JHtml::_('searchtools.sort', 'COM_BANNERS_HEADING_CLICKS', 'clicks', $listDirn, $listOrder); ?>
</th>
<th width="10%" class="nowrap hidden-phone">
<th width="10%" class="nowrap hidden-sm-down">
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'a.language', $listDirn, $listOrder); ?>
</th>
<th width="1%" class="nowrap hidden-phone">
<th width="1%" class="nowrap hidden-sm-down">
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
</th>
</tr>
Expand All @@ -94,7 +94,7 @@
$canChange = $user->authorise('core.edit.state', 'com_banners.category.' . $item->catid) && $canCheckin;
?>
<tr class="row<?php echo $i % 2; ?>" sortable-group-id="<?php echo $item->catid; ?>">
<td class="order nowrap center hidden-phone">
<td class="order nowrap text-xs-center hidden-sm-down">
<?php
$iconClass = '';

Expand All @@ -115,24 +115,16 @@
value="<?php echo $item->ordering; ?>" class="width-20 text-area-order " />
<?php endif; ?>
</td>
<td class="center">
<td class="text-xs-center">
<?php echo JHtml::_('grid.id', $i, $item->id); ?>
</td>
<td class="center">
<td class="text-xs-center">
<div class="btn-group">
<?php echo JHtml::_('jgrid.published', $item->state, $i, 'banners.', $canChange, 'cb', $item->publish_up, $item->publish_down); ?>
<?php // Create dropdown items and render the dropdown list.
if ($canChange)
{
JHtml::_('actionsdropdown.' . ((int) $item->state === 2 ? 'un' : '') . 'archive', 'cb' . $i, 'banners');
JHtml::_('actionsdropdown.' . ((int) $item->state === -2 ? 'un' : '') . 'trash', 'cb' . $i, 'banners');
echo JHtml::_('actionsdropdown.render', $this->escape($item->name));
}
?>
</div>
</td>
<td class="nowrap has-context">
<div class="pull-left">
<div class="pull-xs-left">
<?php if ($item->checked_out) : ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'banners.', $canCheckin); ?>
<?php endif; ?>
Expand All @@ -150,28 +142,28 @@
</div>
</div>
</td>
<td class="center hidden-phone">
<td class="text-xs-center hidden-sm-down">
<?php echo JHtml::_('banner.pinned', $item->sticky, $i, $canChange); ?>
</td>
<td class="small hidden-phone">
<td class="small hidden-sm-down">
<?php echo $item->client_name; ?>
</td>
<td class="small hidden-phone">
<td class="small hidden-sm-down">
<?php echo JText::sprintf('COM_BANNERS_IMPRESSIONS', $item->impmade, $item->imptotal ? $item->imptotal : JText::_('COM_BANNERS_UNLIMITED')); ?>
</td>
<td class="small hidden-phone">
<td class="small hidden-sm-down">
<?php echo $item->clicks; ?> -
<?php echo sprintf('%.2f%%', $item->impmade ? 100 * $item->clicks / $item->impmade : 0); ?>
</td>

<td class="small nowrap hidden-phone">
<td class="small nowrap hidden-sm-down">
<?php if ($item->language == '*'): ?>
<?php echo JText::alt('JALL', 'language'); ?>
<?php else: ?>
<?php echo $item->language_title ? JHtml::_('image', 'mod_languages/' . $item->language_image . '.gif', $item->language_title, array('title' => $item->language_title), true) . '&nbsp;' . $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?>
<?php endif; ?>
</td>
<td class="hidden-phone">
<td class="hidden-sm-down">
<?php echo $item->id; ?>
</td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<?php echo JLayoutHelper::render('joomla.edit.title_alias', $this); ?>

<div class="form-horizontal">
<div>
<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'general')); ?>

<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'general', empty($this->item->id) ? JText::_('COM_BANNERS_NEW_CLIENT') : JText::_('COM_BANNERS_EDIT_CLIENT')); ?>
Expand Down
57 changes: 24 additions & 33 deletions administrator/components/com_banners/views/clients/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,41 +31,41 @@
echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this));
?>
<?php if (empty($this->items)) : ?>
<div class="alert alert-no-items">
<div class="alert alert-warning alert-no-items">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php else : ?>
<table class="table table-striped">
<thead>
<tr>
<th width="1%" class="center">
<th width="1%" class="text-xs-center">
<?php echo JHtml::_('grid.checkall'); ?>
</th>
<th width="5%" class="nowrap center">
<th width="5%" class="nowrap text-xs-center">
<?php echo JHtml::_('searchtools.sort', 'JSTATUS', 'a.state', $listDirn, $listOrder); ?>
</th>
<th>
<?php echo JHtml::_('searchtools.sort', 'COM_BANNERS_HEADING_CLIENT', 'a.name', $listDirn, $listOrder); ?>
</th>
<th width="20%" class="hidden-phone">
<th width="20%" class="hidden-sm-down">
<?php echo JHtml::_('searchtools.sort', 'COM_BANNERS_HEADING_CONTACT', 'a.contact', $listDirn, $listOrder); ?>
</th>
<th width="1%" class="nowrap center hidden-phone hidden-tablet">
<th width="1%" class="nowrap text-xs-center hidden-sm-down">
<i class="icon-publish hasTooltip" title="<?php echo JText::_('COM_BANNERS_COUNT_PUBLISHED_ITEMS'); ?>"></i>
</th>
<th width="1%" class="nowrap center hidden-phone hidden-tablet">
<th width="1%" class="nowrap text-xs-center hidden-sm-down">
<i class="icon-unpublish hasTooltip" title="<?php echo JText::_('COM_BANNERS_COUNT_UNPUBLISHED_ITEMS'); ?>"></i>
</th>
<th width="1%" class="nowrap center hidden-phone hidden-tablet">
<th width="1%" class="nowrap text-xs-center hidden-sm-down">
<i class="icon-archive hasTooltip" title="<?php echo JText::_('COM_BANNERS_COUNT_ARCHIVED_ITEMS'); ?>"></i>
</th>
<th width="1%" class="nowrap center hidden-phone hidden-tablet">
<th width="1%" class="nowrap text-xs-center hidden-sm-down">
<i class="icon-trash hasTooltip" title="<?php echo JText::_('COM_BANNERS_COUNT_TRASHED_ITEMS'); ?>"></i>
</th>
<th width="10%" class="nowrap hidden-phone">
<th width="10%" class="nowrap hidden-sm-down">
<?php echo JHtml::_('searchtools.sort', 'COM_BANNERS_HEADING_PURCHASETYPE', 'a.purchase_type', $listDirn, $listOrder); ?>
</th>
<th width="1%" class="nowrap hidden-phone">
<th width="1%" class="nowrap hidden-sm-down">
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
</th>
</tr>
Expand All @@ -85,25 +85,16 @@
$canChange = $user->authorise('core.edit.state', 'com_banners') && $canCheckin;
?>
<tr class="row<?php echo $i % 2; ?>">
<td class="center">
<td class="text-xs-center">
<?php echo JHtml::_('grid.id', $i, $item->id); ?>
</td>
<td class="center">
<td class="text-xs-center">
<div class="btn-group">
<?php echo JHtml::_('jgrid.published', $item->state, $i, 'clients.', $canChange); ?>
<?php // Create dropdown items and render the dropdown list.

if ($canChange)
{
JHtml::_('actionsdropdown.' . ((int) $item->state === 2 ? 'un' : '') . 'archive', 'cb' . $i, 'clients');
JHtml::_('actionsdropdown.' . ((int) $item->state === -2 ? 'un' : '') . 'trash', 'cb' . $i, 'clients');
echo JHtml::_('actionsdropdown.render', $this->escape($item->name));
}
?>
</div>
</td>
<td class="nowrap has-context">
<div class="pull-left">
<div class="pull-xs-left">
<?php if ($item->checked_out) : ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'clients.', $canCheckin); ?>
<?php endif; ?>
Expand All @@ -115,33 +106,33 @@
<?php endif; ?>
</div>
</td>
<td class="small hidden-phone">
<td class="small hidden-sm-down">
<?php echo $item->contact; ?>
</td>
<td class="center btns hidden-phone hidden-tablet">
<a class="badge <?php if ($item->count_published > 0) echo "badge-success"; ?>" href="<?php echo JRoute::_('index.php?option=com_banners&view=banners&filter[client_id]=' . (int) $item->id . '&filter[published]=1'); ?>">
<td class="text-xs-center btns hidden-sm-down">
<a class="tag <?php if ($item->count_published > 0) echo "tag-success"; ?>" href="<?php echo JRoute::_('index.php?option=com_banners&view=banners&filter[client_id]=' . (int) $item->id . '&filter[published]=1'); ?>">
<?php echo $item->count_published; ?></a>
</td>
<td class="center btns hidden-phone hidden-tablet">
<a class="badge <?php if ($item->count_unpublished > 0) echo "badge-important"; ?>" href="<?php echo JRoute::_('index.php?option=com_banners&view=banners&filter[client_id]=' . (int) $item->id . '&filter[published]=0'); ?>">
<td class="text-xs-center btns hidden-sm-down">
<a class="tag <?php if ($item->count_unpublished > 0) echo "tag-danger"; ?>" href="<?php echo JRoute::_('index.php?option=com_banners&view=banners&filter[client_id]=' . (int) $item->id . '&filter[published]=0'); ?>">
<?php echo $item->count_unpublished; ?></a>
</td>
<td class="center btns hidden-phone hidden-tablet">
<a class="badge <?php if ($item->count_archived > 0) echo "badge-info"; ?>" href="<?php echo JRoute::_('index.php?option=com_banners&view=banners&filter[client_id]=' . (int) $item->id . '&filter[published]=2'); ?>">
<td class="text-xs-center btns hidden-sm-down">
<a class="tag <?php if ($item->count_archived > 0) echo "tag-info"; ?>" href="<?php echo JRoute::_('index.php?option=com_banners&view=banners&filter[client_id]=' . (int) $item->id . '&filter[published]=2'); ?>">
<?php echo $item->count_archived; ?></a>
</td>
<td class="center btns hidden-phone hidden-tablet">
<a class="badge <?php if ($item->count_trashed > 0) echo "badge-inverse"; ?>" href="<?php echo JRoute::_('index.php?option=com_banners&view=banners&filter[client_id]=' . (int) $item->id . '&filter[published]=-2'); ?>">
<td class="text-xs-center btns hidden-sm-down">
<a class="tag <?php if ($item->count_trashed > 0) echo "tag-inverse"; ?>" href="<?php echo JRoute::_('index.php?option=com_banners&view=banners&filter[client_id]=' . (int) $item->id . '&filter[published]=-2'); ?>">
<?php echo $item->count_trashed; ?></a>
</td>
<td class="small hidden-phone">
<td class="small hidden-sm-down">
<?php if ($item->purchase_type < 0): ?>
<?php echo JText::sprintf('COM_BANNERS_DEFAULT', JText::_('COM_BANNERS_FIELD_VALUE_' . $params->get('purchase_type'))); ?>
<?php else: ?>
<?php echo JText::_('COM_BANNERS_FIELD_VALUE_' . $item->purchase_type); ?>
<?php endif; ?>
</td>
<td class="hidden-phone">
<td class="hidden-sm-down">
<?php echo $item->id; ?>
</td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<?php endif;?>
<?php echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?>
<?php if (empty($this->items)) : ?>
<div class="alert alert-no-items">
<div class="alert alert-warning alert-no-items">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php else : ?>
Expand All @@ -39,13 +39,13 @@
<th width="20%" class="nowrap">
<?php echo JHtml::_('searchtools.sort', 'COM_BANNERS_HEADING_CLIENT', 'cl.name', $listDirn, $listOrder); ?>
</th>
<th width="10%" class="nowrap hidden-phone">
<th width="10%" class="nowrap hidden-sm-down">
<?php echo JHtml::_('searchtools.sort', 'COM_BANNERS_HEADING_TYPE', 'a.track_type', $listDirn, $listOrder); ?>
</th>
<th width="10%" class="nowrap hidden-phone">
<th width="10%" class="nowrap hidden-sm-down">
<?php echo JHtml::_('searchtools.sort', 'COM_BANNERS_HEADING_COUNT', 'a.count', $listDirn, $listOrder); ?>
</th>
<th width="10%" class="nowrap hidden-phone">
<th width="10%" class="nowrap hidden-sm-down">
<?php echo JHtml::_('searchtools.sort', 'JDATE', 'a.track_date', $listDirn, $listOrder); ?>
</th>
</tr>
Expand All @@ -69,13 +69,13 @@
<td>
<?php echo $item->client_name; ?>
</td>
<td class="small hidden-phone">
<td class="small hidden-sm-down">
<?php echo $item->track_type == 1 ? JText::_('COM_BANNERS_IMPRESSION') : JText::_('COM_BANNERS_CLICK'); ?>
</td>
<td class="hidden-phone">
<td class="hidden-sm-down">
<?php echo $item->count; ?>
</td>
<td class="hidden-phone">
<td class="hidden-sm-down">
<?php echo JHtml::_('date', $item->track_date, JText::_('DATE_FORMAT_LC4') . ' H:i'); ?>
</td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
type="limitbox"
label="JGLOBAL_LIMIT"
description="JGLOBAL_LIMIT"
class="input-mini"
class="form-control-sm"
default="25"
onchange="this.form.submit();"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<table class="table table-striped">
<thead>
<tr>
<th width="1%" class="nowrap center">
<th width="1%" class="nowrap text-xs-center">
<?php echo JHtml::_('grid.checkall'); ?>
</th>
<th class="title nowrap">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public static function association($catid, $extension = 'com_content')
$text,
$url,
null,
'hasTooltip label label-association label-' . $item->lang_sef
'hasTooltip tag tag-association tag-' . $item->lang_sef
);
}
}
Expand Down
Loading

0 comments on commit 7d00630

Please sign in to comment.