Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit aa8b8be

Browse files
author
Jamie Snape
committed
Revise readmes module configuration form
1 parent 0d773aa commit aa8b8be

File tree

3 files changed

+28
-47
lines changed

3 files changed

+28
-47
lines changed

modules/readmes/configs/module.ini

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1+
; MIDAS Server. Copyright Kitware SAS. Licensed under the Apache License 2.0.
2+
13
[global]
2-
; version of the module
3-
version = 1.0.0
4-
; full name
5-
fullname = Readmes
6-
; description
7-
description = "Enables display of Readme files for Folders and Communities"
8-
; category
9-
category = Core
4+
fullname = "READMEs"
5+
description = "Display README files for communities and folders"
6+
category = "Core"
7+
uuid = "b53696e3-40f6-4a92-b96d-7bbce6562c57"
8+
version = "1.0.0"

modules/readmes/controllers/ConfigController.php renamed to modules/readmes/controllers/AdminController.php

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,16 @@
1818
limitations under the License.
1919
=========================================================================*/
2020

21-
/**
22-
* Readmes_ConfigController
23-
*
24-
* @category Midas modules
25-
* @package readmes
26-
*/
27-
class Readmes_ConfigController extends Readmes_AppController
21+
/** Admin controller for the readmes module. */
22+
class Readmes_AdminController extends Readmes_AppController
2823
{
29-
public $_components = array('Breadcrumb');
24+
/** @var array */
25+
public $_models = array('Setting');
3026

31-
/**
32-
* @throws Zend_Exception on invalid userSession
33-
*/
27+
/** Index action */
3428
public function indexAction()
3529
{
3630
$this->requireAdminPrivileges();
37-
38-
$iconPath = $this->view->moduleWebroot.'/public/images/page_white_text.png';
39-
$breadcrumbs = array();
40-
$breadcrumbs[] = array('type' => 'moduleList');
41-
$breadcrumbs[] = array('type' => 'custom', 'text' => 'Readme Module Configuration', 'icon' => $iconPath);
42-
$this->Component->Breadcrumb->setBreadcrumbHeader($breadcrumbs, $this->view);
31+
$this->view->pageTitle = 'READMEs Module Configuration';
4332
}
4433
}

modules/readmes/views/config/index.phtml renamed to modules/readmes/views/admin/index.phtml

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,21 @@
1717
See the License for the specific language governing permissions and
1818
limitations under the License.
1919
=========================================================================*/
20-
?>
21-
<div class="viewMain">
22-
<div class="genericWrapperTopRight">
23-
<?php
24-
echo '<div style="float:right;margin-right:2px;" class="genericBigButton ">';
25-
echo "<a href='{$this->webroot}/admin#tabs-modules'><img style='float:left;margin-right:2px;' alt='' src='{$this->coreWebroot}/public/images/icons/back.png'/>";
26-
echo $this->t('Back');
27-
echo "</a>";
28-
echo '</div>';
29-
?>
30-
</div>
31-
<h3>Instructions for Use</h3>
32-
33-
<p>This module is intended to provide Readmes for communities as well as
34-
folders. The text of these readmes will be interpreted from
35-
<a href="https://daringfireball.net/projects/markdown/syntax">Markdown</a>
36-
syntax and display in the info tab as well as below the hierarchical
37-
data view.</p>
3820

39-
<p>For communities, place a file named readme, readme.txt, or readme.md
40-
(case insensitive) at the root of the "Public" folder.</p>
21+
$this->declareVars('form', 'pageTitle');
22+
$this->headTitle($this->escape($this->pageTitle));
23+
?>
4124

42-
<p>For folders, place a similarly named file at the root of the folder in
43-
question.</p>
25+
<div class="viewMain">
26+
<h1><?php echo $this->escape($this->pageTitle); ?></h1>
27+
<p>
28+
This module renders README files for communities and folders. The text of these files will be interpreted as
29+
<a href="https://daringfireball.net/projects/markdown/syntax">Markdown</a> syntax and displayed on the info tab
30+
and below the hierarchical data view.
31+
</p>
32+
<p>
33+
For communities, place a file named README, README.txt, or README.md (case insensitive) at the root of the
34+
<i>Public</i> folder. For folders, place a similarly named file at the root of that folder.
35+
</p>
36+
<p><a href="<?php echo $this->url(array('controller' => 'admin', 'action' => 'index'), 'default'); ?>#tabs-modules">&laquo; Back to Modules Administration</a></p>
4437
</div>

0 commit comments

Comments
 (0)