diff --git a/PluginMarket.class.php b/PluginMarket.class.php index 0a1b40115170c8a39a0a1c63a0710015f0818b51..753da84446a854648028498bfb28bdbc03c99d36 100755 --- a/PluginMarket.class.php +++ b/PluginMarket.class.php @@ -1,100 +1,103 @@ <?php -require_once 'bootstrap.php'; +require_once __DIR__ . '/bootstrap.php'; class PluginMarket extends StudIPPlugin implements SystemPlugin, HomepagePlugin { - static protected $studip_domain = null; - - static public function getStudipReleases() + public static function getStudipReleases() { - return array( + return [ '1.4', '1.5', '1.6', '1.7', '1.8', '1.9', '1.10', '1.11', '2.0', '2.1', '2.2', '2.3', '2.4', '2.5', - '3.0', '3.1', '3.2', "3.3", "3.4", "3.5", - "4.0", "4.1", "4.2", "4.3", "4.4", "4.5", "4.6", - "5.0", - ); + '3.0', '3.1', '3.2', '3.3', '3.4', '3.5', + '4.0', '4.1', '4.2', '4.3', '4.4', '4.5', '4.6', + '5.0', '5.1', '5.2', '5.3', '5.4', + '6.0', + ]; } public function __construct() { parent::__construct(); - $top = new Navigation($this->getDisplayTitle(), PluginEngine::getURL($this, array('view' => 'tiles'), "presenting/overview")); - $top->setImage(Icon::create($this->getPluginURL()."/assets/topicon.svg")); - $overview = new Navigation($this->getDisplayTitle(), PluginEngine::getURL($this, array(), "presenting/overview")); - $top->addSubNavigation("presenting", $overview); - $overview->addSubNavigation("overview", new AutoNavigation(_('Übersicht'), PluginEngine::getURL($this, array(), "presenting/overview"))); - $overview->addSubNavigation("all", new AutoNavigation(_('Alle Plugins'), PluginEngine::getURL($this, array(), "presenting/all"))); - $overview->addSubNavigation("tools", new AutoNavigation(_('Tools'), PluginEngine::getURL($this, array(), "tools/sidebar_graphics_generator"))); + $top = new Navigation($this->getDisplayTitle(), PluginEngine::getURL($this, ['view' => 'tiles'], 'presenting/overview')); + $top->setImage(Icon::create($this->getPluginURL() . '/assets/topicon.svg')); + + $overview = new Navigation($this->getDisplayTitle(), PluginEngine::getURL($this, [], 'presenting/overview')); + $overview->addSubNavigation('overview', new AutoNavigation(_('Übersicht'), PluginEngine::getURL($this, [], 'presenting/overview'))); + $overview->addSubNavigation('all', new AutoNavigation(_('Alle Plugins'), PluginEngine::getURL($this, [], 'presenting/all'))); + $overview->addSubNavigation('tools', new AutoNavigation(_('Tools'), PluginEngine::getURL($this, [], 'tools/sidebar_graphics_generator'))); + $top->addSubNavigation('presenting', $overview); - if ($GLOBALS['perm']->have_perm("autor")) { - $top->addSubNavigation("myplugins", new Navigation(_("Meine Plugins"), PluginEngine::getURL($this, array(), "myplugins/overview"))); + if ($GLOBALS['perm']->have_perm('autor')) { + $top->addSubNavigation('myplugins', new Navigation(_('Meine Plugins'), PluginEngine::getURL($this, [], 'myplugins/overview'))); } - if ($GLOBALS['perm']->have_perm("user")) { - $last_visit = UserConfig::get($GLOBALS['user']->id)->getValue("last_pluginmarket_visit"); + if ($GLOBALS['perm']->have_perm('user')) { + $last_visit = UserConfig::get($GLOBALS['user']->id)->last_pluginmarket_visit; if ($last_visit) { - $badge_number = MarketPlugin::countBySql("publiclyvisible = 1 AND approved = 1 AND published > ?", array($last_visit)); + $badge_number = MarketPlugin::countBySql("publiclyvisible = 1 AND approved = 1 AND published > ?", [$last_visit]); if ($badge_number > 0) { $top->setBadgeNumber($badge_number); } } } - if (RolePersistence::isAssignedRole($GLOBALS['user']->id, "Pluginbeauftragter")) { - $approving = new Navigation(_("Qualitätssicherung"), PluginEngine::getURL($this, array(), "approving/overview")); - $top->addSubNavigation("approving", $approving); + if (RolePersistence::isAssignedRole($GLOBALS['user']->id, 'Pluginbeauftragter')) { + $approving = new Navigation(_('Qualitätssicherung'), PluginEngine::getURL($this, [], 'approving/overview')); + $top->addSubNavigation('approving', $approving); } - Navigation::addItem("/pluginmarket", $top); + Navigation::addItem('/pluginmarket', $top); + + $loginlink = new Navigation($this->getDisplayTitle(), PluginEngine::getURL($this, [], 'presenting/overview')); + $loginlink->setDescription(_('Laden Sie hier Plugins für Ihr Stud.IP herunter')); + Navigation::addItem('/login/pluginmarket', $loginlink); - $loginlink = new Navigation($this->getDisplayTitle(), PluginEngine::getURL($this, array(), "presenting/overview")); - $loginlink->setDescription(_("Laden Sie hier Plugins für Ihr Stud.IP herunter")); - Navigation::addItem("/login/pluginmarket",$loginlink); + NotificationCenter::addObserver($this, 'triggerFollowingStudips', 'PluginReleaseDidUpdateCode'); + } - NotificationCenter::addObserver($this, "triggerFollowingStudips", "PluginReleaseDidUpdateCode"); + public function getDisplayTitle() + { + return _('PluginMarktplatz'); } - public function initialize() + public function perform($unconsumed_path) { - $this->addStylesheet('assets/pluginmarket.less'); - PageLayout::addHeadElement('link', array( + $this->addStylesheet('assets/pluginmarket.scss'); + PageLayout::addHeadElement('link', [ 'rel' => 'alternate', 'type' => 'application/rss+xml', - 'href' => PluginEngine::getLink($this, array(), 'rss/newest'), + 'href' => PluginEngine::getLink($this, [], 'rss/newest'), 'title' => _('Neueste Plugins'), - )); - } + ]); - public function getDisplayTitle() - { - return _("PluginMarktplatz"); + parent::perform($unconsumed_path); } public function getHomepageTemplate($user_id) { - $this->addStylesheet('assets/pluginmarket.less'); - - $templatefactory = new Flexi_TemplateFactory(__DIR__."/views"); - $template = $templatefactory->open("presenting/users_plugins.php"); - $plugins = MarketPlugin::findBySQL("user_id = ? AND publiclyvisible = 1 AND approved = 1 ORDER BY mkdate DESC", array($user_id)); - $template->set_attribute("plugin", $this); - $template->set_attribute("plugins", $plugins); - $template->set_attribute("title", _("Meine Plugins")); + $this->addStylesheet('assets/pluginmarket.scss'); + + $plugins = MarketPlugin::findBySQL("user_id = ? AND publiclyvisible = 1 AND approved = 1 ORDER BY mkdate DESC", [$user_id]); + + $templatefactory = new Flexi_TemplateFactory(__DIR__ . '/views'); + $template = $templatefactory->open('presenting/users_plugins.php'); + $template->plugin = $this; + $template->plugins = $plugins; + $template->title = _('Meine Plugins'); return count($plugins) ? $template : null; } static public function triggerFollowingStudips($eventname, $release) { - $output = array(); + $output = []; $payload = json_encode($output); foreach ($release->followers as $follower) { - $header = array(); + $header = []; if ($follower['security_token']) { - $calculatedHash = hash_hmac("sha1", $payload, $follower['security_token']); - $header[] = "X_HUB_SIGNATURE: sha1=".$calculatedHash; + $calculatedHash = hash_hmac('sha1', $payload, $follower['security_token']); + $header[] = "X_HUB_SIGNATURE: sha1={$calculatedHash}"; } - $header[] = "Content-Type: application/json"; + $header[] = 'Content-Type: application/json'; $r = curl_init(); curl_setopt($r, CURLOPT_URL, $follower['url']); @@ -103,7 +106,7 @@ class PluginMarket extends StudIPPlugin implements SystemPlugin, HomepagePlugin curl_setopt($r, CURLOPT_POSTFIELDS, $payload); - $result = curl_exec($r); + curl_exec($r); curl_close($r); } } diff --git a/assets/blue_star.svg b/assets/blue_star.svg index 410fa41cc01625940244a7fd0f29be8937f6b04d..2658fc2968f1eb9f1f578a9fe2ef61edc083b15a 100755 --- a/assets/blue_star.svg +++ b/assets/blue_star.svg @@ -1,6 +1 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> -<svg width="100%" height="100%" viewBox="0 0 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;"> - <path id="line5" d="M0,0" style="fill-rule:nonzero;stroke:rgb(68,159,219);stroke-width:1px;"/> - <path id="path7" d="M64,24.816L41.889,21.603L32,1.567L22.111,21.603L0,24.816L16,40.412L12.223,62.434L32,52.037L51.777,62.434L48,40.412L64,24.816ZM32,47.094L18.034,54.437L20.701,38.885L9.402,27.871L25.017,25.602L32,11.452L38.983,25.602L54.598,27.871L43.299,38.885L45.966,54.437L32,47.094L32,47.094Z" style="fill:rgb(15,70,126);fill-rule:nonzero;"/> -</svg> +<svg clip-rule="evenodd" fill-rule="evenodd" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg"><path d="m64 24.816-22.111-3.213-9.889-20.036-9.889 20.036-22.111 3.213 16 15.596-3.777 22.022 19.777-10.397 19.777 10.397-3.777-22.022zm-32 22.278-13.966 7.343 2.667-15.552-11.299-11.014 15.615-2.269 6.983-14.15 6.983 14.15 15.615 2.269-11.299 11.014 2.667 15.552z" fill="#0f467e" fill-rule="nonzero"/></svg> \ No newline at end of file diff --git a/assets/blue_star2.svg b/assets/blue_star2.svg index 8449efd8ed507bf0ca67e5109064db9100b57855..63e0311d200a1cea42c66f78908a53cf0757513c 100755 --- a/assets/blue_star2.svg +++ b/assets/blue_star2.svg @@ -1,6 +1 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> -<svg width="100%" height="100%" viewBox="0 0 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;"> - <path id="line5" d="M0,0" style="fill-rule:nonzero;stroke:rgb(68,159,219);stroke-width:1px;"/> - <path id="path7" d="M64,24.816L41.889,21.603L32,1.567L22.111,21.603L0,24.816L16,40.412L12.223,62.434L32,52.037L51.777,62.434L48,40.412L64,24.816ZM32,47.094L31.941,47.125L32,11.452L38.983,25.602L54.598,27.871L43.299,38.885L45.966,54.437L32,47.094L32,47.094Z" style="fill:rgb(15,70,126);fill-rule:nonzero;"/> -</svg> +<svg clip-rule="evenodd" fill-rule="evenodd" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg"><path d="m64 24.816-22.111-3.213-9.889-20.036-9.889 20.036-22.111 3.213 16 15.596-3.777 22.022 19.777-10.397 19.777 10.397-3.777-22.022zm-32 22.278-.059.031.059-35.673 6.983 14.15 15.615 2.269-11.299 11.014 2.667 15.552z" fill="#0f467e" fill-rule="nonzero"/></svg> \ No newline at end of file diff --git a/assets/blue_star3.svg b/assets/blue_star3.svg index 411fc409c050279d371b3ce9d77629253ccc8c74..a464be2b0e01b4e593d20ef005dc6bb6684e32c5 100755 --- a/assets/blue_star3.svg +++ b/assets/blue_star3.svg @@ -1,6 +1 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> -<svg width="100%" height="100%" viewBox="0 0 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;"> - <path id="line5" d="M0,0" style="fill-rule:nonzero;stroke:rgb(68,159,219);stroke-width:1px;"/> - <path id="path7" d="M64,24.816L41.889,21.603L32,1.567L22.111,21.603L0,24.816L16,40.412L12.223,62.434L32,52.037L51.777,62.434L48,40.412L64,24.816Z" style="fill:rgb(15,70,126);fill-rule:nonzero;"/> -</svg> +<svg clip-rule="evenodd" fill-rule="evenodd" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg"><path d="m64 24.816-22.111-3.213-9.889-20.036-9.889 20.036-22.111 3.213 16 15.596-3.777 22.022 19.777-10.397 19.777 10.397-3.777-22.022z" fill="#0f467e" fill-rule="nonzero"/></svg> \ No newline at end of file diff --git a/assets/pluginmarket.less b/assets/pluginmarket.scss similarity index 77% rename from assets/pluginmarket.less rename to assets/pluginmarket.scss index 4946912ab733449677708b4d21925f1f387eb577..05d5644dfb3ac21709bee35cbe68ac8a85919df2 100755 --- a/assets/pluginmarket.less +++ b/assets/pluginmarket.scss @@ -4,11 +4,11 @@ } .pluginmarket_galery { list-style-type: none; - .flex(); - .flex-direction-row(); - .flex-wrap(wrap); - .flex-justify-content(center); - .flex-align-items(stretch); + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: center; + align-items: stretch; .image { padding: 5px; @@ -32,11 +32,11 @@ list-style-type: none; text-align: center; - .flex(); - .flex-direction-row(); - .flex-wrap(wrap); - .flex-justify-content(center); - .flex-align-items(stretch); + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: center; + align-items: stretch; > article { display: inline-block; @@ -55,7 +55,7 @@ background-size: contain; background-repeat: no-repeat; background-color: white; - box-shadow: inset 0px 0px 4px fadeout(#000, 70%); + box-shadow: inset 0 0 4px fade-out(#000, 70%); } .shortdescription { @@ -63,7 +63,7 @@ height: 70px; max-height: 70px; overflow: hidden; - margin-bottom: 0px; + margin-bottom: 0; padding: 0 5px; text-align: justify; position: relative; @@ -76,7 +76,7 @@ left: 0; right: 0; height: 20px; - #gradient .vertical(fadeout(#fff, 100%), #fff); + #gradient .vertical(fade-out(#fff, 100%), #fff); } } &.deprecated { @@ -85,8 +85,6 @@ } &.new > article { - -webkit-animation: scaling 700ms ease-out; - -ms-animation: scaling 700ms ease-out; animation: scaling 700ms ease-out; } } @@ -102,11 +100,11 @@ } #tagcloud td { - .transition(font-size 0.5s); + transition: font-size var(--transition-duration, 500ms); &:hover { font-size: 1.2em; - transition: font-size 0.5s; + transition: font-size var(--transition-duration, 500ms); } } @@ -115,16 +113,14 @@ } article.contentbox { - border: solid 1px @base-color-60; - border-style: solid; - border-width: 1px; - .transition(all 300ms ease 0s); + border: solid 1px var(--base-color-60); + transition: all var(--transition-duration) ease 0s; position: relative; header { width: 100%; - background-color: @content-color-20; - color: @brand-color-dark; + background-color: var(--content-color-20); + color: var(--brand-color-dark); font-size: 12pt; font-weight: bold; text-align: left; @@ -132,17 +128,17 @@ article.contentbox { } h1 { padding: 5px; - margin: 0px; - color: @base-color; + margin: 0; + color: var(--base-color); border-bottom: medium none; font-size: medium; } footer { background-color: white; - border-top: 1px solid @content-color-40; + border-top: 1px solid var(--content-color-40); &.tags a { - .icon('before', 'tag', 'clickable'); + @include icon(before, tag, clickable); white-space: nowrap; } } @@ -200,4 +196,4 @@ article.contentbox { opacity: 0.5; text-decoration: line-through; } -} \ No newline at end of file +} diff --git a/assets/sidebar-marketplace.png b/assets/sidebar-marketplace.png index 63c627c562bb1d11b7a8e6be15452b06042eef5c..602ee12755306398a5f8bec5720eb8e52e5927ba 100755 Binary files a/assets/sidebar-marketplace.png and b/assets/sidebar-marketplace.png differ diff --git a/assets/topicon.svg b/assets/topicon.svg index c7b75334ffaf9429d2e7fb83d86aad1e1c40c192..808b49d7d25777d348ed6275b191395a0007c941 100755 --- a/assets/topicon.svg +++ b/assets/topicon.svg @@ -1,76 +1 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="16px" - height="16px" - viewBox="0 0 16 16" - shape-rendering="geometricPrecision" - fill="#24437c" - id="svg2" - version="1.1" - inkscape:version="0.48.4 r9939" - sodipodi:docname="topicon.svg" - inkscape:export-filename="/home/rasmus/studip/trunk/public/plugins_packages/data-quest/PluginMarket/assets/topicon.png" - inkscape:export-xdpi="90" - inkscape:export-ydpi="90"> - <metadata - id="metadata16"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title></dc:title> - </cc:Work> - </rdf:RDF> - </metadata> - <defs - id="defs14" /> - <sodipodi:namedview - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1" - objecttolerance="10" - gridtolerance="10" - guidetolerance="10" - inkscape:pageopacity="0" - inkscape:pageshadow="2" - inkscape:window-width="640" - inkscape:window-height="480" - id="namedview12" - showgrid="false" - inkscape:zoom="14.75" - inkscape:cx="8" - inkscape:cy="8" - inkscape:window-x="75" - inkscape:window-y="34" - inkscape:window-maximized="0" - inkscape:current-layer="svg2" /> - <g - id="g4"> - <g - id="g6"> - <polygon - points="8.182,3.179 7.367,1.256 3.587,1.256 2.77,3.179 1.649,3.179 1.65,4.128 14.977,4.119 14.995,13.402 15.928,12.424 15.928,3.179" - id="polygon8" /> - <path - d="M0.072,4.756V14h14.279V4.756H0.072z M13.25,12.929H1.041v-7H13.25V12.929z" - id="path10" /> - </g> - </g> - <g - transform="matrix(0.42478008,0,0,0.42381531,3.8898949,5.931533)" - id="g4-8"> - <path - inkscape:connector-curvature="0" - d="m 11.348,7.312 c 0.788,0.008 1.464,0.478 1.779,1.146 V 4.747 H 9.053 C 9.686,4.418 10.126,3.773 10.134,3.01 10.145,1.91 9.264,1.01 8.164,0.999 7.064,0.988 6.163,1.871 6.152,2.97 6.143,3.745 6.585,4.411 7.229,4.747 H 2.873 V 15.001 H 5.824 C 5.18,14.665 4.739,13.988 4.747,13.213 c 0.011,-1.101 0.912,-1.982 2.011,-1.972 1.1,0.011 1.982,0.912 1.971,2.013 -0.008,0.763 -0.449,1.419 -1.083,1.747 h 5.481 v -4.845 c -0.323,0.679 -1.02,1.146 -1.82,1.137 -1.101,-0.01 -1.983,-0.91 -1.972,-2.01 0.011,-1.1 0.913,-1.982 2.013,-1.971 z" - id="path6" /> - </g> -</svg> +<svg fill="#24437c" height="16" shape-rendering="geometricPrecision" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8.182 3.179-.815-1.923h-3.78l-.817 1.923h-1.121l.001.949 13.327-.009.018 9.283.933-.978v-9.245z"/><path d="m.072 4.756v9.244h14.279v-9.244zm13.178 8.173h-12.209v-7h12.209z"/><path d="m11.348 7.312c.788.008 1.464.478 1.779 1.146v-3.711h-4.074c.633-.329 1.073-.974 1.081-1.737.011-1.1-.87-2-1.97-2.011s-2.001.872-2.012 1.971c-.009.775.433 1.441 1.077 1.777h-4.356v10.254h2.951c-.644-.336-1.085-1.013-1.077-1.788.011-1.101.912-1.982 2.011-1.972 1.1.011 1.982.912 1.971 2.013-.008.763-.449 1.419-1.083 1.747h5.481v-4.845c-.323.679-1.02 1.146-1.82 1.137-1.101-.01-1.983-.91-1.972-2.01s.913-1.982 2.013-1.971z" transform="matrix(.42478008 0 0 .42381531 3.889895 5.931533)"/></svg> \ No newline at end of file diff --git a/assets/topicon_white.svg b/assets/topicon_white.svg index 3fcd018113ee31cc2c08413acff6178f8195a555..746d36e4376e86e529c67944887f6d35ae205842 100755 --- a/assets/topicon_white.svg +++ b/assets/topicon_white.svg @@ -1,84 +1 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="16px" - height="16px" - viewBox="0 0 16 16" - shape-rendering="geometricPrecision" - fill="#abb7ce" - id="svg2" - version="1.1" - inkscape:version="0.48.4 r9939" - sodipodi:docname="topicon_white.svg" - inkscape:export-filename="/home/rasmus/studip/trunk/public/plugins_packages/data-quest/PluginMarket/assets/topicon.png" - inkscape:export-xdpi="90" - inkscape:export-ydpi="90"> - <metadata - id="metadata16"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title /> - </cc:Work> - </rdf:RDF> - </metadata> - <defs - id="defs14" /> - <sodipodi:namedview - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1" - objecttolerance="10" - gridtolerance="10" - guidetolerance="10" - inkscape:pageopacity="0" - inkscape:pageshadow="2" - inkscape:window-width="1098" - inkscape:window-height="480" - id="namedview12" - showgrid="false" - inkscape:zoom="14.75" - inkscape:cx="8" - inkscape:cy="8" - inkscape:window-x="75" - inkscape:window-y="34" - inkscape:window-maximized="0" - inkscape:current-layer="svg2" /> - <g - id="g4" - transform="matrix(1.0042758,0,0,1.0265994,-3.0790176e-4,0.10218438)" - style="fill:#ffffff"> - <g - id="g6" - style="fill:#ffffff"> - <polygon - points="1.649,3.179 1.65,4.128 14.977,4.119 14.995,13.402 15.928,12.424 15.928,3.179 8.182,3.179 7.367,1.256 3.587,1.256 2.77,3.179 " - id="polygon8" - style="fill:#ffffff" /> - <path - d="M 0.072,4.756 V 14 H 14.351 V 4.756 H 0.072 z M 13.25,12.929 H 1.041 v -7 H 13.25 v 7 z" - id="path10" - inkscape:connector-curvature="0" - style="fill:#ffffff" /> - </g> - </g> - <g - transform="matrix(0.42659634,0,0,0.43508855,3.9062193,6.1914927)" - id="g4-8" - style="fill:#ffffff"> - <path - inkscape:connector-curvature="0" - d="m 11.348,7.312 c 0.788,0.008 1.464,0.478 1.779,1.146 V 4.747 H 9.053 C 9.686,4.418 10.126,3.773 10.134,3.01 10.145,1.91 9.264,1.01 8.164,0.999 7.064,0.988 6.163,1.871 6.152,2.97 6.143,3.745 6.585,4.411 7.229,4.747 H 2.873 V 15.001 H 5.824 C 5.18,14.665 4.739,13.988 4.747,13.213 c 0.011,-1.101 0.912,-1.982 2.011,-1.972 1.1,0.011 1.982,0.912 1.971,2.013 -0.008,0.763 -0.449,1.419 -1.083,1.747 h 5.481 v -4.845 c -0.323,0.679 -1.02,1.146 -1.82,1.137 -1.101,-0.01 -1.983,-0.91 -1.972,-2.01 0.011,-1.1 0.913,-1.982 2.013,-1.971 z" - id="path6" - style="fill:#ffffff" /> - </g> -</svg> +<svg fill="#abb7ce" height="16" shape-rendering="geometricPrecision" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#fff"><g transform="matrix(1.0042758 0 0 1.0265994 -.000308 .102184)"><path d="m1.649 3.179.001.949 13.327-.009.018 9.283.933-.978v-9.245h-7.746l-.815-1.923h-3.78l-.817 1.923z"/><path d="m.072 4.756v9.244h14.279v-9.244zm13.178 8.173h-12.209v-7h12.209z"/></g><path d="m11.348 7.312c.788.008 1.464.478 1.779 1.146v-3.711h-4.074c.633-.329 1.073-.974 1.081-1.737.011-1.1-.87-2-1.97-2.011s-2.001.872-2.012 1.971c-.009.775.433 1.441 1.077 1.777h-4.356v10.254h2.951c-.644-.336-1.085-1.013-1.077-1.788.011-1.101.912-1.982 2.011-1.972 1.1.011 1.982.912 1.971 2.013-.008.763-.449 1.419-1.083 1.747h5.481v-4.845c-.323.679-1.02 1.146-1.82 1.137-1.101-.01-1.983-.91-1.972-2.01s.913-1.982 2.013-1.971z" transform="matrix(.42659634 0 0 .43508855 3.906219 6.191493)"/></g></svg> \ No newline at end of file diff --git a/controllers/market_controller.php b/classes/MarketController.php similarity index 100% rename from controllers/market_controller.php rename to classes/MarketController.php diff --git a/classes/MarketRelease.class.php b/classes/MarketRelease.class.php index a10913d2b78154f51821518e7cc9f05889bd0364..e29db9bf69287e2a2a88c4102e06879f430fdb31 100755 --- a/classes/MarketRelease.class.php +++ b/classes/MarketRelease.class.php @@ -154,7 +154,7 @@ class MarketRelease extends SimpleORMap { = $this['studip_max_version'] = $matches[1].".99"; if (!$this['studip_max_version']) { - PageLayout::postMessage(MessageBox::info(sprintf(_("Die studipMaxVersion wurde auf %s gesetzt, da keine andere angegeben wurde."), $manifest['studipMaxVersion']))); + PageLayout::postInfo(sprintf(_("Die studipMaxVersion wurde auf %s gesetzt, da keine andere angegeben wurde."), $manifest['studipMaxVersion'])); } } if (version_compare($this['studip_min_version'], $this['studip_max_version'], ">")) { @@ -242,4 +242,4 @@ class MarketRelease extends SimpleORMap { } } -} \ No newline at end of file +} diff --git a/controllers/approving.php b/controllers/approving.php index bf2f8c3d5b326e3a9157958441f37625fdb560da..0d9b50935330ccd12dcd8589bf3e03b3321bb7a5 100755 --- a/controllers/approving.php +++ b/controllers/approving.php @@ -1,6 +1,4 @@ <?php -require_once 'market_controller.php'; - class ApprovingController extends MarketController { @@ -63,8 +61,8 @@ class ApprovingController extends MarketController "pluginreview" ); - PageLayout::postMessage(MessageBox::success(_("Review wurde gespeichert."))); + PageLayout::postSuccess(_("Review wurde gespeichert.")); $this->redirect('approving/overview'); } -} \ No newline at end of file +} diff --git a/controllers/extern.php b/controllers/extern.php index 6d6054627d6397cbe4ae5376945c25b41798af0a..de78bc644d9549886b7cf5b4ea516968791af57c 100755 --- a/controllers/extern.php +++ b/controllers/extern.php @@ -1,6 +1,4 @@ <?php -require_once 'market_controller.php'; - class ExternController extends MarketController { public function before_filter(&$action, &$args) diff --git a/controllers/myplugins.php b/controllers/myplugins.php index 564c8a0b0d8ad4737239421d00287fdcb4af0ade..01ada8cdf99fa5a827f7bfd0dce1430bbb38b998 100755 --- a/controllers/myplugins.php +++ b/controllers/myplugins.php @@ -1,6 +1,4 @@ <?php -require_once 'market_controller.php'; - class MypluginsController extends MarketController { public function before_filter(&$action, &$args) diff --git a/controllers/presenting.php b/controllers/presenting.php index 9be63f0c8b49d583c22e18174b319e22cb68ab8e..9affc0fdbefbdd8cd2fd2618790e354b360ed5eb 100755 --- a/controllers/presenting.php +++ b/controllers/presenting.php @@ -1,11 +1,9 @@ <?php -require_once 'market_controller.php'; - class PresentingController extends MarketController { protected $last_pluginmarket_visit = null; - function before_filter(&$action, &$args) + public function before_filter(&$action, &$args) { parent::before_filter($action, $args); @@ -70,9 +68,9 @@ class PresentingController extends MarketController // Create options for all studip versions $_SESSION['pluginmarket']['version'] = Request::submitted('version') ? Request::get('version') : $_SESSION['pluginmarket']['version']; - $options[] = "<option value='".URLHelper::getLink('', array('version' => 0))."'>"._('Alle Versionen')."</option>"; + $options[] = "<option value='".URLHelper::getLink('', ['version' => 0])."'>"._('Alle Versionen')."</option>"; foreach (array_reverse(PluginMarket::getStudipReleases()) as $version) { - $options[] = "<option value='".URLHelper::getLink('', array('version' => $version))."' ".($_SESSION['pluginmarket']['version'] == $version ? "SELECTED" : "").">$version</option>"; + $options[] = "<option value='".URLHelper::getLink('', ['version' => $version])."' ".(($_SESSION['pluginmarket']['version'] ?? null) == $version ? "SELECTED" : "").">$version</option>"; } $versionWidget->addElement(new WidgetElement('<select style="width: 100%" onchange="location = this.options[this.selectedIndex].value;">'.join("", $options).'</select>')); @@ -80,7 +78,8 @@ class PresentingController extends MarketController $sidebar->addWidget($versionWidget, 'comments'); } - public function overview_action() { + public function overview_action() + { if ($GLOBALS['perm']->have_perm("user")) { if ($this->last_pluginmarket_visit !== time()) { $this->new_plugins = MarketPlugin::findBySql("publiclyvisible = 1 AND approved = 1 AND published > ? ORDER BY mkdate DESC", array($this->last_pluginmarket_visit)); @@ -108,10 +107,12 @@ class PresentingController extends MarketController $this->best_plugins[] = MarketPlugin::buildExisting($data); } + $this->showall = false; $this->render_action('overview_'.$_SESSION['pluginmarket']['view']); } - public function all_action() { + public function all_action() + { if (Request::get("search")) { $this->plugins = MarketPlugin::findBySQL(" ( @@ -162,7 +163,8 @@ class PresentingController extends MarketController $this->render_action('overview_'.$_SESSION['pluginmarket']['view']); } - public function details_action($plugin_id) { + public function details_action($plugin_id) + { $this->marketplugin = MarketPlugin::find($plugin_id); if (!$this->marketplugin) { throw new Trails_Exception(404); @@ -172,7 +174,7 @@ class PresentingController extends MarketController if (Request::isPost() && Request::submitted("delete_plugin") && $this->marketplugin->isRootable()) { $this->marketplugin->delete(); - PageLayout::postMessage(MessageBox::success(_("Plugin wurde gelöscht."))); + PageLayout::postSuccess(_("Plugin wurde gelöscht.")); $this->redirect('presenting/overview'); return; } @@ -190,12 +192,13 @@ class PresentingController extends MarketController $actions->addLink( _('Nutzung mitteilen'), $this->url_for('presenting/propose_usage/'.$this->marketplugin->id), - Icon::create('add', "clickable") + Icon::create('add') )->asDialog('size=auto'); $sidebar->addWidget($actions); } - public function propose_usage_action($plugin_id) { + public function propose_usage_action($plugin_id) + { $this->plugin = new MarketPlugin($plugin_id); // Submit propose usage @@ -211,7 +214,8 @@ class PresentingController extends MarketController $this->most_used = DBManager::get()->fetchFirst('SELECT name FROM pluginmarket_plugin_usages WHERE user_id = ? AND name NOT IN (SELECT name FROM pluginmarket_plugin_usages WHERE plugin_id = ?) GROUP BY name ORDER BY count(*)', array(User::findCurrent()->id, $plugin_id)); } - public function delete_usage_action($usage_id) { + public function delete_usage_action($usage_id) + { $usage = MarketPluginUsage::find($usage_id); if ($usage->isEditable()) { $plugin_id = $usage->plugin->id; @@ -222,7 +226,8 @@ class PresentingController extends MarketController } } - public function review_action($plugin_id) { + public function review_action($plugin_id) + { $reviews = MarketReview::findBySQL("plugin_id = ? AND user_id = ?", array($plugin_id, $GLOBALS['user']->id)); if (count($reviews)) { $this->review = $reviews[0]; @@ -237,9 +242,10 @@ class PresentingController extends MarketController } } - public function save_review_action($plugin_id) { + public function save_review_action($plugin_id) + { if (!Request::isPost()) { - throw new Exception("Wrong method, use POST."); + throw new MethodNotAllowedException(); } $this->marketplugin = MarketPlugin::find($plugin_id); if (!$this->marketplugin) { @@ -270,7 +276,7 @@ class PresentingController extends MarketController Assets::image_path("icons/blue/star.svg") ); - PageLayout::postMessage(MessageBox::success(_("Review/Bewertung wurde gespeichert."))); + PageLayout::postSuccess(_("Review/Bewertung wurde gespeichert.")); $this->redirect('presenting/details/' . $plugin_id); } @@ -287,7 +293,8 @@ class PresentingController extends MarketController $this->render_text($release->getContent()); } - public function image_action($image_id) { + public function image_action($image_id) + { $this->image = new MarketImage($image_id); $this->set_content_type($this->image['mimetype']); @@ -296,7 +303,8 @@ class PresentingController extends MarketController $this->render_nothing(); } - public function follow_release_action($release_id) { + public function follow_release_action($release_id) + { $this->release = new MarketRelease($release_id); $this->following = MarketReleaseFollower::findByUserAndRelease($GLOBALS['user']->id, $release_id); @@ -309,7 +317,7 @@ class PresentingController extends MarketController $this->following['url'] = Request::get("url"); $this->following['security_token'] = Request::get("security_token") ? Request::get("security_token") : null; $this->following->store(); - PageLayout::postMessage(MessageBox::success(_("Daten wurden gespeichert."))); + PageLayout::postSuccess(_("Daten wurden gespeichert.")); } if (Request::isXhr()) { @@ -318,7 +326,8 @@ class PresentingController extends MarketController } } - public function register_for_pluginnews_action($plugin_id) { + public function register_for_pluginnews_action($plugin_id) + { $this->marketplugin = MarketPlugin::find($plugin_id); if (Request::isPost()) { if (Request::submitted("follow")) { @@ -326,11 +335,11 @@ class PresentingController extends MarketController $following['plugin_id'] = $plugin_id; $following['user_id'] = $GLOBALS['user']->id; $following->store(); - PageLayout::postMessage(MessageBox::success(_("Sie bekommen nun Informationen zu Updates dieses Plugins zugeschickt."))); + PageLayout::postSuccess(_("Sie bekommen nun Informationen zu Updates dieses Plugins zugeschickt.")); } elseif(Request::submitted("unfollow")) { $following = MarketPluginFollower::findByUserAndPlugin($GLOBALS['user']->id, $plugin_id); $following->delete(); - PageLayout::postMessage(MessageBox::success(_("Sie werden jetzt keine weiteren Neuigkeiten über dieses Plugin als Stud.IP Nachricht bekommen."))); + PageLayout::postSuccess(_("Sie werden jetzt keine weiteren Neuigkeiten über dieses Plugin als Stud.IP Nachricht bekommen.")); } } @@ -347,7 +356,7 @@ class PresentingController extends MarketController $version = $release->version; $plugin = $release->plugin; $release->delete(); - PageLayout::postMessage(MessageBox::success(sprintf(_("Das Pluginrelease %s wurde gelöscht."), $version))); + PageLayout::postSuccess(sprintf(_("Das Pluginrelease %s wurde gelöscht."), $version)); $this->redirect($this->url_for('presenting/details/' . $plugin->id)); return; } diff --git a/controllers/rss.php b/controllers/rss.php index b376668c2c1c49ce46d261fe25d8fcf7d3fabd8a..ef6a8fd6f8303d08c17eecad974b0610d972b892 100755 --- a/controllers/rss.php +++ b/controllers/rss.php @@ -1,6 +1,4 @@ <?php -require_once 'market_controller.php'; - class RssController extends MarketController { public function before_filter(&$action, &$args) @@ -58,4 +56,4 @@ class RssController extends MarketController $this->render_text($doc->saveXML()); } -} \ No newline at end of file +} diff --git a/controllers/tools.php b/controllers/tools.php index 5bdbb9509c832b88b54df163fa161c5818b22f14..400f39a841c47663ae20a2e8bc703821eb11d3f3 100755 --- a/controllers/tools.php +++ b/controllers/tools.php @@ -1,6 +1,4 @@ <?php -require_once 'market_controller.php'; - class ToolsController extends MarketController { public function sidebar_graphics_generator_action() @@ -8,4 +6,4 @@ class ToolsController extends MarketController PageLayout::addScript($this->plugin->getPluginURL()."/assets/sidebar/jquery.color.js"); PageLayout::addScript($this->plugin->getPluginURL()."/assets/sidebar/sidebar_graphics_generator.js"); } -} \ No newline at end of file +} diff --git a/controllers/update.php b/controllers/update.php index 7bb7c4dafa53e1057767a67b256f228566879cd5..f59b4b3dd52e602889f37e3047bdb57140785351 100755 --- a/controllers/update.php +++ b/controllers/update.php @@ -1,6 +1,4 @@ <?php -require_once 'market_controller.php'; - class UpdateController extends MarketController { public function release_action($release_id) @@ -31,12 +29,14 @@ class UpdateController extends MarketController } } - public function usage_action() { + public function usage_action() + { $this->plugins = MarketPlugin::findManyByName(Request::getArray('plugins')); $this->mostlikely = MarketPluginUsage::findOneBySQL('user_id = ? GROUP BY name ORDER BY count(*) DESC', array(User::findCurrent()->id))->name; } - public function save_usage_action() { + public function save_usage_action() + { // delete old usage MarketPluginUsage::deleteBySQL('user_id = ? AND name = ?', array(User::findCurrent()->id, Request::get('tag'))); @@ -63,4 +63,4 @@ class UpdateController extends MarketController $calculatedHash = hash_hmac($algorithm, $payload, $secret); return $calculatedHash === $hash; } -} \ No newline at end of file +} diff --git a/views/approving/overview.php b/views/approving/overview.php index de230a077e056b744e842652d346d1bbbbbee27c..2520f49703c8f4ec92074a3a405dfbc5b1a190ce 100755 --- a/views/approving/overview.php +++ b/views/approving/overview.php @@ -26,7 +26,7 @@ </td> <td class="actions"> <a href="<?= $controller->url_for('approving/review/' . $marketplugin->getId()) ?>" data-dialog> - <?= Icon::create('assessment', 'clickable')->asImg(20) ?> + <?= Icon::create('assessment')->asImg(20) ?> </a> </td> </tr> diff --git a/views/myplugins/_collaborator.php b/views/myplugins/_collaborator.php index 6b2c28568a1ead2d6dfff68ed5423090dee82747..8a9dc044ea70bae345893044ffbae9df35e6eb30 100755 --- a/views/myplugins/_collaborator.php +++ b/views/myplugins/_collaborator.php @@ -10,6 +10,6 @@ </span> <input type="hidden" name="collaborator[]" value="<?= htmlReady($user->getId()) ?>"> <label for="drop_collaborator_<?= htmlReady($user->getId()) ?>" style="cursor: pointer; display: inline;"> - <?= Icon::create("trash", "clickable")->asImg(20, array('class' => "text-bottom")) ?> + <?= Icon::create('trash')->asImg(20, ['class' => 'text-bottom']) ?> </label> -</li> \ No newline at end of file +</li> diff --git a/views/myplugins/_edit_images.php b/views/myplugins/_edit_images.php index d6c0d285022bb5eb68d18d1ab5916adf274548c5..6ed4e19f0bdb11e6facda5a91d1296fb50805dbd 100755 --- a/views/myplugins/_edit_images.php +++ b/views/myplugins/_edit_images.php @@ -15,7 +15,7 @@ </a> <input type="hidden" name="image_order[]" value="<?= htmlReady($image->getId()) ?>"> <label for="delete_image_<?= htmlReady($image->getId()) ?>"> - <?= Icon::create('trash', 'clickable', ['style' => "cursor: pointer;"]) ?> + <?= Icon::create('trash')->asImg(['style' => 'cursor: pointer;']) ?> </label> </div> </li> @@ -30,7 +30,7 @@ <div id="new_image_container"> <div> <label> - <?= Icon::create('upload', 'clickable', ['class' => "text-bottom", 'style' => "cursor: pointer;"]) ?> + <?= Icon::create('upload')->asImg(['class' => 'text-bottom', 'style' => 'cursor: pointer;']) ?> <input type="file" name="new_images[]"> </label> <a href="#" @@ -38,4 +38,4 @@ </div> </div> <?= \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> \ No newline at end of file +</fieldset> diff --git a/views/myplugins/overview.php b/views/myplugins/overview.php index 595a35b9d5c538d93dc86b9518da142f9cb8c8c7..e0f2b0c625c73969dd19f27b2d729a261e4a02a3 100755 --- a/views/myplugins/overview.php +++ b/views/myplugins/overview.php @@ -48,10 +48,10 @@ </td> <td class="actions"> <a href="<?= $controller->url_for('myplugins/edit/' . $marketplugin->getId()) ?>" data-dialog title="<?= _("Plugin-Info bearbeiten") ?>"> - <?= Icon::create('edit', 'clickable')->asImg(20) ?> + <?= Icon::create('edit')->asImg(20) ?> </a> <a href="<?= $controller->url_for('myplugins/add_release/' . $marketplugin->getId()) ?>" data-dialog title="<?= _("Neues Release hinzufügen") ?>"> - <?= Icon::create('add', 'clickable')->asImg(20) ?> + <?= Icon::create('add')->asImg(20) ?> </a> </td> </tr> diff --git a/views/presenting/details.php b/views/presenting/details.php index d909e1c92fb5f9ba46609344ea5bdf9f78dc9cb7..064fa1de87eb4fab680fb163cc076282aad57c4e 100755 --- a/views/presenting/details.php +++ b/views/presenting/details.php @@ -11,7 +11,7 @@ if ($image) { ?> <? if (!$marketplugin['publiclyvisible']) : ?> - <?= PageLayout::postMessage(MessageBox::info(_("Dieses Plugin ist nicht öffentlich."))) ?> + <?= MessageBox::info(_("Dieses Plugin ist nicht öffentlich."))->hideClose() ?> <? endif ?> <h1><?= htmlReady($marketplugin['name']) ?></h1> @@ -38,7 +38,7 @@ if ($image) { <? if ($marketplugin->isWritable()) : ?> <div> <a href="<?= PluginEngine::getLink($plugin, array(), "myplugins/edit_images/". $marketplugin->getId()) ?>" data-dialog title="<?= _("Galerie bearbeiten / neue Bilder hinzufügen") ?>"> - <?= Icon::create("add", "clickable")->asImg("20px") ?> + <?= Icon::create('add')->asImg(20) ?> </a> </div> <? endif ?> @@ -57,7 +57,7 @@ if ($image) { <? endif; ?> <? if ($use->isEditable()): ?> <a href="<?= PluginEngine::getLink($plugin, array(), "presenting/delete_usage/" . $use->id) ?>"> - <?= Icon::create('trash', "clickable")->asImg("20px"); ?> + <?= Icon::create('trash')->asImg(20) ?> </a> <? endif; ?> </li> @@ -65,36 +65,36 @@ if ($image) { </ul> <? if ($marketplugin['url']) : ?> - <h2><?= _("Projekthomepage") ?></h2> + <h2><?= _('Projekthomepage') ?></h2> <div><?= formatLinks($marketplugin['url']) ?></div> <? endif ?> <? $tags = $marketplugin->getTags() ?> <? if (count($tags)) : ?> - <h2><?= _("Schlagworte") ?></h2> + <h2><?= _('Schlagworte') ?></h2> <div> <? foreach ($tags as $key => $tag) : ?> <?= $key > 0 ? "," : "" ?> - <a href="<?= URLHelper::getLink("plugins.php/pluginmarket/presenting/all", array('tag' => $tag)) ?>"> - <?= Icon::create("tag", "clickable")->asImg("20px", array('class' => "text-bottom")) ?> + <a href="<?= URLHelper::getLink('plugins.php/pluginmarket/presenting/all', ['tag' => $tag]) ?>"> + <?= Icon::create('tag')->asImg(20, ['class' => 'text-bottom']) ?> <?= htmlReady(ucwords($tag)) ?> </a> <? endforeach ?> </div> <? endif ?> -<h2><?= _("Zum Autor") ?></h2> +<h2><?= _('Zum Autor') ?></h2> <ul class="clean plugins_authors"> <li> <? $author = User::find($marketplugin['user_id']) ?> <div> <? if ($author) : ?> - <a href="<?= URLHelper::getLink("dispatch.php/profile", array('username' => $author['username'])) ?>" style="text-align: center; display: inline-block; vertical-align: top;"> + <a href="<?= URLHelper::getLink('dispatch.php/profile', ['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> <? else : ?> - <?= _("unbekannt") ?> + <?= _('unbekannt') ?> <? endif ?> </div> </li> @@ -110,16 +110,16 @@ if ($image) { <? endforeach ?> </ul> -<h2><?= _("Releases") ?></h2> +<h2><?= _('Releases') ?></h2> <table class="default"> <thead> <tr> - <th><?= _("Version") ?></th> - <th><?= _("Min. Stud.IP Version") ?></th> - <th><?= _("Max. Stud.IP Version") ?></th> - <th><?= _("Hochgeladen am") ?></th> - <th><?= _("MD5-Prüfsumme") ?></th> - <th><?= _("Downloads") ?></th> + <th><?= _('Version') ?></th> + <th><?= _('Min. Stud.IP Version') ?></th> + <th><?= _('Max. Stud.IP Version') ?></th> + <th><?= _('Hochgeladen am') ?></th> + <th><?= _('MD5-Prüfsumme') ?></th> + <th><?= _('Downloads') ?></th> <th></th> </tr> </thead> @@ -127,8 +127,8 @@ if ($image) { <? foreach ($marketplugin->releases->orderBy('version DESC') as $release) : ?> <tr> <td> - <a href="<?= PluginEngine::getLink($plugin, array(), "presenting/download/". $release->getId()) ?>" title="<?= _("Dieses Release runterladen") ?>"> - <?= Icon::create("download", "clickable")->asImg("20px", array('class' => "text-bottom")) ?> + <a href="<?= PluginEngine::getLink($plugin, [], 'presenting/download/' . $release->getId()) ?>" title="<?= _("Dieses Release runterladen") ?>"> + <?= Icon::create('download')->asImg(20, ['class' => 'text-bottom']) ?> <?= htmlReady($release['version']) ?> </a> </td> @@ -139,16 +139,16 @@ if ($image) { <td><?= htmlReady($release['downloads']) ?></td> <td class="actions"> <? if ($marketplugin->isWritable()) : ?> - <a href="<?= PluginEngine::getLink($plugin, array(), "myplugins/edit_release/" . $release->getId()) ?>" data-dialog> - <?= Icon::create("edit", "clickable")->asImg("20px", array('class' => "text-bottom")) ?> + <a href="<?= PluginEngine::getLink($plugin, [], "myplugins/edit_release/" . $release->getId()) ?>" data-dialog> + <?= Icon::create('edit')->asImg(20, ['class' => "text-bottom"]) ?> </a> - <a href="<?= PluginEngine::getLink($plugin, array(), "presenting/delete_release/" . $release->getId()) ?>"> - <?= Icon::create("trash", "clickable")->asImg("20px", array('class' => "text-bottom", 'onclick' => "return window.confirm('"._("Pluginrelease wirklich unwiderrufbar löschen?")."');")) ?> + <a href="<?= PluginEngine::getLink($plugin, [], "presenting/delete_release/" . $release->getId()) ?>"> + <?= Icon::create('trash')->asImg(20, ['class' => 'text-bottom', 'data-confirm' => _('Pluginrelease wirklich unwiderrufbar löschen?')]) ?> </a> <? endif ?> <? if ($GLOBALS['perm']->have_perm("autor")) : ?> - <a href="<?= PluginEngine::getLink($plugin, array(), "presenting/follow_release/" . $release->getId()) ?>" title="<?= _("Für automatische Updates registrieren.") ?>" data-dialog> - <?= Icon::create("rss", "clickable")->asImg("20px", array('class' => "text-bottom")) ?> + <a href="<?= PluginEngine::getLink($plugin, [], "presenting/follow_release/" . $release->getId()) ?>" title="<?= _('Für automatische Updates registrieren.') ?>" data-dialog> + <?= Icon::create('rss')->asImg(20, ['class' => 'text-bottom']) ?> </a> <? endif ?> </td> @@ -159,8 +159,8 @@ if ($image) { <tfoot> <tr> <td colspan="7"> - <a href="<?= PluginEngine::getLink($plugin, array(), "myplugins/add_release/" . $marketplugin->getId()) ?>" data-dialog> - <?= Icon::create("add", "clickable")->asImg("20px", array('class' => "text-bottom")) ?> + <a href="<?= PluginEngine::getLink($plugin, [], 'myplugins/add_release/' . $marketplugin->getId()) ?>" data-dialog> + <?= Icon::create('add')->asImg(20, ['class' => 'text-bottom']) ?> </a> </td> </tr> @@ -195,7 +195,7 @@ if ($image) { <script id='fbowlml'>(function(i){var f,s=document.getElementById(i);f=document.createElement('iframe');f.src='//api.flattr.com/button/view/?uid=<?= urlencode($flattr_username) ?>&url='+encodeURIComponent(document.URL)+'&title=<?= urlencode($marketplugin['name']." "._("für Stud.IP")) ?>';f.title='Flattr';f.height=62;f.width=55;f.style.borderWidth=0;s.parentNode.insertBefore(f,s);})('fbowlml');</script> <? endif ?> - <? if ($bitcoin_wallet) : ?> + <? if (!empty($bitcoin_wallet)) : ?> <script src="http://coinwidget.com/widget/coin.js"></script> <script> CoinWidgetCom.go({ @@ -252,16 +252,16 @@ if ($image) { <? endif ?> <? $marketplugin['rating'] = round($marketplugin['rating'], 1) / 2 ?> <? $v = $marketplugin['rating'] >= 0.75 ? 3 : ($marketplugin['rating'] >= 0.25 ? 2 : "") ?> - <?= Icon::create($plugin->getPluginURL()."/assets/".$icon_prefix."star$v.svg")->asImg("50px") ?> + <?= Icon::create($plugin->getPluginURL()."/assets/".($icon_prefix ?? '')."star$v.svg")->asImg("50px") ?> <? $v = $marketplugin['rating'] >= 1.75 ? 3 : ($marketplugin['rating'] >= 1.25 ? 2 : "") ?> - <?= Icon::create($plugin->getPluginURL()."/assets/".$icon_prefix."star$v.svg")->asImg("50px") ?> + <?= Icon::create($plugin->getPluginURL()."/assets/".($icon_prefix ?? '')."star$v.svg")->asImg("50px") ?> <? $v = $marketplugin['rating'] >= 2.75 ? 3 : ($marketplugin['rating'] >= 2.25 ? 2 : "") ?> - <?= Icon::create($plugin->getPluginURL()."/assets/".$icon_prefix."star$v.svg")->asImg("50px") ?> + <?= Icon::create($plugin->getPluginURL()."/assets/".($icon_prefix ?? '')."star$v.svg")->asImg("50px") ?> <? $v = $marketplugin['rating'] >= 3.75 ? 3 : ($marketplugin['rating'] >= 3.25 ? 2 : "") ?> - <?= Icon::create($plugin->getPluginURL()."/assets/".$icon_prefix."star$v.svg")->asImg("50px") ?> + <?= Icon::create($plugin->getPluginURL()."/assets/".($icon_prefix ?? '')."star$v.svg")->asImg("50px") ?> <? $v = $marketplugin['rating'] >= 4.75 ? 3 : ($marketplugin['rating'] >= 4.25 ? 2 : "") ?> - <?= Icon::create($plugin->getPluginURL()."/assets/".$icon_prefix."star$v.svg")->asImg("50px") ?> + <?= Icon::create($plugin->getPluginURL()."/assets/".($icon_prefix ?? '')."star$v.svg")->asImg("50px") ?> <? if (!$marketplugin->isWritable()) : ?> </a> <? endif ?> diff --git a/views/presenting/overview_tiles.php b/views/presenting/overview_tiles.php index 9e078e7e8723ddb243924d734b4a11568f614542..731d0ae2bc54ba763e1670f297aaa19a744161c8 100755 --- a/views/presenting/overview_tiles.php +++ b/views/presenting/overview_tiles.php @@ -35,4 +35,4 @@ <?= $this->render_partial("presenting/_plugin_short.php", compact("marketplugin", "plugin")) ?> <? endforeach ?> </div> -<? endif ?> \ No newline at end of file +<? endif ?> diff --git a/views/presenting/users_plugins.php b/views/presenting/users_plugins.php index 2c712d82da0b89590bd1cd612e84962c93d3c2c6..8e5fb17caae1f395631dbe83550c4987693d1834 100755 --- a/views/presenting/users_plugins.php +++ b/views/presenting/users_plugins.php @@ -11,15 +11,15 @@ <? $score = round($score, 1) / 2 ?> <span class="starscore"> <? $v = $score >= 1 ? 3 : ($score >= 0.5 ? 2 : "") ?> - <?= Icon::create($plugin->getPluginURL() . "/assets/star$v.svg")->asImg('16px')?> + <?= Icon::create($plugin->getPluginURL() . "/assets/star$v.svg") ?> <? $v = $score >= 2 ? 3 : ($score >= 1.5 ? 2 : "") ?> - <?= Icon::create($plugin->getPluginURL() . "/assets/star$v.svg")->asImg('16px')?> + <?= Icon::create($plugin->getPluginURL() . "/assets/star$v.svg") ?> <? $v = $score >= 3 ? 3 : ($score >= 2.5 ? 2 : "") ?> - <?= Icon::create($plugin->getPluginURL() . "/assets/star$v.svg")->asImg('16px')?> + <?= Icon::create($plugin->getPluginURL() . "/assets/star$v.svg") ?> <? $v = $score >= 4 ? 3 : ($score >= 3.5 ? 2 : "") ?> - <?= Icon::create($plugin->getPluginURL() . "/assets/star$v.svg")->asImg('16px')?> + <?= Icon::create($plugin->getPluginURL() . "/assets/star$v.svg") ?> <? $v = $score > 4.5 ? 3 : ($score >= 4.5 ? 2 : "") ?> - <?= Icon::create($plugin->getPluginURL() . "/assets/star$v.svg")->asImg('16px')?> + <?= Icon::create($plugin->getPluginURL() . "/assets/star$v.svg") ?> </span> </td> <td> @@ -27,7 +27,7 @@ <? foreach ($marketplugin->getTags() as $key => $tag): ?> <?= $key > 0 ? "," : "" ?> <a href="<?= PluginEngine::getLink($plugin, compact('tag'), 'presenting/all') ?>"> - <?= Icon::create("tag", 'clickable', ['class' => "text-bottom"]) ?> + <?= Icon::create('tag')->asImg(['class' => 'text-bottom']) ?> <?= htmlReady(ucwords($tag)) ?> </a> <? endforeach; ?> @@ -35,4 +35,4 @@ </td> </tr> <? endforeach; ?> -</table> \ No newline at end of file +</table>