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

re #71

parents 4ed21aca a78cfd0c
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</td> </td>
<td class="actions"> <td class="actions">
<a href="<?= $controller->url_for('approving/review/' . $marketplugin->getId()) ?>" data-dialog> <a href="<?= $controller->url_for('approving/review/' . $marketplugin->getId()) ?>" data-dialog>
<?= Assets::img("icons/20/blue/assessment") ?> <?= Icon::create('assessment') ?>
</a> </a>
</td> </td>
</tr> </tr>
......
...@@ -5,23 +5,24 @@ ...@@ -5,23 +5,24 @@
</legend> </legend>
<ol id="galery_edit" class="pluginmarket_galery"> <ol id="galery_edit" class="pluginmarket_galery">
<? foreach ($marketplugin->images as $image) : ?> <? foreach ($marketplugin->images as $image) : ?>
<li class="image"> <li class="image">
<input type="checkbox" name="delete_image[]" value="<?= htmlReady($image->getId()) ?>" id="delete_image_<?= htmlReady($image->getId()) ?>"> <input type="checkbox" name="delete_image[]" value="<?= htmlReady($image->getId()) ?>"
<div> id="delete_image_<?= htmlReady($image->getId()) ?>">
<a href="<?= htmlReady($image->getURL()) ?>" data-lightbox="plugin_gallery"> <div>
<img src="<?= htmlReady($image->getURL()) ?>" style="max-height: 150px;"> <a href="<?= htmlReady($image->getURL()) ?>" data-lightbox="plugin_gallery">
</a> <img src="<?= htmlReady($image->getURL()) ?>" style="max-height: 150px;">
<input type="hidden" name="image_order[]" value="<?= htmlReady($image->getId()) ?>"> </a>
<label for="delete_image_<?= htmlReady($image->getId()) ?>"> <input type="hidden" name="image_order[]" value="<?= htmlReady($image->getId()) ?>">
<?= Assets::img("icons/20/blue/trash", array('style' => "cursor: pointer;")) ?> <label for="delete_image_<?= htmlReady($image->getId()) ?>">
</label> <?= Icon::create('trash', 'clickable', ['style' => "cursor: pointer;"]) ?>
</div> </label>
</li> </div>
<? endforeach ?> </li>
<? endforeach ?>
</ol> </ol>
<script> <script>
jQuery(function() { jQuery(function () {
jQuery("#galery_edit").sortable(); jQuery("#galery_edit").sortable();
}); });
</script> </script>
...@@ -29,11 +30,12 @@ ...@@ -29,11 +30,12 @@
<div id="new_image_container"> <div id="new_image_container">
<div> <div>
<label> <label>
<?= Assets::img("icons/20/blue/upload", array('class' => "text-bottom", 'style' => "cursor: pointer;")) ?> <?= Icon::create('upload', 'clickable', ['class' => "text-bottom", 'style' => "cursor: pointer;"]) ?>
<input type="file" name="new_images[]"> <input type="file" name="new_images[]">
</label> </label>
<a href="#" onClick="if (jQuery('#new_image_container > div').length > 1) jQuery(this).closest('div').remove(); else jQuery(this).closest('div').find('input[type=file]').val(''); return false;"><?= Assets::img("icons/20/blue/trash") ?></a> <a href="#"
onClick="if (jQuery('#new_image_container > div').length > 1) jQuery(this).closest('div').remove(); else jQuery(this).closest('div').find('input[type=file]').val(''); return false;"><?= Icon::create('trash') ?></a>
</div> </div>
</div> </div>
<?= \Studip\LinkButton::create(_("Weiteres Bild"), "#", array('onClick' => "jQuery('#new_image_container > div').first().clone().appendTo('#new_image_container').find('input[type=file]').val(''); return false;")) ?> <?= \Studip\LinkButton::create(_("Weiteres Bild"), "#", ['onClick' => "jQuery('#new_image_container > div').first().clone().appendTo('#new_image_container').find('input[type=file]').val(''); return false;"]) ?>
</fieldset> </fieldset>
\ No newline at end of file
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</legend> </legend>
<label> <label>
<a style="cursor: pointer"> <a style="cursor: pointer">
<?= Assets::img("icons/20/blue/upload") ?> <?= Icon::create('upload') ?>
<input type="file" name="release_file"> <input type="file" name="release_file">
</a> </a>
</label> </label>
......
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
<tr> <tr>
<td> <td>
<? if ($marketplugin['publiclyvisible'] && !$marketplugin['approved']) : ?> <? if ($marketplugin['publiclyvisible'] && !$marketplugin['approved']) : ?>
<?= Assets::img("icons/20/red/exclaim-circle", array('title' => _("Plugin wurde noch nicht von einem Administrator freigeschaltet."), 'class' => "text-bottom")) ?> <?= Icon::create('exclaim-circle', 'status-red', ['title' => _("Plugin wurde noch nicht von einem Administrator freigeschaltet."),
'class' => "text-bottom"]) ?>
<? endif; ?> <? endif; ?>
<a href="<?= $controller->url_for('presenting/details/' . $marketplugin->getId()) ?>"> <a href="<?= $controller->url_for('presenting/details/' . $marketplugin->getId()) ?>">
<?= htmlReady($marketplugin['name']) ?> <?= htmlReady($marketplugin['name']) ?>
...@@ -42,15 +43,15 @@ ...@@ -42,15 +43,15 @@
</td> </td>
<td> <td>
<? if (!$marketplugin['publiclyvisible']) : ?> <? if (!$marketplugin['publiclyvisible']) : ?>
<?= Assets::img("icons/20/grey/lock-locked.png.png", array('title' => _("Plugin ist nicht ffentlich"))) ?> <?= Icon::create('lock-locked', 'inactive', ['title' => _("Plugin ist nicht ffentlich")]) ?>
<? endif ?> <? endif ?>
</td> </td>
<td class="actions"> <td class="actions">
<a href="<?= $controller->url_for('myplugins/edit/' . $marketplugin->getId()) ?>" data-dialog title="<?= _("Plugin-Info bearbeiten") ?>"> <a href="<?= $controller->url_for('myplugins/edit/' . $marketplugin->getId()) ?>" data-dialog title="<?= _("Plugin-Info bearbeiten") ?>">
<?= Assets::img('icons/20/blue/edit') ?> <?= Icon::create('edit') ?>
</a> </a>
<a href="<?= $controller->url_for('myplugins/add_release/' . $marketplugin->getId()) ?>" data-dialog title="<?= _("Neues Release hinzufgen") ?>"> <a href="<?= $controller->url_for('myplugins/add_release/' . $marketplugin->getId()) ?>" data-dialog title="<?= _("Neues Release hinzufgen") ?>">
<?= Assets::img("icons/20/blue/add") ?> <?= Icon::create('add') ?>
</a> </a>
</td> </td>
</tr> </tr>
...@@ -62,6 +63,7 @@ ...@@ -62,6 +63,7 @@
</td> </td>
</tr> </tr>
<? endif; ?> <? endif; ?>
</tbody> </tbody>
</table> </table>
...@@ -70,7 +72,7 @@ $sidebar = Sidebar::Get(); ...@@ -70,7 +72,7 @@ $sidebar = Sidebar::Get();
$sidebar->setImage(Assets::image_path("sidebar/plugin-sidebar.png")); $sidebar->setImage(Assets::image_path("sidebar/plugin-sidebar.png"));
$actions = new ActionsWidget(); $actions = new ActionsWidget();
$actions->addLink(_("Neues Plugin eintragen"), $actions->addLink(_("Neues Plugin eintragen"),
$controller->url_for('myplugins/add'), $controller->url_for('myplugins/add'),
'icons/16/blue/add.png')->asDialog(); Icon::create('add'))->asDialog();
$sidebar->addWidget($actions); $sidebar->addWidget($actions);
...@@ -40,18 +40,18 @@ ...@@ -40,18 +40,18 @@
</td> </td>
<? $score = $marketplugin['rating'] ?> <? $score = $marketplugin['rating'] ?>
<? $score = round($score, 1) / 2 ?> <? $score = round($score, 1) / 2 ?>
<td data-sort="<?=$score?>"> <td data-sort="<?= $score ?>">
<span class="starscore"> <span class="starscore">
<? $v = $score >= 1 ? 3 : ($score >= 0.5 ? 2 : "") ?> <? $v = $score >= 1 ? 3 : ($score >= 0.5 ? 2 : "") ?>
<?= Assets::img($plugin->getPluginURL()."/assets/star$v.svg", array('width' => "16px", 'class' => "big-image-handled")) ?> <?= Icon::create($plugin->getPluginURL() . "/assets/star$v.svg")->asImg('16px')?>
<? $v = $score >= 2 ? 3 : ($score >= 1.5 ? 2 : "") ?> <? $v = $score >= 2 ? 3 : ($score >= 1.5 ? 2 : "") ?>
<?= Assets::img($plugin->getPluginURL()."/assets/star$v.svg", array('width' => "16px", 'class' => "big-image-handled")) ?> <?= Icon::create($plugin->getPluginURL() . "/assets/star$v.svg")->asImg('16px')?>
<? $v = $score >= 3 ? 3 : ($score >= 2.5 ? 2 : "") ?> <? $v = $score >= 3 ? 3 : ($score >= 2.5 ? 2 : "") ?>
<?= Assets::img($plugin->getPluginURL()."/assets/star$v.svg", array('width' => "16px", 'class' => "big-image-handled")) ?> <?= Icon::create($plugin->getPluginURL() . "/assets/star$v.svg")->asImg('16px') ?>
<? $v = $score >= 4 ? 3 : ($score >= 3.5 ? 2 : "") ?> <? $v = $score >= 4 ? 3 : ($score >= 3.5 ? 2 : "") ?>
<?= Assets::img($plugin->getPluginURL()."/assets/star$v.svg", array('width' => "16px", 'class' => "big-image-handled")) ?> <?= Icon::create($plugin->getPluginURL() . "/assets/star$v.svg")->asImg('16px') ?>
<? $v = $score > 4.5 ? 3 : ($score >= 4.5 ? 2 : "") ?> <? $v = $score > 4.5 ? 3 : ($score >= 4.5 ? 2 : "") ?>
<?= Assets::img($plugin->getPluginURL()."/assets/star$v.svg", array('width' => "16px", 'class' => "big-image-handled")) ?> <?= Icon::create($plugin->getPluginURL() . "/assets/star$v.svg")->asImg('16px')?>
</span> </span>
</td> </td>
</tr> </tr>
......
<table class="default"> <table class="default">
<? foreach ($plugins as $marketplugin): ?> <? foreach ($plugins as $marketplugin): ?>
<tr> <tr>
<td> <td>
<a href="<?= PluginEngine::getLink($plugin, array(), 'presenting/details/' . $marketplugin->getId()) ?>"> <a href="<?= PluginEngine::getLink($plugin, [], 'presenting/details/' . $marketplugin->getId()) ?>">
<?= htmlReady($marketplugin['name']) ?> <?= htmlReady($marketplugin['name']) ?>
</a> </a>
</td> </td>
<td> <td>
<? $score = $marketplugin['rating'] ?> <? $score = $marketplugin['rating'] ?>
<? $score = round($score, 1) / 2 ?> <? $score = round($score, 1) / 2 ?>
<span class="starscore"> <span class="starscore">
<? $v = $score >= 1 ? 3 : ($score >= 0.5 ? 2 : "") ?> <? $v = $score >= 1 ? 3 : ($score >= 0.5 ? 2 : "") ?>
<?= Assets::img($plugin->getPluginURL()."/assets/star$v.svg", array('width' => "16px", 'class' => "big-image-handled")) ?> <?= Icon::create($plugin->getPluginURL() . "/assets/star$v.svg")->asImg('16px')?>
<? $v = $score >= 2 ? 3 : ($score >= 1.5 ? 2 : "") ?> <? $v = $score >= 2 ? 3 : ($score >= 1.5 ? 2 : "") ?>
<?= Assets::img($plugin->getPluginURL()."/assets/star$v.svg", array('width' => "16px", 'class' => "big-image-handled")) ?> <?= Icon::create($plugin->getPluginURL() . "/assets/star$v.svg")->asImg('16px')?>
<? $v = $score >= 3 ? 3 : ($score >= 2.5 ? 2 : "") ?> <? $v = $score >= 3 ? 3 : ($score >= 2.5 ? 2 : "") ?>
<?= Assets::img($plugin->getPluginURL()."/assets/star$v.svg", array('width' => "16px", 'class' => "big-image-handled")) ?> <?= Icon::create($plugin->getPluginURL() . "/assets/star$v.svg")->asImg('16px')?>
<? $v = $score >= 4 ? 3 : ($score >= 3.5 ? 2 : "") ?> <? $v = $score >= 4 ? 3 : ($score >= 3.5 ? 2 : "") ?>
<?= Assets::img($plugin->getPluginURL()."/assets/star$v.svg", array('width' => "16px", 'class' => "big-image-handled")) ?> <?= Icon::create($plugin->getPluginURL() . "/assets/star$v.svg")->asImg('16px')?>
<? $v = $score > 4.5 ? 3 : ($score >= 4.5 ? 2 : "") ?> <? $v = $score > 4.5 ? 3 : ($score >= 4.5 ? 2 : "") ?>
<?= Assets::img($plugin->getPluginURL()."/assets/star$v.svg", array('width' => "16px", 'class' => "big-image-handled")) ?> <?= Icon::create($plugin->getPluginURL() . "/assets/star$v.svg")->asImg('16px')?>
</span> </span>
</td> </td>
<td> <td>
<div style="max-height: 20px; overflow: hidden;"> <div style="max-height: 20px; overflow: hidden;">
<? foreach ($marketplugin->getTags() as $key => $tag): ?> <? foreach ($marketplugin->getTags() as $key => $tag): ?>
<?= $key > 0 ? "," : "" ?> <?= $key > 0 ? "," : "" ?>
<a href="<?= PluginEngine::getLink($plugin, compact('tag'), 'presenting/all') ?>"> <a href="<?= PluginEngine::getLink($plugin, compact('tag'), 'presenting/all') ?>">
<?= Assets::img("icons/16/blue/tag", array('class' => "text-bottom")) ?> <?= Icon::create("tag", 'clickable', ['class' => "text-bottom"]) ?>
<?= htmlReady(ucwords($tag)) ?> <?= htmlReady(ucwords($tag)) ?>
</a> </a>
<? endforeach; ?> <? endforeach; ?>
</div> </div>
</td> </td>
</tr> </tr>
<? endforeach; ?> <? endforeach; ?>
</table> </table>
\ No newline at end of file
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<div id="save_instructions" style="display: none; padding: 20px;"> <div id="save_instructions" style="display: none; padding: 20px;">
<a href="#" id="downloader" onClick="this.href=window.document.getElementById('sidebar_image').toDataURL('image/png');" download="testXXX.png"> <a href="#" id="downloader" onClick="this.href=window.document.getElementById('sidebar_image').toDataURL('image/png');" download="testXXX.png">
<?= Assets::img("icons/16/blue/download") ?> <?= Icon::create("icons/16/blue/download") ?>
<?= _("Speichern unter ...") ?> <?= _("Speichern unter ...") ?>
</a> </a>
</div> </div>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment