Skip to content

Commit

Permalink
Add lang flas to menuitems, content, featured, categories and modules
Browse files Browse the repository at this point in the history
  • Loading branch information
andrepereiradasilva committed Dec 30, 2015
1 parent 27e0535 commit d7541cf
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ protected function getListQuery()
$query->from('#__categories AS a');

// Join over the language
$query->select('l.title AS language_title')
$query->select('l.title AS language_title, l.image as image')
->join('LEFT', $db->quoteName('#__languages') . ' AS l ON l.lang_code = a.language');

// Join over the users for the checked out user.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
<?php echo JHtml::_('searchtools.sort', 'COM_CATEGORY_HEADING_ASSOCIATION', 'association', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<th width="5%" class="nowrap hidden-phone">
<th width="10%" class="nowrap hidden-phone">
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'language', $this->state->get('list.direction'), $this->state->get('list.ordering')); ?>
</th>
<th width="1%" class="nowrap hidden-phone">
Expand Down Expand Up @@ -230,7 +230,7 @@
<?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 echo $item->language_title ? JHtml::_('image', 'mod_languages/' . $item->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">
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_content/models/articles.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ protected function getListQuery()
$query->from('#__content AS a');

// Join over the language
$query->select('l.title AS language_title')
$query->select('l.title AS language_title, l.image as image')
->join('LEFT', $db->quoteName('#__languages') . ' AS l ON l.lang_code = a.language');

// Join over the users for the checked out user.
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_content/models/featured.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ protected function getListQuery($resolveFKs = true)
$query->from('#__content AS a');

// Join over the language
$query->select('l.title AS language_title')
$query->select('l.title AS language_title, l.image as image')
->join('LEFT', $db->quoteName('#__languages') . ' AS l ON l.lang_code = a.language');

// Join over the content table.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
<th width="10%" class="nowrap hidden-phone">
<?php echo JHtml::_('searchtools.sort', 'JAUTHOR', 'a.created_by', $listDirn, $listOrder); ?>
</th>
<th width="5%" class="nowrap hidden-phone">
<th width="10%" class="nowrap hidden-phone">
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'language', $listDirn, $listOrder); ?>
</th>
<th width="10%" class="nowrap hidden-phone">
Expand Down Expand Up @@ -197,7 +197,7 @@
<?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 echo $item->language_title ? JHtml::_('image', 'mod_languages/' . $item->image . '.gif', $item->language_title, array('title' => $item->language_title), true) . '&nbsp;' . $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?>
<?php endif;?>
</td>
<td class="nowrap small hidden-phone">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<th width="10%" class="nowrap hidden-phone">
<?php echo JHtml::_('searchtools.sort', 'JAUTHOR', 'a.created_by', $listDirn, $listOrder); ?>
</th>
<th width="5%" class="nowrap hidden-phone">
<th width="10%" class="nowrap hidden-phone">
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'language', $listDirn, $listOrder); ?>
</th>
<th width="10%" class="nowrap hidden-phone">
Expand Down Expand Up @@ -175,7 +175,7 @@
<?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 echo $item->language_title ? JHtml::_('image', 'mod_languages/' . $item->image . '.gif', $item->language_title, array('title' => $item->language_title), true) . '&nbsp;' . $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?>
<?php endif;?>
</td>
<td class="nowrap small hidden-phone">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
<?php echo JHtml::_('searchtools.sort', 'COM_MENUS_HEADING_ASSOCIATION', 'association', $listDirn, $listOrder); ?>
</th>
<?php endif;?>
<th width="5%" class="nowrap hidden-phone">
<th width="10%" class="nowrap hidden-phone">
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'language', $this->state->get('list.direction'), $this->state->get('list.ordering')); ?>
</th>
<th width="1%" class="nowrap hidden-phone">
Expand Down Expand Up @@ -216,7 +216,7 @@
<?php elseif ($item->language == '*') : ?>
<?php echo JText::alt('JALL', 'language'); ?>
<?php else : ?>
<?php echo $item->language_title ? $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?>
<?php echo $item->language_title ? JHtml::_('image', 'mod_languages/' . $item->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">
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_modules/models/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ protected function getListQuery()
$query->from($db->quoteName('#__modules') . ' AS a');

// Join over the language
$query->select('l.title AS language_title')
$query->select('l.title AS language_title, l.image as image')
->join('LEFT', $db->quoteName('#__languages') . ' AS l ON l.lang_code = a.language');

// Join over the users for the checked out user.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<th width="10%" class="nowrap hidden-phone">
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_ACCESS', 'a.access', $listDirn, $listOrder); ?>
</th>
<th width="5%" class="nowrap hidden-phone">
<th width="10%" class="nowrap hidden-phone">
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'language_title', $listDirn, $listOrder); ?>
</th>
<th width="1%" class="nowrap center hidden-phone">
Expand Down Expand Up @@ -181,7 +181,7 @@
<?php elseif ($item->language == '*'):?>
<?php echo JText::alt('JALL', 'language'); ?>
<?php else:?>
<?php echo $item->language_title ? $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?>
<?php echo $item->language_title ? JHtml::_('image', 'mod_languages/' . $item->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">
Expand Down

0 comments on commit d7541cf

Please sign in to comment.