From b1783ef7f2b24cc177919b85ea3633a35ac1c8c7 Mon Sep 17 00:00:00 2001 From: Greg Roach Date: Fri, 24 Jun 2016 19:04:14 +0100 Subject: FAQ text --- app/Module/FrequentlyAskedQuestionsModule.php | 115 +++++++++++++------------- 1 file changed, 57 insertions(+), 58 deletions(-) (limited to 'app/Module') diff --git a/app/Module/FrequentlyAskedQuestionsModule.php b/app/Module/FrequentlyAskedQuestionsModule.php index e31de2716e..423a721e77 100644 --- a/app/Module/FrequentlyAskedQuestionsModule.php +++ b/app/Module/FrequentlyAskedQuestionsModule.php @@ -133,7 +133,7 @@ class FrequentlyAskedQuestionsModule extends AbstractModule implements ModuleMen $block_id = Filter::getInteger('block_id'); if ($block_id) { - $controller->setPageTitle(I18N::translate('Edit the FAQ item')); + $controller->setPageTitle(/* I18N: FAQ = “Frequently Asked Question” */ I18N::translate('Edit the FAQ')); $header = $this->getBlockSetting($block_id, 'header'); $faqbody = $this->getBlockSetting($block_id, 'faqbody'); $block_order = Database::prepare( @@ -143,7 +143,7 @@ class FrequentlyAskedQuestionsModule extends AbstractModule implements ModuleMen "SELECT gedcom_id FROM `##block` WHERE block_id = :block_id" )->execute(array('block_id' => $block_id))->fetchOne(); } else { - $controller->setPageTitle(I18N::translate('Add an FAQ item')); + $controller->setPageTitle(/* I18N: FAQ = “Frequently Asked Question” */ I18N::translate('Add an FAQ')); $header = ''; $faqbody = ''; $block_order = Database::prepare( @@ -204,7 +204,7 @@ class FrequentlyAskedQuestionsModule extends AbstractModule implements ModuleMen
@@ -214,13 +214,13 @@ class FrequentlyAskedQuestionsModule extends AbstractModule implements ModuleMen

- +

@@ -239,7 +239,7 @@ class FrequentlyAskedQuestionsModule extends AbstractModule implements ModuleMen } /** - * Respond to a request to delete a FAQ. + * Delete an FAQ. */ private function delete() { $block_id = Filter::getInteger('block_id'); @@ -254,7 +254,7 @@ class FrequentlyAskedQuestionsModule extends AbstractModule implements ModuleMen } /** - * Respond to a request to move a FAQ up the list. + * Move an FAQ up the list. */ private function moveup() { $block_id = Filter::getInteger('block_id'); @@ -292,7 +292,7 @@ class FrequentlyAskedQuestionsModule extends AbstractModule implements ModuleMen } /** - * Respond to a request to move a FAQ down the list. + * Move an FAQ down the list. */ private function movedown() { $block_id = Filter::get('block_id'); @@ -441,68 +441,67 @@ class FrequentlyAskedQuestionsModule extends AbstractModule implements ModuleMen

getPageTitle(); ?>

- +

-
- - - - getName(), 'class="form-control"'); ?> - -
+ +

+

+ + + + getName(), 'class="form-control"'); ?> + +
+

- +

'; - if (empty($faqs)) { - echo '', I18N::translate('The FAQ list is empty.'), ''; - } else { - foreach ($faqs as $faq) { - // NOTE: Print the position of the current item - echo ''; - echo I18N::translate('#%s', $faq->block_order + 1), ' '; - if ($faq->gedcom_id === null) { - echo I18N::translate('All'); - } else { - echo $WT_TREE->getTitleHtml(); - } - echo ''; - // NOTE: Print the edit options of the current item - echo ''; - if ($faq->block_order == $min_block_order) { - echo ' '; - } else { - echo ' ', I18N::translate('Move up'), ''; - } - echo ''; - if ($faq->block_order == $max_block_order) { - echo ' '; - } else { - echo ' ', I18N::translate('Move down'), ''; - } - echo ''; - echo ' ', I18N::translate('Edit'), ''; - echo ''; - echo ' ', I18N::translate('Delete'), ''; - echo ''; - // NOTE: Print the title text of the current item - echo ''; - echo '
'; - echo '
', $faq->header, '
'; - // NOTE: Print the body text of the current item - echo '
', substr($faq->faqbody, 0, 1) == '<' ? $faq->faqbody : nl2br($faq->faqbody, false), '
'; + foreach ($faqs as $faq) { + // NOTE: Print the position of the current item + echo ''; + echo I18N::translate('#%s', $faq->block_order + 1), ' '; + if ($faq->gedcom_id === null) { + echo I18N::translate('All'); + } else { + echo $WT_TREE->getTitleHtml(); + } + echo ''; + // NOTE: Print the edit options of the current item + echo ''; + if ($faq->block_order == $min_block_order) { + echo ' '; + } else { + echo ' ', I18N::translate('Move up'), ''; + } + echo ''; + if ($faq->block_order == $max_block_order) { + echo ' '; + } else { + echo ' ', I18N::translate('Move down'), ''; } - echo ''; + echo ''; + echo ' ', I18N::translate('Edit'), ''; + echo ''; + echo ' ', I18N::translate('Delete'), ''; + echo ''; + // NOTE: Print the title text of the current item + echo ''; + echo '
'; + echo '
', $faq->header, '
'; + // NOTE: Print the body text of the current item + echo '
', substr($faq->faqbody, 0, 1) == '<' ? $faq->faqbody : nl2br($faq->faqbody, false), '
'; } + echo ''; } /** @@ -535,7 +534,7 @@ class FrequentlyAskedQuestionsModule extends AbstractModule implements ModuleMen ))->fetchAll(); if ($faqs) { - return new Menu(I18N::translate('FAQ'), 'module.php?mod=faq&mod_action=show', 'menu-help'); + return new Menu($this->getTitle(), 'module.php?mod=faq&mod_action=show', 'menu-help'); } else { return null; } -- cgit v1.3