Commit c2968440 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Add create view button on group/institution views pages

parent 0aa6064c
...@@ -1916,7 +1916,7 @@ function createview_submit(Pieform $form, $values) { ...@@ -1916,7 +1916,7 @@ function createview_submit(Pieform $form, $values) {
global $USER, $SESSION; global $USER, $SESSION;
$group = isset($values['group']) ? (int) $values['group'] : null; $group = isset($values['group']) ? (int) $values['group'] : null;
$institution = isset($values['institution']) ? (int) $values['institution'] : null; $institution = isset($values['institution']) ? $values['institution'] : null;
$templateid = isset($values['usetemplate']) ? (int) $values['usetemplate'] : null; $templateid = isset($values['usetemplate']) ? (int) $values['usetemplate'] : null;
$owner = ($group || $institution) ? null : $USER->get('id'); $owner = ($group || $institution) ? null : $USER->get('id');
......
...@@ -84,6 +84,7 @@ $smarty->assign('grouptabs', group_get_menu_tabs($group)); ...@@ -84,6 +84,7 @@ $smarty->assign('grouptabs', group_get_menu_tabs($group));
$smarty->assign('member', $member); $smarty->assign('member', $member);
$smarty->assign('views', $data->data); $smarty->assign('views', $data->data);
$smarty->assign('pagination', $pagination['html']); $smarty->assign('pagination', $pagination['html']);
$smarty->assign('createviewform', pieform(create_view_form($groupid)));
if ($can_edit) { // && !$shared) { if ($can_edit) { // && !$shared) {
$smarty->display('view/index.tpl'); $smarty->display('view/index.tpl');
......
...@@ -77,6 +77,7 @@ $smarty->assign('INLINEJAVASCRIPT', $s['institutionselectorjs']); ...@@ -77,6 +77,7 @@ $smarty->assign('INLINEJAVASCRIPT', $s['institutionselectorjs']);
$smarty->assign('views', $data->data); $smarty->assign('views', $data->data);
$smarty->assign('institution', $institution); $smarty->assign('institution', $institution);
$smarty->assign('pagination', $pagination['html']); $smarty->assign('pagination', $pagination['html']);
$smarty->assign('createviewform', pieform(create_view_form(null, $institution)));
$smarty->display('view/index.tpl'); $smarty->display('view/index.tpl');
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment