Skip to content

Commit

Permalink
feature(routing): Render reportedcontent pages with views
Browse files Browse the repository at this point in the history
  • Loading branch information
ewinslow committed May 28, 2015
1 parent 125844a commit 315ce16
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
14 changes: 1 addition & 13 deletions mod/reportedcontent/start.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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.