/
index.tpl
149 lines (140 loc) · 5.42 KB
/
index.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
{**
* templates/manageCatalog/index.tpl
*
* Copyright (c) 2003-2013 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* Header for the catalog management tabbed interface
*}
{strip}
{assign var="pageTitle" value="catalog.manage"}
{include file="common/header.tpl"}
{/strip}
{if array_intersect(array(ROLE_ID_MANAGER), $userRoles)}
{assign var="isManager" value=true}
{/if}
<script type="text/javascript">
// Initialize JS handler for catalog header.
$(function() {ldelim}
$('#catalogHeader').pkpHandler(
'$.pkp.pages.manageCatalog.ManageCatalogHeaderHandler',
{ldelim}
searchTabIndex: {if $isManager}4{else}3{/if},
spotlightTabName: 'spotlightsTab',
seriesFetchUrlTemplate: '{url|escape:"javascript" op="series" path=SERIES_PATH escape=false}',
categoryFetchUrlTemplate: '{url|escape:"javascript" op="category" path=CATEGORY_PATH escape=false}',
spotlightsUrl: '{url router=$smarty.const.ROUTE_COMPONENT component="tab.content.ContentTabHandler" op="showTab" tab="spotlights"}'
{rdelim}
);
{rdelim});
// Initialize JS handler for search form.
$(function() {ldelim}
$('#catalogSearchForm').pkpHandler(
'$.pkp.pages.manageCatalog.ManageCatalogSearchFormHandler',
{ldelim}
trackFormChanges: false
{rdelim}
);
{rdelim});
// Initialize "Select Series" form handler
$(function() {ldelim}
$('#selectSeriesForm').pkpHandler(
'$.pkp.controllers.form.DropdownHandler',
{ldelim}
getOptionsUrl: '{url|escape:"javascript" op="getSeries" escape=false}',
eventName: 'selectSeries'
{rdelim}
);
{rdelim});
// Initialize "Select Category" form handler
$(function() {ldelim}
$('#selectCategoryForm').pkpHandler(
'$.pkp.controllers.form.DropdownHandler',
{ldelim}
getOptionsUrl: '{url|escape:"javascript" op="getCategories" escape=false}',
eventName: 'selectCategory'
{rdelim}
);
{rdelim});
</script>
<div id="catalogHeader">
<div class="pkp_page_header pkp_helpers_align_right">
<ul class="submission_actions pkp_helpers_flatlist">
<li>{include file="linkAction/linkAction.tpl" action=$catalogEntryAction}</li>
</ul>
</div>
<div class="pkp_helpers_clear"></div>
<p>{translate key="catalog.manage.managementIntroduction"}</p>
<div id="catalogSearchContainer">
<form id="catalogSearchForm" class="pkp_form" action="{url op="search" path="SEARCH_TEXT_DUMMY"}" method="post">
{fbvFormSection title="common.search"}
{fbvElement type="text" id="catalogSearch" name="catalogSearch" inline=true size=$fbvStyles.size.LARGE}
{fbvElement type="submit" id="submitFormButton" label="common.search" inline=true}
{/fbvFormSection}
</form>
</div>
<div class="pkp_helpers_clear"></div>
<div id="catalogTabs">
<ul>
<li><a href="{url op="homepage"}">{translate key="catalog.manage.homepage"}</a></li>
<li><a href="#categoryTab">{translate key="catalog.manage.category"}</a></li>
<li><a href="#seriesTab">{translate key="catalog.manage.series"}</a></li>
{if $isManager}<li><a href="#spotlightsTab">{translate key="spotlight.spotlights"}</a></li>{/if}
<li><a href="{url}">{translate key="search.searchResults"}</a></li>
</ul>
<div id="categoryTab">
<div class="pkp_controllers_grid">
<div class="pkp_helpers_align_right grid_header_bar pkp_helpers_full">
<h3 class="pkp_helpers_align_left">{translate key="catalog.selectCategory"}</h3>
{if array_intersect(array(ROLE_ID_MANAGER), $userRoles)}
<ul class="submission_actions pkp_helpers_flatlist pkp_linkActions pkp_helpers_align_right">
<li>{include file="linkAction/linkAction.tpl" action=$manageCategoriesLinkAction}</li>
</ul>
{/if}
</div>
</div>
<div class="pkp_helpers_clear"></div>
<form id="selectCategoryForm" class="pkp_form">
{fbvFormArea id="forCategorySelect"}
{fbvFormSection}
{fbvElement type="select" id="categorySelect" translate=false size=$fbvStyles.size.MEDIUM class="noStyling"}
{/fbvFormSection}
{/fbvFormArea}
</form>
<div id="categoryContainer">
{* This will be filled via JS when a category is chosen. *}
</div>
</div>
<div id="seriesTab">
<div class="pkp_controllers_grid">
<div class="pkp_helpers_align_right grid_header_bar pkp_helpers_full">
<h3 class="pkp_helpers_align_left">{translate key="catalog.selectSeries"}</h3>
{if array_intersect(array(ROLE_ID_MANAGER), $userRoles)}
<ul class="submission_actions pkp_helpers_flatlist pkp_linkActions pkp_helpers_align_right">
<li>{include file="linkAction/linkAction.tpl" action=$manageSeriesLinkAction}</li>
</ul>
{/if}
</div>
</div>
<form id="selectSeriesForm" class="pkp_form">
<div class="pkp_helpers_clear"></div>
{fbvFormArea id="forSeriesSelect"}
{fbvFormSection}
{fbvElement type="select" id="seriesSelect" translate=false size=$fbvStyles.size.MEDIUM class="noStyling"}
{/fbvFormSection}
{/fbvFormArea}
</form>
<div id="seriesContainer">
{* This will be filled via JS when a series is chosen. *}
</div>
</div>
{if $isManager}
<div id="spotlightsTab">
<p>{translate key="catalog.manage.spotlightDescription"}</p>
{url|assign:spotlightsGridUrl router=$smarty.const.ROUTE_COMPONENT component="grid.content.spotlights.ManageSpotlightsGridHandler" op="fetchGrid" escape=false}
{load_url_in_div id="spotlightsGridContainer" url="$spotlightsGridUrl"}
</div>
{/if}
</div>
</div>
{include file="common/footer.tpl"}