From 0d183f0c8f8e13d1d5c8e39704e71db42ec20623 Mon Sep 17 00:00:00 2001 From: brettp Date: Tue, 6 Apr 2010 22:40:40 +0000 Subject: Added screenshots to plugins list. git-svn-id: http://code.elgg.org/elgg/trunk@5638 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/admin/plugins_opt/plugin.php | 177 ++++++++++++++++++----------- 1 file changed, 110 insertions(+), 67 deletions(-) (limited to 'views/default/admin/plugins_opt') diff --git a/views/default/admin/plugins_opt/plugin.php b/views/default/admin/plugins_opt/plugin.php index c03477bea..7a7b10f63 100644 --- a/views/default/admin/plugins_opt/plugin.php +++ b/views/default/admin/plugins_opt/plugin.php @@ -27,90 +27,133 @@ if ($manifest['elgg_version']) { $ts = time(); $token = generate_action_token($ts); +$active_class = ($active) ? 'active' : 'not_active'; + +$top_url = $up_url = $down_url = $bottom_url = ''; +if ($vars['order'] > 10) { + $top_url = "{$vars['url']}action/admin/plugins/reorder?plugin={$plugin}&order=1&__elgg_token=$token&__elgg_ts=$ts"; + $top_link = '' . elgg_echo('top') . ''; + + $order = $vars['order'] - 11; + + $up_url = "{$vars['url']}action/admin/plugins/reorder?plugin={$plugin}&order=$order&__elgg_token=$token&__elgg_ts=$ts"; + $up_link = '' . elgg_echo('up') . ''; +} + +if ($vars['order'] < $vars['maxorder']) { + $order = $vars['order'] + 11; + $down_url = "{$vars['url']}action/admin/plugins/reorder?plugin={$plugin}&order=$order&__elgg_token=$token&__elgg_ts=$ts"; + $down_link = '' . elgg_echo('down') . ''; + + $order = $vars['maxorder'] + 11; + $bottom_url = "{$vars['url']}action/admin/plugins/reorder?plugin={$plugin}&order=$order&__elgg_token=$token&__elgg_ts=$ts"; + $bottom_link = '' . elgg_echo('bottom') . ''; +} + +if ($active) { + $url = "{$vars['url']}action/admin/plugins/disable?plugin=$plugin&__elgg_token=$token&__elgg_ts=$ts"; + $enable_disable = '' . elgg_echo('disable') . ''; +} else { + $url = "{$vars['url']}action/admin/plugins/enable?plugin=$plugin&__elgg_token=$token&__elgg_ts=$ts"; + $enable_disable = '' . elgg_echo('enable') . ''; +} + + +$categories_list = ''; +if ($manifest['category']) { + $categories_arr = array(); + $base_url = "{$vars['url']}pg/admin/plugins?category="; + + foreach($manifest['category'] as $category) { + $url = $base_url . urlencode($category); + $categories_arr[] = "" . htmlspecialchars($category) . ''; + } + + $categories_list = implode(', ', $categories_arr); +} + +$screenshots = ''; +if ($manifest['screenshot']) { + $base_url = "{$vars['url']}mod/"; + + $limit = 4; + foreach ($manifest['screenshot'] as $screenshot) { + if ($limit <= 0) { + break; + } + + $screenshot_src = $base_url . $plugin . "/$screenshot"; + $screenshots .= "
  • "; + + $limit--; + } +} + ?> -
    "> + +
    - 10) { - $top_url = "{$vars['url']}action/admin/plugins/reorder?plugin={$plugin}&order=1&__elgg_token=$token&__elgg_ts=$ts"; - $order = $vars['order'] - 11; - $up_url = "{$vars['url']}action/admin/plugins/reorder?plugin={$plugin}&order=$order&__elgg_token=$token&__elgg_ts=$ts"; -?> - - - - - - - -
    -
    - - - - - +
    -

    []

    +

    - - - +
    +
    + if (elgg_view_exists("settings/{$plugin}/edit")) { + ?> + ['']'; + +
    $manifest['description'])); ?>
    - : ". htmlspecialchars($manifest['author']) ?>
    +
    : ". htmlspecialchars($manifest['version']) ?>
    - } - - ?> +

    -

    + \ No newline at end of file -- cgit v1.2.3