first commit
This commit is contained in:
@@ -0,0 +1,149 @@
|
||||
{**
|
||||
* templates/controllers/grid/navigationMenus/form/navigationMenuForm.tpl
|
||||
*
|
||||
* Copyright (c) 2014-2021 Simon Fraser University
|
||||
* Copyright (c) 2003-2021 John Willinsky
|
||||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
|
||||
*
|
||||
* Form to read/create/edit NavigationMenus.
|
||||
*}
|
||||
|
||||
<script>
|
||||
$(function() {ldelim}
|
||||
// Attach the form handler.
|
||||
$('#navigationMenuForm').pkpHandler('$.pkp.controllers.grid.navigationMenus.form.NavigationMenuFormHandler',
|
||||
{ldelim}
|
||||
submenuWarning: {translate|json_encode key="manager.navigationMenus.form.submenuWarning"},
|
||||
itemTypeConditionalWarnings: {$navigationMenuItemTypeConditionalWarnings},
|
||||
okButton: {translate|json_encode key="common.ok"},
|
||||
warningModalTitle: {translate|json_encode key="common.notice"}
|
||||
{rdelim}
|
||||
);
|
||||
|
||||
{rdelim});
|
||||
</script>
|
||||
|
||||
<form class="pkp_form" id="navigationMenuForm" method="post" action="{url router=\PKP\core\PKPApplication::ROUTE_COMPONENT component="grid.navigationMenus.NavigationMenusGridHandler" op="updateNavigationMenu"}">
|
||||
{csrf}
|
||||
{include file="controllers/notification/inPlaceNotification.tpl" notificationId="navigationMenuFormNotification"}
|
||||
{fbvFormArea id="navigationMenuInfo"}
|
||||
{if $navigationMenuId}
|
||||
<input type="hidden" name="navigationMenuId" value="{$navigationMenuId|escape}" />
|
||||
{/if}
|
||||
{fbvFormSection title="manager.navigationMenus.form.title" for="title" required="true"}
|
||||
{fbvElement type="text" id="title" value=$title maxlength="255" required="true"}
|
||||
{/fbvFormSection}
|
||||
{fbvFormSection title="manager.navigationMenus.form.navigationMenuArea" for="areaName"}
|
||||
{fbvElement type="select" id="areaName" from=$activeThemeNavigationAreas selected=$navigationMenuArea label="manager.navigationMenus.form.navigationMenuAreaMessage" translate=false}
|
||||
{/fbvFormSection}
|
||||
{/fbvFormArea}
|
||||
{fbvFormArea id="navigationMenuItems"}
|
||||
<div id="pkpNavManagement" class="pkp_nav_management">
|
||||
<div class="pkp_nav_assigned">
|
||||
<div class="pkp_nav_management_header">
|
||||
{translate key="manager.navigationMenus.assignedMenuItems"}
|
||||
</div>
|
||||
<ul id="pkpNavAssigned">
|
||||
{foreach from=$menuTree item="assignment"}
|
||||
{assign var="itemType" value=$assignment->navigationMenuItem->getType()}
|
||||
{if !empty($navigationMenuItemTypes.$itemType.conditionalWarning)}
|
||||
{assign var="hasConditionalDisplay" value=true}
|
||||
{else}
|
||||
{assign var="hasConditionalDisplay" value=false}
|
||||
{/if}
|
||||
<li data-id="{$assignment->getMenuItemId()|escape}" data-type="{$itemType|escape}">
|
||||
<div class="item">
|
||||
<div class="item_title">
|
||||
<span class="fa fa-sort"></span>
|
||||
{$assignment->navigationMenuItem->getLocalizedTitle()|escape}
|
||||
</div>
|
||||
<div class="item_buttons">
|
||||
{if $hasConditionalDisplay}
|
||||
<button class="btnConditionalDisplay">
|
||||
<span class="fa fa-eye-slash"></span>
|
||||
<span class="-screenReader">
|
||||
{translate key="manager.navigationMenus.form.conditionalDisplay"}
|
||||
</span>
|
||||
</button>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{if !empty($assignment->children)}
|
||||
<ul>
|
||||
{foreach from=$assignment->children item="childAssignment"}
|
||||
{assign var="itemType" value=$childAssignment->navigationMenuItem->getType()}
|
||||
{if !empty($navigationMenuItemTypes.$itemType.conditionalWarning)}
|
||||
{assign var="hasConditionalDisplay" value=true}
|
||||
{else}
|
||||
{assign var="hasConditionalDisplay" value=false}
|
||||
{/if}
|
||||
<li data-id="{$childAssignment->getMenuItemId()|escape}" data-type="{$itemType|escape}">
|
||||
<div class="item">
|
||||
<div class="item_title">
|
||||
<span class="fa fa-sort"></span>
|
||||
{$childAssignment->navigationMenuItem->getLocalizedTitle()|escape}
|
||||
</div>
|
||||
<div class="item_buttons">
|
||||
{if $hasConditionalDisplay}
|
||||
<button class="btnConditionalDisplay">
|
||||
<span class="fa fa-eye-slash"></span>
|
||||
<span class="-screenReader">
|
||||
{translate key="manager.navigationMenus.form.conditionalDisplay"}
|
||||
</span>
|
||||
</button>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="pkp_nav_unassigned">
|
||||
<div class="pkp_nav_management_header">
|
||||
{translate key="manager.navigationMenus.unassignedMenuItems"}
|
||||
</div>
|
||||
<ul id="pkpNavUnassigned">
|
||||
{foreach from=$unassignedItems item="unassignedItem"}
|
||||
{assign var="itemType" value=$unassignedItem->getType()}
|
||||
{if !empty($navigationMenuItemTypes.$itemType.conditionalWarning)}
|
||||
{assign var="hasConditionalDisplay" value=true}
|
||||
{else}
|
||||
{assign var="hasConditionalDisplay" value=false}
|
||||
{/if}
|
||||
<li data-id="{$unassignedItem->getId()|escape}" data-type="{$itemType|escape}">
|
||||
<div class="item">
|
||||
<div class="item_title">
|
||||
<span class="fa fa-sort"></span>
|
||||
{$unassignedItem->getLocalizedTitle()|escape}
|
||||
</div>
|
||||
<div class="item_buttons">
|
||||
{if $hasConditionalDisplay}
|
||||
<button class="btnConditionalDisplay">
|
||||
<span class="fa fa-eye-slash"></span>
|
||||
<span class="-screenReader">
|
||||
{translate key="manager.navigationMenus.form.conditionalDisplay"}
|
||||
</span>
|
||||
</button>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
{foreach from=$menuTree item="assignment"}
|
||||
<input type="hidden" name="menuTree[{$assignment->getMenuItemId()|escape}][seq]" value="{$assignment->getSequence()|escape}">
|
||||
{foreach from=$assignment->children item="childAssignment"}
|
||||
<input type="hidden" name="menuTree[{$childAssignment->getMenuItemId()|escape}][seq]" value="{$childAssignment->getSequence()|escape}">
|
||||
<input type="hidden" name="menuTree[{$childAssignment->getMenuItemId()|escape}][parentId]" value="{$childAssignment->getParentId()|escape}">
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
</div>
|
||||
{/fbvFormArea}
|
||||
<p><span class="formRequired">{translate key="common.requiredField"}</span></p>
|
||||
{fbvFormButtons id="navigationMenuFormSubmit" submitText="common.save"}
|
||||
</form>
|
||||
@@ -0,0 +1,49 @@
|
||||
{**
|
||||
* templates/controllers/grid/navigationMenus/form/navigationMenuItemsForm.tpl
|
||||
*
|
||||
* Copyright (c) 2014-2021 Simon Fraser University
|
||||
* Copyright (c) 2003-2021 John Willinsky
|
||||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
|
||||
*
|
||||
* Form to read/create/edit navigation menu Items.
|
||||
*}
|
||||
|
||||
<script>
|
||||
$(function() {ldelim}
|
||||
// Attach the form handler.
|
||||
$('#navigationMenuItemsForm').pkpHandler(
|
||||
'$.pkp.controllers.grid.navigationMenus.form.NavigationMenuItemsFormHandler',
|
||||
{ldelim}
|
||||
previewUrl: {url|json_encode router=\PKP\core\PKPApplication::ROUTE_PAGE page="navigationMenu" op="preview"},
|
||||
itemTypeDescriptions: {$navigationMenuItemTypeDescriptions},
|
||||
itemTypeConditionalWarnings: {$navigationMenuItemTypeConditionalWarnings}
|
||||
{rdelim});
|
||||
{rdelim});
|
||||
</script>
|
||||
|
||||
<form class="pkp_form" id="navigationMenuItemsForm" method="post" action="{url router=\PKP\core\PKPApplication::ROUTE_COMPONENT component="grid.navigationMenus.NavigationMenuItemsGridHandler" op="updateNavigationMenuItem"}">
|
||||
{csrf}
|
||||
{include file="controllers/notification/inPlaceNotification.tpl" notificationId="navigationMenuItemFormNotification"}
|
||||
{fbvFormArea id="navigationMenuItemInfo"}
|
||||
{if $navigationMenuItemId}
|
||||
<input type="hidden" name="navigationMenuItemId" value="{$navigationMenuItemId|escape}" />
|
||||
{/if}
|
||||
|
||||
{fbvFormSection title="manager.navigationMenus.form.title" for="title" required="true"}
|
||||
{fbvElement type="text" multilingual="true" id="title" value=$title maxlength="255" required="true"}
|
||||
{/fbvFormSection}
|
||||
|
||||
{fbvFormSection id="menuItemTypeSection" title="manager.navigationMenus.form.navigationMenuItemType" for="menuItemType"}
|
||||
{fbvElement type="select" id="menuItemType" required=true from=$navigationMenuItemTypeTitles selected=$menuItemType label="manager.navigationMenus.form.navigationMenuItemTypeMessage" translate=false}
|
||||
{/fbvFormSection}
|
||||
|
||||
{foreach from=$customTemplates key=nmiType item=customTemplate}
|
||||
{include file=$customTemplate.template}
|
||||
{/foreach}
|
||||
{/fbvFormArea}
|
||||
|
||||
{fbvFormSection class="formButtons"}
|
||||
{fbvElement type="submit" class="submitFormButton pkp_helpers_align_left pkp_button_primary" id="saveButton" label="common.save"}
|
||||
{assign var=buttonId value="submitFormButton"|concat:"-"|uniqid}
|
||||
{/fbvFormSection}
|
||||
</form>
|
||||
Reference in New Issue
Block a user