diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-04-25 18:12:10 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-04-25 18:12:10 +0000 |
commit | 113b813b5a5ec8b93ee72d4f259d8e38f9a9c5e4 (patch) | |
tree | 1148cbb2db3811082755710097ae1e1504b4535b /views/default | |
parent | 822496eed6a0b1b7e53f5b4104bfa47369f3aaf7 (diff) | |
download | elgg-113b813b5a5ec8b93ee72d4f259d8e38f9a9c5e4.tar.gz elgg-113b813b5a5ec8b93ee72d4f259d8e38f9a9c5e4.tar.bz2 |
Fixes #2899, #2870. Added README.txt, CHANGES.txt, COPYRIGHT.txt, LICENSE.txt, and INSTALL.txt as markdown files for plugins. Added page handler to parse and serve them. Added links in plugin admin. Refs #3236. Problems with displaying parsed markdown because of missing parts of the admin theme's CSS.
git-svn-id: http://code.elgg.org/elgg/trunk@9022 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default')
-rw-r--r-- | views/default/object/plugin/advanced.php | 19 | ||||
-rw-r--r-- | views/default/object/plugin/simple.php | 13 |
2 files changed, 32 insertions, 0 deletions
diff --git a/views/default/object/plugin/advanced.php b/views/default/object/plugin/advanced.php index 4b5a3ba48..a346d4ff1 100644 --- a/views/default/object/plugin/advanced.php +++ b/views/default/object/plugin/advanced.php @@ -150,6 +150,24 @@ $website = elgg_view('output/url', array( $copyright = elgg_view('output/text', array('value' => $plugin->manifest->getCopyright())); $license = elgg_view('output/text', array('value' => $plugin->manifest->getLicense())); +// show links to text files +$files = $plugin->getAvailableTextFiles(); + +$docs = ''; +if ($files) { + $docs = '<ul>'; + foreach ($files as $file => $path) { + $url = 'admin_plugin_text_file/' . $plugin->getID() . "/$file"; + $link = elgg_view('output/url', array( + 'text' => $file, + 'href' => $url + )); + $docs .= "<li>$link</li>"; + + } + $docs .= '</ul>'; +} + ?> <div class="elgg-state-draggable elgg-plugin <?php echo $active_class ?>" id="elgg-plugin-<?php echo $plugin->guid; ?>"> @@ -190,6 +208,7 @@ if (elgg_view_exists($settings_view)) { <div class="plugin_description"><?php echo $description; ?></div> <p class="plugin_author"><?php echo $author . ' - ' . $website; ?></p> + <?php echo $docs; ?> <div class="pts"> <?php diff --git a/views/default/object/plugin/simple.php b/views/default/object/plugin/simple.php index 0361666ff..d57d81934 100644 --- a/views/default/object/plugin/simple.php +++ b/views/default/object/plugin/simple.php @@ -42,6 +42,19 @@ if ($website) { $plugin_footer .= "<li><a href=\"$website\">" . elgg_echo('admin:plugins:plugin_website') . '</a></li>'; } +// show links to text files +$files = $plugin->getAvailableTextFiles(); + +foreach ($files as $file => $path) { + $url = 'admin_plugin_text_file/' . $plugin->getID() . "/$file"; + $link = elgg_view('output/url', array( + 'text' => $file, + 'href' => $url + )); + $plugin_footer .= "<li>$link</li>"; + +} + if (elgg_view_exists("settings/$plugin_id/edit")) { $settings_href = elgg_get_site_url() . "admin/plugin_settings/$plugin_id"; $plugin_footer .= "<li><a class='plugin_settings link' href='$settings_href'>" . elgg_echo('settings') . "</a></li>"; |