summaryrefslogtreecommitdiff
path: root/includes/view/Questions_view.php
diff options
context:
space:
mode:
authorBot <bot@myigel.name>2017-01-02 15:43:36 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2017-01-02 15:49:53 +0100
commitd71e7bbfad2f07f82df0c515608996d250fd4182 (patch)
tree5083a17b218c08b3a699a0bf15bec926cc2dd185 /includes/view/Questions_view.php
parent7313e15ce8236e19331fb6639a3a5b97c8f06ecd (diff)
Formatting
Diffstat (limited to 'includes/view/Questions_view.php')
-rw-r--r--includes/view/Questions_view.php42
1 files changed, 21 insertions, 21 deletions
diff --git a/includes/view/Questions_view.php b/includes/view/Questions_view.php
index 8446ad8b..0716780c 100644
--- a/includes/view/Questions_view.php
+++ b/includes/view/Questions_view.php
@@ -6,31 +6,31 @@ function Questions_view($open_questions, $answered_questions, $ask_action)
$question['actions'] = '<a href="' . page_link_to("user_questions") . '&action=delete&id=' . $question['QID'] . '">' . _("delete") . '</a>';
$question['Question'] = str_replace("\n", '<br />', $question['Question']);
}
-
+
foreach ($answered_questions as &$question) {
$question['Question'] = str_replace("\n", '<br />', $question['Question']);
$question['Answer'] = str_replace("\n", '<br />', $question['Answer']);
$question['actions'] = '<a href="' . page_link_to("user_questions") . '&action=delete&id=' . $question['QID'] . '">' . _("delete") . '</a>';
}
-
+
return page_with_title(questions_title(), [
- msg(),
- heading(_("Open questions"), 2),
- table([
- 'Question' => _("Question"),
- 'actions' => ""
- ], $open_questions),
- heading(_("Answered questions"), 2),
- table([
- 'Question' => _("Question"),
- 'answer_user' => _("Answered by"),
- 'Answer' => _("Answer"),
- 'actions' => ""
- ], $answered_questions),
- heading(_("Ask the Heaven"), 2),
- form([
- form_textarea('question', _("Your Question:"), ""),
- form_submit('submit', _("Save"))
- ], $ask_action)
- ]);
+ msg(),
+ heading(_("Open questions"), 2),
+ table([
+ 'Question' => _("Question"),
+ 'actions' => ""
+ ], $open_questions),
+ heading(_("Answered questions"), 2),
+ table([
+ 'Question' => _("Question"),
+ 'answer_user' => _("Answered by"),
+ 'Answer' => _("Answer"),
+ 'actions' => ""
+ ], $answered_questions),
+ heading(_("Ask the Heaven"), 2),
+ form([
+ form_textarea('question', _("Your Question:"), ""),
+ form_submit('submit', _("Save"))
+ ], $ask_action)
+ ]);
}