Revert "test"

This reverts commit efdd2d1845.
This commit is contained in:
Hristo Dipchikov 2016-08-08 09:13:31 +03:00
parent 1e7f13e315
commit 5562c16a67
3 changed files with 12 additions and 13 deletions

View File

@ -45,7 +45,7 @@ class pluginLatestPosts extends Plugin {
foreach($posts as $Post) foreach($posts as $Post)
{ {
$html .= '<li class="plugin-title">'; $html .= '<li>';
$html .= '<a href="'.$Post->permalink().'">'.$Post->title().'</a>'; $html .= '<a href="'.$Post->permalink().'">'.$Post->title().'</a>';
$html .= '</li>'; $html .= '</li>';
} }

View File

@ -5,7 +5,7 @@ class pluginPages extends Plugin {
public function init() public function init()
{ {
$this->dbFields = array( $this->dbFields = array(
'homeLink'=>1, 'homeLink'=>true,
'label'=>'Pages' 'label'=>'Pages'
); );
} }
@ -20,8 +20,7 @@ class pluginPages extends Plugin {
$html .= '</div>'; $html .= '</div>';
$html .= '<div>'; $html .= '<div>';
$html .= '<input type="hidden" name="homeLink" value="0">'; $html .= '<input name="homeLink" id="jshomeLink" type="checkbox" value="true" '.($this->getDbField('homeLink')?'checked':'').'>';
$html .= '<input name="homeLink" id="jshomeLink" type="checkbox" value="1" '.($this->getDbField('homeLink')?'checked':'').'>';
$html .= '<label class="forCheckbox" for="jshomeLink">'.$Language->get('Show home link').'</label>'; $html .= '<label class="forCheckbox" for="jshomeLink">'.$Language->get('Show home link').'</label>';
$html .= '</div>'; $html .= '</div>';
@ -39,15 +38,15 @@ class pluginPages extends Plugin {
// Print the label if not empty. // Print the label if not empty.
$label = $this->getDbField('label'); $label = $this->getDbField('label');
if( !empty($label) ) { if( !empty($label) ) {
$html .= '<h2 class="plugin-title">'.$label.'</h2>'; $html .= '<h2>'.$label.'</h2>';
} }
$html .= '<div class="plugin-content">'; $html .= '<div class="plugin-content">';
$html .= '<ul class="parents">'; $html .= '<ul>';
// Show home link ? // Show home link ?
if($this->getDbField('homeLink')) { if($this->getDbField('homeLink')) {
$html .= '<li class="plugin-title">'; $html .= '<li>';
$html .= '<a class="parent'.( ($Url->whereAmI()=='home')?' active':'').'" href="'.$Site->homeLink().'">'.$Language->get('Home').'</a>'; $html .= '<a class="parent'.( ($Url->whereAmI()=='home')?' active':'').'" href="'.$Site->homeLink().'">'.$Language->get('Home').'</a>';
$html .= '</li>'; $html .= '</li>';
} }
@ -59,8 +58,8 @@ class pluginPages extends Plugin {
if( $parent->published() ) if( $parent->published() )
{ {
// Print the parent // Print the parent
$html .= '<li class="plugin-title">'; $html .= '<li>';
$html .= '<a class="parent'.( ($parent->key()==$Url->slug())?' active':'').'" href="'.$parent->permalink().'">'.$parent->title().'</a>'; $html .= '<a class="parent '.( ($parent->key()==$Url->slug())?' active':'').'" href="'.$parent->permalink().'">'.$parent->title().'</a>';
// Check if the parent has children // Check if the parent has children
if(isset($pagesParents[$parent->key()])) if(isset($pagesParents[$parent->key()]))

View File

@ -1,10 +1,10 @@
{ {
"author": "Bludit", "author": "Bludit",
"email": "", "email": "",
"website": "https://plugins.bludit.com", "website": "https://github.com/dignajar/bludit-plugins",
"version": "1.4", "version": "1.1",
"releaseDate": "2016-05-28", "releaseDate": "2016-02-13",
"license": "MIT", "license": "MIT",
"compatible": "1.5beta", "requires": "Bludit v1.1",
"notes": "" "notes": ""
} }