32
1
mirror of https://github.com/joomla-extensions/weblinks.git synced 2025-01-27 22:38:28 +00:00

Update view.html.php (#234)

* Update view.html.php

* Update edit_params.php

* Update view.html.php

* Update default.php

* Update view.html.php

* Update view.html.php
This commit is contained in:
zero-24 2016-07-03 12:04:21 +02:00 committed by Chris Davenport
parent 276c32922e
commit 8688bfd9cc
4 changed files with 37 additions and 28 deletions

View File

@ -9,15 +9,12 @@
defined('_JEXEC') or die;
$fieldSets = $this->form->getFieldsets('params');
foreach ($fieldSets as $name => $fieldSet) :
?>
$fieldSets = $this->form->getFieldsets('params'); ?>
<?php foreach ($fieldSets as $name => $fieldSet) : ?>
<div class="tab-pane" id="params-<?php echo $name; ?>">
<?php
if (isset($fieldSet->description) && trim($fieldSet->description)) :
echo '<p class="alert alert-info">'.$this->escape(JText::_($fieldSet->description)).'</p>';
endif;
?>
<?php if (isset($fieldSet->description) && trim($fieldSet->description)) : ?>
<?php echo '<p class="alert alert-info">' . $this->escape(JText::_($fieldSet->description)) . '</p>'; ?>
<?php endif; ?>
<?php foreach ($this->form->getFieldset($name) as $field) : ?>
<div class="control-group">
<div class="control-label"><?php echo $field->label; ?></div>

View File

@ -23,7 +23,11 @@ class WeblinksViewWeblink extends JViewLegacy
protected $form;
/**
* Display the view
* Display the view.
*
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return mixed A string if successful, otherwise an Error object.
*/
public function display($tpl = null)
{
@ -35,16 +39,20 @@ class WeblinksViewWeblink extends JViewLegacy
if (count($errors = $this->get('Errors')))
{
JError::raiseError(500, implode("\n", $errors));
return false;
}
$this->addToolbar();
parent::display($tpl);
}
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 1.6
*/
protected function addToolbar()

View File

@ -23,9 +23,11 @@ class WeblinksViewWeblinks extends JViewLegacy
protected $state;
/**
* Display the view
* Display the view.
*
* @return void
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return mixed A string if successful, otherwise an Error object.
*/
public function display($tpl = null)
{
@ -52,6 +54,8 @@ class WeblinksViewWeblinks extends JViewLegacy
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 1.6
*/
protected function addToolbar()