Commit 7821ecc28d6b69bdf15a60d3670d118c5269ca40
1 parent
3ede0f4d
Brad Shuttleworth 2006-02-17 adjustments for IE.
Brad Shuttleworth 2006-02-17 admin mode fixes, title-length fixes, condi...
Brad Shuttleworth 2006-02-17 fix for KTS-399 and others.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4940 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
7 changed files
with
47 additions
and
33 deletions
browse.php
| ... | ... | @@ -793,19 +793,19 @@ class BrowseDispatcher extends KTStandardDispatcher { |
| 793 | 793 | } |
| 794 | 794 | |
| 795 | 795 | if (!Permission::userIsSystemAdministrator() && !Permission::isUnitAdministratorForFolder($this->oUser, $iFolderId)) { |
| 796 | - $this->errorRedirectToMain('You are not an administrator'); | |
| 796 | + $this->errorRedirectToMain(_('You are not an administrator')); | |
| 797 | 797 | } |
| 798 | 798 | |
| 799 | 799 | $_SESSION['adminmode'] = true; |
| 800 | 800 | if ($_REQUEST['fDocumentId']) { |
| 801 | - $_SESSION['KTInfoMessage'][] = 'Administrator mode enabled'; | |
| 801 | + $_SESSION['KTInfoMessage'][] = _('Administrator mode enabled'); | |
| 802 | 802 | redirect(KTBrowseUtil::getUrlForDocument($iDocumentId)); |
| 803 | 803 | exit(0); |
| 804 | 804 | } |
| 805 | 805 | if ($_REQUEST['fFolderId']) { |
| 806 | - $this->successRedirectToMain('Administrator mode enabled', sprintf('fFolderId=%d', $_REQUEST['fFolderId'])); | |
| 806 | + $this->successRedirectToMain(_('Administrator mode enabled'), sprintf('fFolderId=%d', $_REQUEST['fFolderId'])); | |
| 807 | 807 | } |
| 808 | - $this->successRedirectToMain('Administrator mode enabled'); | |
| 808 | + $this->successRedirectToMain(_('Administrator mode enabled')); | |
| 809 | 809 | } |
| 810 | 810 | |
| 811 | 811 | function do_disableAdminMode() { |
| ... | ... | @@ -820,19 +820,19 @@ class BrowseDispatcher extends KTStandardDispatcher { |
| 820 | 820 | } |
| 821 | 821 | |
| 822 | 822 | if (!Permission::userIsSystemAdministrator() && !Permission::isUnitAdministratorForFolder($this->oUser, $iFolderId)) { |
| 823 | - $this->errorRedirectToMain('You are not an administrator'); | |
| 823 | + $this->errorRedirectToMain(_('You are not an administrator')); | |
| 824 | 824 | } |
| 825 | 825 | |
| 826 | 826 | $_SESSION['adminmode'] = false; |
| 827 | 827 | if ($_REQUEST['fDocumentId']) { |
| 828 | - $_SESSION['KTInfoMessage'][] = 'Administrator mode disabled'; | |
| 828 | + $_SESSION['KTInfoMessage'][] = _('Administrator mode disabled'); | |
| 829 | 829 | redirect(KTBrowseUtil::getUrlForDocument($iDocumentId)); |
| 830 | 830 | exit(0); |
| 831 | 831 | } |
| 832 | 832 | if ($_REQUEST['fFolderId']) { |
| 833 | - $this->successRedirectToMain('Administrator mode disabled', sprintf('fFolderId=%d', $_REQUEST['fFolderId'])); | |
| 833 | + $this->successRedirectToMain(_('Administrator mode disabled'), sprintf('fFolderId=%d', $_REQUEST['fFolderId'])); | |
| 834 | 834 | } |
| 835 | - $this->successRedirectToMain('Administrator mode disabled'); | |
| 835 | + $this->successRedirectToMain(_('Administrator mode disabled')); | |
| 836 | 836 | } |
| 837 | 837 | } |
| 838 | 838 | ... | ... |
kthelp/ktcore/EN/admin/admin-mode.html
0 → 100644
| 1 | +<html> | |
| 2 | +<head><title>Administrator Mode</title></head> | |
| 3 | +<body> | |
| 4 | +<h2>Administrator Mode</h2> | |
| 5 | + | |
| 6 | +<p class="descriptiveText">Administrator mode allows for users who have system administrator | |
| 7 | +rights, or unit administrators within their unit, to see folders and | |
| 8 | +documents in the browse mode that they otherwise would not see due to | |
| 9 | +permissions.</p> | |
| 10 | +</body> | |
| 11 | +</html> | |
| 0 | 12 | \ No newline at end of file | ... | ... |
plugins/ktcore/KTPortlets.php
| ... | ... | @@ -91,11 +91,17 @@ class KTAdminModePortlet extends KTPortlet { |
| 91 | 91 | $oTemplating = new KTTemplating; |
| 92 | 92 | $oTemplate = $oTemplating->loadTemplate("kt3/portlets/admin_mode_portlet"); |
| 93 | 93 | |
| 94 | + $toggleMode = 'action=disableAdminMode'; | |
| 95 | + if (KTUtil::arrayGet($_SESSION, 'adminmode', false) == false) { | |
| 96 | + $toggleMode = 'action=enableAdminMode'; | |
| 97 | + } | |
| 98 | + $QS = sprintf('fDocumentId=%s&fFolderId=%s&%s',$iDocumentId, $iFolderId, $toggleMode); | |
| 99 | + | |
| 100 | + $toggleUrl = KTUtil::addQueryString(KTBrowseUtil::getBrowseBaseUrl(), $QS); | |
| 101 | + | |
| 94 | 102 | $aTemplateData = array( |
| 95 | 103 | "context" => $this, |
| 96 | - 'browseurl' => KTBrowseUtil::getBrowseBaseUrl(), | |
| 97 | - 'folder_id' => $iFolderId, | |
| 98 | - 'document_id' => $iDocumentId, | |
| 104 | + 'toggleurl' => $toggleUrl, | |
| 99 | 105 | 'enabled' => KTUtil::arrayGet($_SESSION, 'adminmode', false), |
| 100 | 106 | ); |
| 101 | 107 | return $oTemplate->render($aTemplateData); | ... | ... |
resources/css/kt-contenttypes.css
resources/css/kt-framing.css
| ... | ... | @@ -575,10 +575,15 @@ a.main_nav_item { |
| 575 | 575 | padding: 0.25em 0.5em; |
| 576 | 576 | white-space: nowrap !important; |
| 577 | 577 | overflow: hidden; |
| 578 | + vertical-align: top; | |
| 579 | +} | |
| 580 | + | |
| 581 | +.kt_collection td.title { | |
| 582 | + white-space: normal !important; | |
| 578 | 583 | } |
| 579 | 584 | |
| 580 | 585 | .centered, .kt_collection thead th.centered { text-align: center; } |
| 581 | -.centered .ktAction { margin-left: auto; margin-right: auto; width: 100%; } | |
| 586 | +.centered .ktAction { margin-left: auto; margin-right: auto; width: 100%; background-position: top center;} | |
| 582 | 587 | |
| 583 | 588 | .kt_collection td.sort_on { |
| 584 | 589 | border-left: 1px solid #ccc; | ... | ... |
templates/kt3/portlets/admin_mode_portlet.smarty
| 1 | -<p class="descriptiveText">{i18n}Administrator mode allows for users who have system administrator | |
| 2 | -rights, or unit administrators within their unit, to see folders and | |
| 3 | -documents in the browse mode that they otherwise would not see due to | |
| 4 | -permissions.{/i18n}</p> | |
| 5 | - | |
| 1 | +<ul class="actionlist"><li> | |
| 6 | 2 | {if $enabled} |
| 7 | -Administrator mode is currently enabled. | |
| 8 | -<form action="{$browseurl}" method="POST"> | |
| 9 | -<input type="hidden" name="action" value="disableAdminMode" /> | |
| 10 | -<input type="hidden" name="fFolderId" value="{$folder_id}" /> | |
| 11 | -<input type="hidden" name="fDocumentId" value="{$document_id}" /> | |
| 12 | -<input type="submit" name="submit" value="Disable administrator mode" /> | |
| 13 | -</form> | |
| 3 | +<p><a href="{ktLink base="help.php" subpath="ktcore/admin/admin-mode.html"}" class="ktInline ktHelp" style="float: left; margin: 0 0.5em 0.5em 5px;" >{i18n}What is admin mode?{/i18n}</a> | |
| 4 | +{i18n}Administrator mode is not currently enabled. {/i18n}</p> | |
| 5 | +<a class="ktInline ktAction ktDenied" href="{$toggleurl}">{i18n}Disable Admin Mode{/i18n}</a> | |
| 6 | +<a href="{$toggleurl}">{i18n}Disable Admin Mode{/i18n}</a> | |
| 14 | 7 | {else} |
| 15 | -Administrator mode is not currently enabled. | |
| 16 | -<form action="{$browseurl}" method="POST"> | |
| 17 | -<input type="hidden" name="action" value="enableAdminMode" /> | |
| 18 | -<input type="hidden" name="fFolderId" value="{$folder_id}" /> | |
| 19 | -<input type="hidden" name="fDocumentId" value="{$document_id}" /> | |
| 20 | -<input type="submit" name="submit" value="Enable administrator mode" /> | |
| 21 | -</form> | |
| 8 | +<p><a href="{ktLink base="help.php" subpath="ktcore/admin/admin-mode.html"}" class="ktInline ktHelp" style="float: left; margin: 0 0.5em 0.5em 5px;" >{i18n}What is admin mode?{/i18n}</a> | |
| 9 | +{i18n}Administrator mode is not currently enabled.{/i18n}</p> | |
| 10 | + | |
| 11 | +<a class="ktInline ktAction ktAllowed" href="{$toggleurl}">{i18n}Enable Admin Mode{/i18n}</a> | |
| 12 | +<a href="{$toggleurl}">{i18n}Enable Admin Mode{/i18n}</a> | |
| 22 | 13 | {/if} |
| 14 | +</li></ul> | ... | ... |
templates/ktcore/metadata/conditional/editsimple.smarty
| ... | ... | @@ -66,7 +66,7 @@ addLoadEvent(partial(editSimpleField, {$iMasterFieldId})); |
| 66 | 66 | |
| 67 | 67 | <h2>{i18n}Editing Fieldset Rules (Simple){/i18n}</h2> |
| 68 | 68 | |
| 69 | -<p class="descriptiveText">To make a value in a <strong>child field</strong>available to the user when another value is | |
| 69 | +<p class="descriptiveText">To make a value in a <strong>child field</strong> available to the user when another value is | |
| 70 | 70 | selected in a <strong>parent field</strong>, first ensure that the parent field is being edited (it will have "save" and "done" |
| 71 | 71 | as the buttons at the bottom of the column) and then select the value for the parent field. Now select the value(s) in |
| 72 | 72 | the child column(s) you wish to be available to the user when the parent field's value is selected, | ... | ... |