From fa84a69d3cc883612dae1eb9c8d5936216f7c8ae Mon Sep 17 00:00:00 2001 From: Rasmus Fuhse <fuhse@data-quest.de> Date: Tue, 16 Sep 2014 10:15:52 +0200 Subject: [PATCH] small changes --- assets/pluginmarket.css | 8 +++++++ views/myplugins/_edit_images.php | 2 +- views/presenting/details.php | 37 +++++++++++++++++++++++++++++--- 3 files changed, 43 insertions(+), 4 deletions(-) diff --git a/assets/pluginmarket.css b/assets/pluginmarket.css index ee10420..9eb9c49 100644 --- a/assets/pluginmarket.css +++ b/assets/pluginmarket.css @@ -1,3 +1,7 @@ +#pluginmarket_galery_view { + max-height: 500px; + overflow: auto; +} .pluginmarket_galery { list-style-type: none; display: flex; @@ -11,6 +15,10 @@ border: 5px solid #eeeeee; margin: 5px; } +.pluginmarket_galery > .image img { + display: block; + max-height: 180px; +} .pluginmarket_galery > .image input[type=checkbox] { display: none; } diff --git a/views/myplugins/_edit_images.php b/views/myplugins/_edit_images.php index 6c02582..0394c8a 100644 --- a/views/myplugins/_edit_images.php +++ b/views/myplugins/_edit_images.php @@ -12,7 +12,7 @@ <img src="<?= htmlReady($image->getURL()) ?>" style="max-height: 150px;"> <input type="hidden" name="image_order[]" value="<?= htmlReady($image->getId()) ?>"> <label for="delete_image_<?= htmlReady($image->getId()) ?>"> - <?= Assets::img("icons/20/blue/delete") ?> + <?= Assets::img("icons/20/blue/trash", array('style' => "cursor: pointer;")) ?> </label> </div> </li> diff --git a/views/presenting/details.php b/views/presenting/details.php index a22696e..66e7bc4 100644 --- a/views/presenting/details.php +++ b/views/presenting/details.php @@ -19,18 +19,33 @@ if ($icon) { <?= formatReady($marketplugin['description']) ?> </div> +<? if (count($marketplugin->images) > 0 || $marketplugin->isWritable()) : ?> <h2><?= _("Galerie") ?></h2> <ol id="pluginmarket_galery_view" class="pluginmarket_galery"> <? foreach ($marketplugin->images as $image) : ?> <div class="image"> - <img src="<?= htmlReady($image->getURL()) ?>" style="max-height: 180px;"> + <img src="<?= htmlReady($image->getURL()) ?>"> </div> <? endforeach ?> <? if ($marketplugin->isWritable()) : ?> - <div><a href="<?= PluginEngine::getLink($plugin, array(), "myplugins/edit_images/".$marketplugin->getId()) ?>" data-dialog><?= Assets::img("icons/20/blue/add") ?></a></div> + <div><a href="<?= PluginEngine::getLink($plugin, array(), "myplugins/edit_images/".$marketplugin->getId()) ?>" data-dialog title="<?= _("Galerie bearbeiten / neue Bilder hinzuf�gen") ?>"><?= Assets::img("icons/20/blue/add") ?></a></div> <? endif ?> </ol> +<? endif ?> + +<h2><?= _("Zum Autor") ?></h2> +<ul class="clean"> + <li> + <? $author = User::find($marketplugin['user_id']) ?> + <div> + <a href="<?= URLHelper::getLink("dispatch.php/profile", array('username' => $author['username'])) ?>" style="text-align: center; display: inline-block; vertical-align: top;"> + <?= Avatar::getAvatar($marketplugin['user_id'])->getImageTag(Avatar::MEDIUM, array('style' => "display: block;")) ?> + <?= htmlReady($author->getFullName()) ?> + </a> + </div> + </li> +</ul> <h2><?= _("Releases") ?></h2> <table class="default"> @@ -78,9 +93,10 @@ if ($icon) { $author = User::find($marketplugin['user_id']); $flattr_username = $author['datafields']->findBy("name", "Flattr")->val("content"); $bitcoin_datafield = $author['datafields']->findBy("name", "Bitcoin-Wallet")->val("content"); +$paypal_datafield = $author['datafields']->findBy("name", "Paypal-Account (Email)")->val("content"); ?> -<? if ($flattr_username || $bitcoin_wallet) : ?> +<? if ($flattr_username || $bitcoin_wallet || $paypal_datafield) : ?> <h2><?= _("Spenden") ?></h2> <p class="info"> <?= _("Der Download ist kostenlos, aber man kann dem Autor mit einer Spende danken und zuk�nftige Entwicklungen anregen.") ?> @@ -109,6 +125,21 @@ $bitcoin_datafield = $author['datafields']->findBy("name", "Bitcoin-Wallet")->va }); </script> <? endif ?> + + <? if ($paypal_datafield) : ?> + <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top" style="display: inline-block;"> + <div><strong><img src="http://pics.ebaystatic.com/aw/pics/logos/logoPayPal_51x14.gif"></strong></div> + <input type="hidden" name="cmd" value="_donations"> + <input type="hidden" name="business" value="<?= htmlReady($paypal_datafield) ?>"> + <input type="hidden" name="lc" value="DE"> + <input type="hidden" name="no_note" value="0"> + <input type="hidden" name="currency_code" value="USD"> + <input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest"> + <input type="image" src="https://www.paypalobjects.com/de_DE/DE/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="Jetzt einfach, schnell und sicher online bezahlen � mit PayPal."> + <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1"> + </form> + + <? endif ?> </div> -- GitLab