diff --git a/browse.php b/browse.php index a88492e..ad6c33f 100755 --- a/browse.php +++ b/browse.php @@ -793,19 +793,19 @@ class BrowseDispatcher extends KTStandardDispatcher { } if (!Permission::userIsSystemAdministrator() && !Permission::isUnitAdministratorForFolder($this->oUser, $iFolderId)) { - $this->errorRedirectToMain('You are not an administrator'); + $this->errorRedirectToMain(_('You are not an administrator')); } $_SESSION['adminmode'] = true; if ($_REQUEST['fDocumentId']) { - $_SESSION['KTInfoMessage'][] = 'Administrator mode enabled'; + $_SESSION['KTInfoMessage'][] = _('Administrator mode enabled'); redirect(KTBrowseUtil::getUrlForDocument($iDocumentId)); exit(0); } if ($_REQUEST['fFolderId']) { - $this->successRedirectToMain('Administrator mode enabled', sprintf('fFolderId=%d', $_REQUEST['fFolderId'])); + $this->successRedirectToMain(_('Administrator mode enabled'), sprintf('fFolderId=%d', $_REQUEST['fFolderId'])); } - $this->successRedirectToMain('Administrator mode enabled'); + $this->successRedirectToMain(_('Administrator mode enabled')); } function do_disableAdminMode() { @@ -820,19 +820,19 @@ class BrowseDispatcher extends KTStandardDispatcher { } if (!Permission::userIsSystemAdministrator() && !Permission::isUnitAdministratorForFolder($this->oUser, $iFolderId)) { - $this->errorRedirectToMain('You are not an administrator'); + $this->errorRedirectToMain(_('You are not an administrator')); } $_SESSION['adminmode'] = false; if ($_REQUEST['fDocumentId']) { - $_SESSION['KTInfoMessage'][] = 'Administrator mode disabled'; + $_SESSION['KTInfoMessage'][] = _('Administrator mode disabled'); redirect(KTBrowseUtil::getUrlForDocument($iDocumentId)); exit(0); } if ($_REQUEST['fFolderId']) { - $this->successRedirectToMain('Administrator mode disabled', sprintf('fFolderId=%d', $_REQUEST['fFolderId'])); + $this->successRedirectToMain(_('Administrator mode disabled'), sprintf('fFolderId=%d', $_REQUEST['fFolderId'])); } - $this->successRedirectToMain('Administrator mode disabled'); + $this->successRedirectToMain(_('Administrator mode disabled')); } } diff --git a/kthelp/ktcore/EN/admin/admin-mode.html b/kthelp/ktcore/EN/admin/admin-mode.html new file mode 100644 index 0000000..1179f89 --- /dev/null +++ b/kthelp/ktcore/EN/admin/admin-mode.html @@ -0,0 +1,11 @@ + +
Administrator mode allows for users who have system administrator +rights, or unit administrators within their unit, to see folders and +documents in the browse mode that they otherwise would not see due to +permissions.
+ + \ No newline at end of file diff --git a/plugins/ktcore/KTPortlets.php b/plugins/ktcore/KTPortlets.php index 2dcd589..2eb05d9 100644 --- a/plugins/ktcore/KTPortlets.php +++ b/plugins/ktcore/KTPortlets.php @@ -91,11 +91,17 @@ class KTAdminModePortlet extends KTPortlet { $oTemplating = new KTTemplating; $oTemplate = $oTemplating->loadTemplate("kt3/portlets/admin_mode_portlet"); + $toggleMode = 'action=disableAdminMode'; + if (KTUtil::arrayGet($_SESSION, 'adminmode', false) == false) { + $toggleMode = 'action=enableAdminMode'; + } + $QS = sprintf('fDocumentId=%s&fFolderId=%s&%s',$iDocumentId, $iFolderId, $toggleMode); + + $toggleUrl = KTUtil::addQueryString(KTBrowseUtil::getBrowseBaseUrl(), $QS); + $aTemplateData = array( "context" => $this, - 'browseurl' => KTBrowseUtil::getBrowseBaseUrl(), - 'folder_id' => $iFolderId, - 'document_id' => $iDocumentId, + 'toggleurl' => $toggleUrl, 'enabled' => KTUtil::arrayGet($_SESSION, 'adminmode', false), ); return $oTemplate->render($aTemplateData); diff --git a/resources/css/kt-contenttypes.css b/resources/css/kt-contenttypes.css index 714aacd..19349ce 100644 --- a/resources/css/kt-contenttypes.css +++ b/resources/css/kt-contenttypes.css @@ -5,7 +5,7 @@ My Filename */ .contenttype { - background-position: center left; + background-position: 0% 0.5em; background-repeat: no-repeat; padding-left: 25px; padding-top: 5px; diff --git a/resources/css/kt-framing.css b/resources/css/kt-framing.css index f1227b0..6a19615 100644 --- a/resources/css/kt-framing.css +++ b/resources/css/kt-framing.css @@ -575,10 +575,15 @@ a.main_nav_item { padding: 0.25em 0.5em; white-space: nowrap !important; overflow: hidden; + vertical-align: top; +} + +.kt_collection td.title { + white-space: normal !important; } .centered, .kt_collection thead th.centered { text-align: center; } -.centered .ktAction { margin-left: auto; margin-right: auto; width: 100%; } +.centered .ktAction { margin-left: auto; margin-right: auto; width: 100%; background-position: top center;} .kt_collection td.sort_on { border-left: 1px solid #ccc; diff --git a/templates/kt3/portlets/admin_mode_portlet.smarty b/templates/kt3/portlets/admin_mode_portlet.smarty index 4e064b7..5d1bc2e 100644 --- a/templates/kt3/portlets/admin_mode_portlet.smarty +++ b/templates/kt3/portlets/admin_mode_portlet.smarty @@ -1,22 +1,14 @@ -{i18n}Administrator mode allows for users who have system administrator -rights, or unit administrators within their unit, to see folders and -documents in the browse mode that they otherwise would not see due to -permissions.{/i18n}
- +{i18n}What is admin mode?{/i18n} +{i18n}Administrator mode is not currently enabled. {/i18n}
+{i18n}Disable Admin Mode{/i18n} +{i18n}Disable Admin Mode{/i18n} {else} -Administrator mode is not currently enabled. - +{i18n}What is admin mode?{/i18n} +{i18n}Administrator mode is not currently enabled.{/i18n}
+ +{i18n}Enable Admin Mode{/i18n} +{i18n}Enable Admin Mode{/i18n} {/if} +To make a value in a child fieldavailable to the user when another value is +
To make a value in a child field available to the user when another value is selected in a parent field, first ensure that the parent field is being edited (it will have "save" and "done" as the buttons at the bottom of the column) and then select the value for the parent field. Now select the value(s) in the child column(s) you wish to be available to the user when the parent field's value is selected,