Actualización
This commit is contained in:
4
plugin/static/README.md
Normal file
4
plugin/static/README.md
Normal file
@@ -0,0 +1,4 @@
|
||||
Static plugin
|
||||
===
|
||||
|
||||
Displays static content in a selected region.
|
||||
25
plugin/static/index.php
Normal file
25
plugin/static/index.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
$plugin = StaticPlugin::create();
|
||||
$content = $plugin->get_content();
|
||||
$title = $plugin->get_block_title();
|
||||
$title = $title ? "<h4>$title</h4>" : '';
|
||||
|
||||
$css = $plugin->get_css();
|
||||
$css = $css ? "<style type=\"text/css\" scoped=\"scoped\">$css</style>" : '';
|
||||
|
||||
if (empty($content)) {
|
||||
echo '';
|
||||
}
|
||||
|
||||
echo <<<EOT
|
||||
<div class="well sidebar-nav static">
|
||||
$css
|
||||
<div class="menusection">
|
||||
$title
|
||||
<div class="content">
|
||||
$content
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
EOT;
|
||||
11
plugin/static/lang/english.php
Normal file
11
plugin/static/lang/english.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright (c) 2012 University of Geneva
|
||||
* @license GNU General Public License - http://www.gnu.org/copyleft/gpl.html
|
||||
* @author Laurent Opprecht <laurent@opprecht.info>
|
||||
*/
|
||||
$strings['plugin_title'] = "Static";
|
||||
$strings['plugin_comment'] = "Display static html content.";
|
||||
$strings['block_title'] = "Block title";
|
||||
|
||||
//$strings['title'] = "Title";
|
||||
9
plugin/static/lang/french.php
Normal file
9
plugin/static/lang/french.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright (c) 2012 University of Geneva
|
||||
* @license GNU General Public License - http://www.gnu.org/copyleft/gpl.html
|
||||
* @author Laurent Opprecht <laurent@opprecht.info>
|
||||
*/
|
||||
$strings['plugin_title'] = "Statique";
|
||||
$strings['plugin_comment'] = "Affiche du contenu html.";
|
||||
$strings['block_title'] = "Titre du bloc";
|
||||
9
plugin/static/lang/spanish.php
Normal file
9
plugin/static/lang/spanish.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright (c) 2012 University of Geneva
|
||||
* @license GNU General Public License - http://www.gnu.org/copyleft/gpl.html
|
||||
* @author Laurent Opprecht <laurent@opprecht.info>
|
||||
*/
|
||||
$strings['plugin_title'] = "Texto estático";
|
||||
$strings['plugin_comment'] = "Muestra contenido HTML.";
|
||||
$strings['block_title'] = "Título del bloque";
|
||||
36
plugin/static/lib/static_plugin.class.php
Normal file
36
plugin/static/lib/static_plugin.class.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Description of static_plugin.
|
||||
*
|
||||
* @copyright (c) 2012 University of Geneva
|
||||
* @license GNU General Public License - http://www.gnu.org/copyleft/gpl.html
|
||||
* @author Laurent Opprecht <laurent@opprecht.info>
|
||||
*/
|
||||
class StaticPlugin extends Plugin
|
||||
{
|
||||
protected function __construct()
|
||||
{
|
||||
parent::__construct('1.1', 'Laurent Opprecht', ['block_title' => 'text', 'content' => 'wysiwyg']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return StaticPlugin
|
||||
*/
|
||||
public static function create()
|
||||
{
|
||||
static $result = null;
|
||||
|
||||
return $result ? $result : $result = new self();
|
||||
}
|
||||
|
||||
public function get_block_title()
|
||||
{
|
||||
return $this->get('block_title');
|
||||
}
|
||||
|
||||
public function get_content()
|
||||
{
|
||||
return $this->get('content');
|
||||
}
|
||||
}
|
||||
8
plugin/static/plugin.php
Normal file
8
plugin/static/plugin.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
/* For license terms, see /license.txt */
|
||||
/**
|
||||
* @copyright (c) 2011 University of Geneva
|
||||
* @license GNU General Public License - http://www.gnu.org/copyleft/gpl.html
|
||||
* @author Laurent Opprecht
|
||||
*/
|
||||
$plugin_info = StaticPlugin::create()->get_info();
|
||||
4
plugin/static/resources/static.css
Normal file
4
plugin/static/resources/static.css
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
.well.sidebar-nav.rss
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user