1
|
<%@ taglib prefix="s" uri="/struts-tags"%>
|
2
|
<%@ page contentType="text/html; charset=UTF-8"%>
|
3
|
|
4
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
5
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
6
|
|
7
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
8
|
|
9
|
<head>
|
10
|
<s:if test="%{target.equals('Enhanced publication')}">
|
11
|
<title>Create Enhanced Publication</title>
|
12
|
</s:if>
|
13
|
<s:else>
|
14
|
<title>Create Compound Object</title>
|
15
|
</s:else>
|
16
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
17
|
<link rel="shortcut icon" href="<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/images/favicon.ico"/>
|
18
|
<link href='<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/assets/<s:property value="#application['webInterfaceLayoutManager'].cssFileName" />' rel="stylesheet" type="text/css" />
|
19
|
<script language="javascript">
|
20
|
function disableList(id){
|
21
|
var selectId = 'select_'+id;
|
22
|
for (i=1; i< <s:property value="%{#request['documents'].size +1}"/>; i++) {
|
23
|
var curId = 'select_'+i;
|
24
|
if (selectId == curId) {
|
25
|
document.getElementById(curId).disabled = true;
|
26
|
} else {
|
27
|
document.getElementById(curId).disabled = false;
|
28
|
}
|
29
|
}
|
30
|
}
|
31
|
|
32
|
function checkForm(){
|
33
|
var title = document.forms['EPForm'].elements['title'];
|
34
|
var subject = document.forms['EPForm'].elements['subject'];
|
35
|
var descr = document.forms['EPForm'].elements['description'];
|
36
|
|
37
|
var numOfDocs = <s:property value="#request['documents'].size"/>
|
38
|
if ( title.value.replace(/\s/g,"") != "" ) {
|
39
|
if ( subject.value.replace(/\s/g,"") != "") {
|
40
|
if ( descr.value.replace(/\s/g,"") != "" ) {
|
41
|
|
42
|
} else {
|
43
|
alert('Description is mandatory!');
|
44
|
descr.focus();
|
45
|
return false;
|
46
|
}
|
47
|
} else {
|
48
|
alert('Subject is mandatory!');
|
49
|
subject.focus();
|
50
|
return false;
|
51
|
}
|
52
|
} else {
|
53
|
alert('Title is mandatory!');
|
54
|
title.focus();
|
55
|
return false;
|
56
|
}
|
57
|
|
58
|
for(i=1; i <= numOfDocs; i++) {
|
59
|
var index = "select_"+i;
|
60
|
if(document.getElementById(index).value == "unknown" && document.getElementById(index).disabled == false) {
|
61
|
alert('Relations must be defined for every resource!');
|
62
|
return false;
|
63
|
}
|
64
|
}
|
65
|
|
66
|
<s:if test="%{target.equals('Enhanced publication')}">
|
67
|
var flag = false;
|
68
|
for(i=0; i < numOfDocs; i++) {
|
69
|
if (document.getElementsByName("ePrint")[i].checked == true) {
|
70
|
flag = true;
|
71
|
}
|
72
|
}
|
73
|
|
74
|
if (flag == false) {
|
75
|
alert('You have to choose an ePrint!');
|
76
|
return false;
|
77
|
}
|
78
|
</s:if>
|
79
|
return true;
|
80
|
}
|
81
|
</script>
|
82
|
</head>
|
83
|
|
84
|
<body>
|
85
|
|
86
|
<div id="center">
|
87
|
<div id="wrapper">
|
88
|
<div class="wrapper_shadowleft">
|
89
|
<div class="wrapper_shadowright">
|
90
|
<div id="container">
|
91
|
<jsp:include page="/pages/banner.jsp" />
|
92
|
<jsp:include page="/pages/menu.jsp" />
|
93
|
|
94
|
<div id="leftcolumn">
|
95
|
<b class="curved_top">
|
96
|
<b class="curved_t1"></b>
|
97
|
<b class="curved_t2"></b>
|
98
|
<b class="curved_t3"></b>
|
99
|
<b class="curved_t4"></b>
|
100
|
</b>
|
101
|
|
102
|
<div class="curved_container clearfix">
|
103
|
<jsp:include page="/pages/optionMenu.jsp" />
|
104
|
</div>
|
105
|
|
106
|
<b class="curved_bottom">
|
107
|
<b class="curved_b4"></b>
|
108
|
<b class="curved_b3"></b>
|
109
|
<b class="curved_b2"></b>
|
110
|
<b class="curved_b1"></b>
|
111
|
</b>
|
112
|
</div>
|
113
|
|
114
|
<div id="maincolumn2">
|
115
|
<b class="curved_top">
|
116
|
<b class="curved_t1"></b>
|
117
|
<b class="curved_t2"></b>
|
118
|
<b class="curved_t3"></b>
|
119
|
<b class="curved_t4"></b>
|
120
|
</b>
|
121
|
<div class="curved_container clearfix">
|
122
|
<div class="featured_top maincolumn2_top">
|
123
|
<img src="<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/images/icons/document_hexagonal.png"/>
|
124
|
<s:if test="%{target.equals('Enhanced publication')}">
|
125
|
Create an Enhanced Publication
|
126
|
</s:if>
|
127
|
<s:else>
|
128
|
Create a Compound Object
|
129
|
</s:else>
|
130
|
</div>
|
131
|
|
132
|
<s:form name="EPForm" theme="simple" action="saveEPublication" onsubmit="return checkForm();">
|
133
|
<s:hidden name="target" />
|
134
|
<div class="epField">
|
135
|
<span class="epFieldNM">Title *</span>
|
136
|
</div>
|
137
|
<div class="epField">
|
138
|
<s:textfield name="title" />
|
139
|
</div>
|
140
|
|
141
|
<div class="epField">
|
142
|
<span class="epFieldNM">Subject *</span>
|
143
|
</div>
|
144
|
<div class="epField">
|
145
|
<s:textfield name="subject" />
|
146
|
</div>
|
147
|
|
148
|
<div class="epField">
|
149
|
<span class="epFieldNM">Description *</span>
|
150
|
</div>
|
151
|
<div class="epField">
|
152
|
<s:textarea name="description" rows="3" cols="49"/>
|
153
|
</div>
|
154
|
|
155
|
<div class="epField">
|
156
|
<s:submit value="Create" />
|
157
|
<s:submit value="Reset" />
|
158
|
</div>
|
159
|
|
160
|
<div class="curved_container clearfix"/>
|
161
|
|
162
|
|
163
|
<div class="registercomments">
|
164
|
* all fields are mandatory and must be completed.
|
165
|
</div>
|
166
|
|
167
|
<div class="curved_container clearfix"/>
|
168
|
|
169
|
<hr/>
|
170
|
|
171
|
<div class="epField">
|
172
|
<span class="epFieldNM">
|
173
|
Manage your selected resources:
|
174
|
</span>
|
175
|
</div>
|
176
|
<div class="searchresultsitem">
|
177
|
<table id="listtbl">
|
178
|
<tbody>
|
179
|
<tr>
|
180
|
<th><center>Resources</center></th>
|
181
|
<s:if test="%{target.equals('Enhanced publication')}">
|
182
|
<th align="center">EPrint*</th>
|
183
|
</s:if>
|
184
|
<th align="center"><center>Relation*</center></th>
|
185
|
</tr>
|
186
|
<s:iterator value="#request['documents']" id="document" status="status">
|
187
|
<s:hidden name="documentListIds[%{#status.index}]" value="%{#document.id}"/>
|
188
|
<tr>
|
189
|
<td>
|
190
|
<s:include value="/pages/search/results/html/document.jsp"/>
|
191
|
</td>
|
192
|
<s:if test="%{target.equals('Enhanced publication')}">
|
193
|
<td align="center">
|
194
|
<s:radio theme="simple" name="ePrint" list="#{#document.id:''}" onchange="javascript:disableList(%{#status.count});" />
|
195
|
</td>
|
196
|
</s:if>
|
197
|
<td align="center">
|
198
|
<s:select name="nonEPrints[%{#status.index}]" list="relationMap[target][#request['docType']]" headerValue="Choose Relation..." headerKey="unknown" id="select_%{#status.count}" />
|
199
|
</td>
|
200
|
</tr>
|
201
|
</s:iterator>
|
202
|
</tbody>
|
203
|
</table>
|
204
|
</div>
|
205
|
</s:form>
|
206
|
|
207
|
<div class="curved_container clearfix">
|
208
|
<b class="curved_bottom">
|
209
|
<b class="curved_b4"></b>
|
210
|
<b class="curved_b3"></b>
|
211
|
<b class="curved_b2"></b>
|
212
|
<b class="curved_b1"></b>
|
213
|
</b>
|
214
|
</div>
|
215
|
</div>
|
216
|
</div>
|
217
|
</div>
|
218
|
<div id="footer">
|
219
|
<s:action name="FooterPage" executeResult="true"/>
|
220
|
</div>
|
221
|
</div>
|
222
|
</div>
|
223
|
</div>
|
224
|
</div>
|
225
|
|
226
|
</body>
|
227
|
|
228
|
|
229
|
|
230
|
|
231
|
</html>
|