Commit f8c7d135 authored by Liuba Kazakov's avatar Liuba Kazakov Committed by Hugh Davenport
Browse files

Responsive Design - hide 'Print' and disable 'Export' functionality



when handheld device is detected

Bug #1041645

Change-Id: I0deed72eb5c695c717d455a231c851f7d0158c4b
Signed-off-by: default avatarLiuba Kazakov <liuba@catalyst-au.net>
parent 8dc79e19
......@@ -110,7 +110,4 @@ $smarty->assign('url', $urls);
$smarty->assign('page_content', get_site_page_content($pagename));
// handheld device flag
$smarty->assign('handheld_device', $SESSION->get('handheld_device'));
$smarty->display('index.tpl');
......@@ -408,6 +408,7 @@ EOF;
}
$smarty->assign('MOBILE', $SESSION->get('mobile'));
$smarty->assign('HANDHELD_DEVICE', $SESSION->get('handheld_device'));
$sitename = get_config('sitename');
if (!$sitename) {
......@@ -2228,7 +2229,10 @@ function institutional_staff_nav() {
* @return $standardnav a data structure containing the standard navigation
*/
function mahara_standard_nav() {
$exportenabled = plugins_installed('export');
global $SESSION;
$exportenabled = (plugins_installed('export') && !$SESSION->get('handheld_device')) ? TRUE : FALSE;
$menu = array(
'home' => array(
'path' => '',
......
{include file="header.tpl"}
{$page_content|clean_html|safe}
{if get_config('homepageinfo') && (!$USER->is_logged_in() || $USER->get_account_preference('showhomeinfo')) && !$handheld_device}
{if get_config('homepageinfo') && (!$USER->is_logged_in() || $USER->get_account_preference('showhomeinfo')) && !$HANDHELD_DEVICE}
{include file="homeinfo.tpl" url=$url}
{/if}
{if $dashboardview}
......
......@@ -4,7 +4,9 @@
{if $LOGGEDIN}
<a id="objection_link" class="objection" href="">{str tag=reportobjectionablematerial section=view}</a>
{/if}
{if !$HANDHELD_DEVICE}
<a id="print_link" class="print" href="" onclick="window.print(); return false;">{str tag=print section=view}</a>
{/if}
{if $LOGGEDIN}
<a id="toggle_watchlist_link" class="watchlist" href="">{if $viewbeingwatched}{str tag=removefromwatchlist section=view}{else}{str tag=addtowatchlist section=view}{/if}</a>
{contextualhelp plugintype='core' pluginname='view' section='viewmenu'}
......
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