From 0bc86bc611530d97fb94cc6c3a67334a05ac9434 Mon Sep 17 00:00:00 2001
From: Jan-Hendrik Willms <tleilax+github@gmail.com>
Date: Thu, 3 Sep 2015 10:52:49 +0200
Subject: [PATCH] adjust image gallery handling due to changes on trunk, fixes
 #57

---
 assets/pluginmarket.less         | 2 +-
 plugin.manifest                  | 2 +-
 views/myplugins/_edit_images.php | 4 +++-
 views/presenting/details.php     | 4 +++-
 4 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/assets/pluginmarket.less b/assets/pluginmarket.less
index d19d21d..6316dc4 100644
--- a/assets/pluginmarket.less
+++ b/assets/pluginmarket.less
@@ -10,7 +10,7 @@
     .flex-justify-content(center);
     .flex-align-items(stretch);
 
-    > .image {
+    .image {
         padding: 5px;
         border: 5px solid #eeeeee;
         margin: 5px;
diff --git a/plugin.manifest b/plugin.manifest
index 82fab95..01a4c73 100644
--- a/plugin.manifest
+++ b/plugin.manifest
@@ -1,4 +1,4 @@
 pluginname=PluginMarktplatz
 pluginclassname=PluginMarket
 origin=studip
-version=1.0.14
+version=1.0.15
diff --git a/views/myplugins/_edit_images.php b/views/myplugins/_edit_images.php
index 0394c8a..1920a0a 100644
--- a/views/myplugins/_edit_images.php
+++ b/views/myplugins/_edit_images.php
@@ -9,7 +9,9 @@
         <li class="image">
             <input type="checkbox" name="delete_image[]" value="<?= htmlReady($image->getId()) ?>" id="delete_image_<?= htmlReady($image->getId()) ?>">
             <div>
-                <img src="<?= htmlReady($image->getURL()) ?>" style="max-height: 150px;">
+                <a href="<?= htmlReady($image->getURL()) ?>" data-lightbox="plugin_gallery">
+                    <img src="<?= htmlReady($image->getURL()) ?>" style="max-height: 150px;">
+                </a>
                 <input type="hidden" name="image_order[]" value="<?= htmlReady($image->getId()) ?>">
                 <label for="delete_image_<?= htmlReady($image->getId()) ?>">
                     <?= Assets::img("icons/20/blue/trash", array('style' => "cursor: pointer;")) ?>
diff --git a/views/presenting/details.php b/views/presenting/details.php
index e40ed80..b5f5408 100644
--- a/views/presenting/details.php
+++ b/views/presenting/details.php
@@ -30,7 +30,9 @@ if ($icon) {
 <ol id="pluginmarket_galery_view" class="pluginmarket_galery">
     <? foreach ($marketplugin->images as $image) : ?>
     <div class="image">
-        <img src="<?= htmlReady($image->getURL()) ?>">
+        <a href="<?= htmlReady($image->getURL()) ?>" data-lightbox="plugin_gallery">
+            <img src="<?= htmlReady($image->getURL()) ?>">
+        </a>
     </div>
     <? endforeach ?>
     <? if ($marketplugin->isWritable()) : ?>
-- 
GitLab