Skip to content
Snippets Groups Projects
Commit 87d4f6a3 authored by Rasmus Fuhse's avatar Rasmus Fuhse
Browse files

changes of the weekend

parent 5fe7a026
No related branches found
No related tags found
No related merge requests found
...@@ -9,7 +9,7 @@ class PluginMarket extends StudIPPlugin implements SystemPlugin { ...@@ -9,7 +9,7 @@ class PluginMarket extends StudIPPlugin implements SystemPlugin {
public function __construct() { public function __construct() {
parent::__construct(); parent::__construct();
$top = new Navigation($this->getDisplayTitle(), PluginEngine::getURL($this, array(), "presenting/overview")); $top = new Navigation($this->getDisplayTitle(), PluginEngine::getURL($this, array(), "presenting/overview"));
$top->setImage($this->getPluginURL()."/assets/topicon_42.png"); $top->setImage($this->getPluginURL()."/assets/topicon_".($GLOBALS['auth']->auth['devicePixelRatio'] ? 84 : 42).".png");
$top->addSubNavigation("presenting", new Navigation($this->getDisplayTitle(), PluginEngine::getURL($this, array(), "presenting/overview"))); $top->addSubNavigation("presenting", new Navigation($this->getDisplayTitle(), PluginEngine::getURL($this, array(), "presenting/overview")));
if ($GLOBALS['perm']->have_perm("autor")) { if ($GLOBALS['perm']->have_perm("autor")) {
$top->addSubNavigation("myplugins", new Navigation(_("Meine Plugins"), PluginEngine::getURL($this, array(), "myplugins/overview"))); $top->addSubNavigation("myplugins", new Navigation(_("Meine Plugins"), PluginEngine::getURL($this, array(), "myplugins/overview")));
......
assets/topicon_42.png

966 B | W: | H:

assets/topicon_42.png

919 B | W: | H:

assets/topicon_42.png
assets/topicon_42.png
assets/topicon_42.png
assets/topicon_42.png
  • 2-up
  • Swipe
  • Onion skin
assets/topicon_84.png

1.31 KiB

...@@ -44,8 +44,12 @@ class MypluginsController extends PluginController { ...@@ -44,8 +44,12 @@ class MypluginsController extends PluginController {
if (!Request::isPost()) { if (!Request::isPost()) {
throw new Exception("Method not allowed. Try a POST request."); throw new Exception("Method not allowed. Try a POST request.");
} }
$data = Request::getArray("data");
if (!isset($data["publiclyvisible"])) {
$data['publiclyvisible'] = 0;
}
$this->marketplugin = new MarketPlugin(Request::option("id") ?: null); $this->marketplugin = new MarketPlugin(Request::option("id") ?: null);
$this->marketplugin->setData(Request::getArray("data")); $this->marketplugin->setData($data);
if ($this->marketplugin->isNew()) { if ($this->marketplugin->isNew()) {
$this->marketplugin['user_id'] = $GLOBALS['user']->id; $this->marketplugin['user_id'] = $GLOBALS['user']->id;
} }
......
...@@ -22,7 +22,7 @@ class PresentingController extends PluginController { ...@@ -22,7 +22,7 @@ class PresentingController extends PluginController {
} }
} }
$this->plugins = MarketPlugin::findBySQL("1=1 ORDER BY name ASC"); $this->plugins = MarketPlugin::findBySQL("publiclyvisible = 1 AND approved = 1 ORDER BY name ASC");
} }
public function details_action($plugin_id) { public function details_action($plugin_id) {
......
...@@ -8,7 +8,7 @@ CREATE TABLE IF NOT EXISTS `pluginmarket_plugins` ( ...@@ -8,7 +8,7 @@ CREATE TABLE IF NOT EXISTS `pluginmarket_plugins` (
`short_description` text NOT NULL, `short_description` text NOT NULL,
`release_type` varchar(255) default NULL, `release_type` varchar(255) default NULL,
`approved` tinyint(2) NOT NULL default '0', `approved` tinyint(2) NOT NULL default '0',
`public` tinyint(2) NOT NULL default '1', `publiclyvisible` TINYINT NOT NULL DEFAULT '1'
`url` varchar(2000) default NULL, `url` varchar(2000) default NULL,
`classification` enum('firstclass','secondclass','none') NOT NULL default 'none', `classification` enum('firstclass','secondclass','none') NOT NULL default 'none',
`language` enum('de','en','de_en') NOT NULL default 'de', `language` enum('de','en','de_en') NOT NULL default 'de',
......
...@@ -28,6 +28,11 @@ ...@@ -28,6 +28,11 @@
<textarea class="add_toolbar" name="data[description]"><?= htmlReady($marketplugin['description']) ?></textarea> <textarea class="add_toolbar" name="data[description]"><?= htmlReady($marketplugin['description']) ?></textarea>
</label> </label>
<label>
<?= _("Sichtbar fr alle") ?>
<input type="checkbox" name="data[publiclyvisible]" value="1"<?= $marketplugin->isNew() || $marketplugin['publiclyvisible'] ? " checked" : "" ?>>
</label>
<div> <div>
<?= _("Lizenz") ?> <?= _("Lizenz") ?>
<input type="hidden" name="data[license]" value="GPL 2 or later"> <input type="hidden" name="data[license]" value="GPL 2 or later">
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<th><?= _("Name") ?></th> <th><?= _("Name") ?></th>
<th><?= _("Letztes Update") ?></th> <th><?= _("Letztes Update") ?></th>
<th></th> <th></th>
<th></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
...@@ -25,6 +26,11 @@ ...@@ -25,6 +26,11 @@
?> ?>
<?= date("j.n.Y, G:i", $chdate) ?> <?= _("Uhr") ?> <?= date("j.n.Y, G:i", $chdate) ?> <?= _("Uhr") ?>
</td> </td>
<td>
<? if (!$marketplugin['publiclyvisible']) : ?>
<?= Assets::img("icons/20/grey/lock-locked.png.png", array('title' => _("Plugin ist nicht ffentlich"))) ?>
<? endif ?>
</td>
<td> <td>
<a href="<?= PluginEngine::getLink($plugin, array(), "myplugins/edit/".$marketplugin->getId()) ?>" data-dialog><?= Assets::img("icons/20/blue/edit") ?></a> <a href="<?= PluginEngine::getLink($plugin, array(), "myplugins/edit/".$marketplugin->getId()) ?>" data-dialog><?= Assets::img("icons/20/blue/edit") ?></a>
</td> </td>
......
<? if (!$marketplugin['publiclyvisible']) : ?>
<?= PageLayout::postMessage(MessageBox::info(_("Dieses Plugin ist nicht ffentlich."))) ?>
<? endif ?>
<h1><?= htmlReady($marketplugin['name']) ?></h1> <h1><?= htmlReady($marketplugin['name']) ?></h1>
<div> <div>
<?= formatReady($marketplugin['description']) ?> <?= formatReady($marketplugin['description']) ?>
...@@ -5,7 +9,11 @@ ...@@ -5,7 +9,11 @@
<h2><?= _("Galerie") ?></h2> <h2><?= _("Galerie") ?></h2>
<div></div> <div>
<? if ($marketplugin['user_id'] === $GLOBALS['user']->id) : ?>
<div><a href=""><?= Assets::img("icons/20/blue/add") ?></a></div>
<? endif ?>
</div>
<h2><?= _("Releases") ?></h2> <h2><?= _("Releases") ?></h2>
<table class="default"> <table class="default">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment