Permalink
Browse files

feature(routing): Render reportedcontent pages with views

  • Loading branch information...
ewinslow committed May 28, 2015
1 parent 125844a commit 315ce166a394578b55359b50abcae51e182a2087
Showing with 17 additions and 13 deletions.
  1. +1 −13 mod/reportedcontent/start.php
  2. +16 −0 mod/reportedcontent/views/default/resources/reportedcontent/add.php
@@ -71,19 +71,7 @@ function reportedcontent_page_handler($page) {
return true;
}
- $title = elgg_echo('reportedcontent:this');
-
- $content = elgg_view_form('reportedcontent/add');
- $sidebar = elgg_echo('reportedcontent:instructions');
-
- $params = array(
- 'title' => $title,
- 'content' => $content,
- 'sidebar' => $sidebar,
- );
- $body = elgg_view_layout('one_sidebar', $params);
-
- echo elgg_view_page($title, $body);
+ echo elgg_view('resources/reportedcontent/add');
return true;
}
@@ -0,0 +1,16 @@
+<?php
+elgg_gatekeeper();
+
+$title = elgg_echo('reportedcontent:this');
+
+$content = elgg_view_form('reportedcontent/add');
+$sidebar = elgg_echo('reportedcontent:instructions');
+
+$params = array(
+ 'title' => $title,
+ 'content' => $content,
+ 'sidebar' => $sidebar,
+);
+$body = elgg_view_layout('one_sidebar', $params);
+
+echo elgg_view_page($title, $body);

0 comments on commit 315ce16

Please sign in to comment.