Remove invalid span, plugin fixes
This commit is contained in:
parent
bfd75a5ae8
commit
df5fd34dde
|
@ -12,7 +12,7 @@
|
|||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'new-content' ?>"><?php $L->p('New content') ?></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'content' ?>"></span><?php $L->p('Content') ?></a>
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'content' ?>"><?php $L->p('Content') ?></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'categories' ?>"><?php $L->p('Categories') ?></a>
|
||||
|
|
|
@ -28,7 +28,7 @@ class Theme {
|
|||
|
||||
public static function rssUrl()
|
||||
{
|
||||
if (pluginEnabled('pluginRSS')) {
|
||||
if (pluginActivated('pluginRSS')) {
|
||||
return DOMAIN_BASE.'rss.xml';
|
||||
}
|
||||
return false;
|
||||
|
@ -36,7 +36,7 @@ class Theme {
|
|||
|
||||
public static function sitemapUrl()
|
||||
{
|
||||
if (pluginEnabled('pluginSitemap')) {
|
||||
if (pluginActivated('pluginSitemap')) {
|
||||
return DOMAIN_BASE.'sitemap.xml';
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -64,55 +64,58 @@ class pluginLinks extends Plugin {
|
|||
{
|
||||
global $L;
|
||||
|
||||
$html = '<div>';
|
||||
$html = '<div class="alert alert-primary" role="alert">';
|
||||
$html .= $this->description();
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('Label').'</label>';
|
||||
$html .= '<input name="label" type="text" value="'.$this->getValue('label').'">';
|
||||
$html .= '<input name="label" class="form-control" type="text" value="'.$this->getValue('label').'">';
|
||||
$html .= '<span class="tip">'.$L->get('This title is almost always used in the sidebar of the site').'</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<button name="save" class="btn btn-primary" type="submit">'.$L->get('Save').'</button>';
|
||||
$html .= '<button name="save" class="btn btn-primary my-2" type="submit">'.$L->get('Save').'</button>';
|
||||
$html .= '</div>';
|
||||
|
||||
// New link, when the user click on save button this call the method post()
|
||||
// and the new link is added to the database
|
||||
$html .= '<legend>'.$L->get('Add a new link').'</legend>';
|
||||
$html .= '<h4 class="mt-3">'.$L->get('Add a new link').'</h4>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('Name').'</label>';
|
||||
$html .= '<input name="linkName" type="text" value="">';
|
||||
$html .= '<input name="linkName" type="text" class="form-control" value="" placeholder="Bludit">';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('Url').'</label>';
|
||||
$html .= '<input name="linkURL" type="text" value="">';
|
||||
$html .= '<input name="linkURL" type="text" class="form-control" value="" placeholder="https://www.bludit.com/">';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<button name="addLink" class="blue" type="submit">'.$L->get('Add').'</button>';
|
||||
$html .= '<button name="addLink" class="btn btn-primary my-2" type="submit">'.$L->get('Add').'</button>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<legend>'.$L->get('Links').'</legend>';
|
||||
|
||||
// Get the JSON DB, getValue() with the option unsanitized HTML code
|
||||
$jsondb = $this->getValue('jsondb', $unsanitized=false);
|
||||
$links = json_decode($jsondb, true);
|
||||
|
||||
$html .= !empty($links) ? '<h4 class="mt-3">'.$L->get('Links').'</h4>' : '';
|
||||
|
||||
foreach($links as $name=>$url) {
|
||||
$html .= '<div>';
|
||||
$html .= '<div class="my-2">';
|
||||
$html .= '<label>'.$L->get('Name').'</label>';
|
||||
$html .= '<input type="text" value="'.$name.'" disabled>';
|
||||
$html .= '<input type="text" class="form-control" value="'.$name.'" disabled>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('Url').'</label>';
|
||||
$html .= '<input type="text" value="'.$url.'" disabled>';
|
||||
$html .= '<input type="text" class="form-control" value="'.$url.'" disabled>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<button name="deleteLink" type="submit" value="'.$name.'">'.$L->get('Delete').'</button>';
|
||||
$html .= '<button name="deleteLink" class="btn btn-secondary my-2" type="submit" value="'.$name.'">'.$L->get('Delete').'</button>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '</br>';
|
||||
}
|
||||
|
||||
return $html;
|
||||
|
|
|
@ -12,7 +12,11 @@ class pluginSitemap extends Plugin {
|
|||
{
|
||||
global $L;
|
||||
|
||||
$html = '<div>';
|
||||
$html = '<div class="alert alert-primary" role="alert">';
|
||||
$html .= $this->description();
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('Sitemap URL').'</label>';
|
||||
$html .= '<a href="'.Theme::sitemapUrl().'">'.Theme::sitemapUrl().'</a>';
|
||||
$html .= '</div>';
|
||||
|
|
Loading…
Reference in New Issue