| 7286 |
amit.gupta |
1 |
<!DOCTYPE html>
|
|
|
2 |
|
|
|
3 |
<html lang="en-US">
|
|
|
4 |
<head>
|
|
|
5 |
<title>Create Expert Review</title>
|
|
|
6 |
<script type="text/javascript" src="../jquery/jquery-1.4.2.js"></script>
|
|
|
7 |
<script type="text/javascript" src="../js/common.js"></script>
|
|
|
8 |
<script type="text/javascript" src="../jquery/jqueryui/ui/jquery.ui.core.js"></script>
|
|
|
9 |
<script type="text/javascript" src="../jquery/jqueryui/ui/jquery.ui.widget.js"></script>
|
|
|
10 |
<script type="text/javascript" src="../jquery/jqueryui/ui/jquery.ui.dialog.js"></script>
|
|
|
11 |
<script type="text/javascript" src="../js/events.js"></script>
|
|
|
12 |
<script type="text/javascript" src="../js/tinymce/tinymce.min.js"></script>
|
|
|
13 |
<script type="text/javascript">
|
|
|
14 |
$(document).ready(function(){
|
| 7312 |
amit.gupta |
15 |
$('#newreview').click(function(e){
|
|
|
16 |
$('#addNew').show();
|
|
|
17 |
});
|
| 7286 |
amit.gupta |
18 |
$('div.editable').click(function(e){
|
|
|
19 |
var clicked = $(this);
|
|
|
20 |
e.preventDefault();
|
|
|
21 |
$('<div title="Expert Review"><textarea name="abc" style="height:240px;width:500px"></textarea></div>').find('textarea')
|
|
|
22 |
.val($(this).html())
|
|
|
23 |
.end()
|
|
|
24 |
.dialog( {
|
|
|
25 |
height: 470,
|
|
|
26 |
width: 700,
|
|
|
27 |
buttons: {
|
|
|
28 |
"OK": function() {
|
|
|
29 |
inputContent = tinyMCE.activeEditor.getContent();
|
|
|
30 |
if (inputContent == "" || inputContent == '<p><span style="cursor:pointer;color:blue">Click here to Edit</span></p>'){
|
|
|
31 |
inputContent = '<span style="cursor:pointer;color:blue">Click here to Edit</span>';
|
|
|
32 |
}
|
|
|
33 |
$('#expertReviewHtml').val(inputContent);
|
|
|
34 |
clicked.html(inputContent);
|
|
|
35 |
$(this).dialog("close");
|
|
|
36 |
}
|
|
|
37 |
},
|
|
|
38 |
modal: true});
|
|
|
39 |
tinymce.init({
|
|
|
40 |
selector: "textarea",
|
|
|
41 |
plugins: [
|
|
|
42 |
"advlist autolink lists link image charmap print preview anchor",
|
|
|
43 |
"searchreplace visualblocks code fullscreen",
|
|
|
44 |
"insertdatetime media table contextmenu paste"
|
|
|
45 |
],
|
|
|
46 |
toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
|
|
|
47 |
autosave_ask_before_unload: false
|
|
|
48 |
});
|
|
|
49 |
});
|
|
|
50 |
});
|
|
|
51 |
</script>
|
|
|
52 |
<link type="text/css" href="../jquery/jqueryui/themes/ui-lightness/jquery.ui.all.css" rel="stylesheet" />
|
|
|
53 |
<style type="text/css">
|
|
|
54 |
|
|
|
55 |
* { font-family: Verdana; font-size: 96%; }
|
|
|
56 |
fieldset.label { width: 10em; float: left; }
|
|
|
57 |
label.error { float: none; color: red; padding-left: .5em; vertical-align: top; }
|
|
|
58 |
p { clear: both; }
|
|
|
59 |
.submit { margin-left: 12em; }
|
|
|
60 |
em { font-weight: bold; padding-right: 1em; vertical-align: top; }
|
|
|
61 |
|
|
|
62 |
table {
|
|
|
63 |
border-width: 1px 1px 1px 1px;
|
|
|
64 |
border-spacing: 0px;
|
|
|
65 |
border-color: gray gray gray gray;
|
|
|
66 |
border-collapse: separate;
|
|
|
67 |
border-style: solid;
|
|
|
68 |
background-color: white;
|
|
|
69 |
}
|
|
|
70 |
th {
|
|
|
71 |
border-width: 1px 1px 1px 1px;
|
|
|
72 |
border-style: solid;
|
|
|
73 |
padding: 3px;
|
|
|
74 |
border-color: gray gray gray gray;
|
|
|
75 |
background-color: white;
|
|
|
76 |
-moz-border-radius: 0px 0px 0px 0px;
|
|
|
77 |
}
|
|
|
78 |
td {
|
|
|
79 |
border-style: solid;
|
|
|
80 |
border-width: 1px 1px 1px 1px;
|
|
|
81 |
padding: 3px 4px;
|
|
|
82 |
border-color: gray gray gray gray;
|
|
|
83 |
background-color: white;
|
|
|
84 |
-moz-border-radius: 0px 0px 0px 0px;
|
|
|
85 |
}
|
|
|
86 |
div.dialog {
|
|
|
87 |
padding:12px;
|
|
|
88 |
font-family: "Trebuchet MS", "Arial", "Helvetica", "Verdana", "sans-serif";
|
|
|
89 |
}
|
|
|
90 |
</style>
|
|
|
91 |
|
|
|
92 |
</head>
|
|
|
93 |
<body>
|
|
|
94 |
<div>
|
|
|
95 |
<span align="right"> Welcome $action.getUsername() <a href="$request.contextPath/logout">logout</a></span>
|
|
|
96 |
</div>
|
|
|
97 |
<div>
|
|
|
98 |
<h2>Expert Review</h2>
|
| 7312 |
amit.gupta |
99 |
<a style="padding:2px" href="javascript:void(0)" id="newreview">Add New Review</a>
|
|
|
100 |
<form method="POST" action="/content/expert-review" style="display:none" id="addNew">
|
|
|
101 |
<fieldset style="width:600px">
|
|
|
102 |
<label for="entityId">Entity ID</label><br>
|
|
|
103 |
<input type="text" name="entityId" id="entityId" class="text ui-widget-content ui-corner-all" disabled value="$entityId"/><br><br>
|
|
|
104 |
<input type="hidden" name="entityId" value="$entityId"/>
|
|
|
105 |
<label for="source">Source Label</label><br>
|
|
|
106 |
<select name="source" id="source" class="text ui-widget-content ui-corner-all" >
|
|
|
107 |
#foreach ($source in $sources)
|
|
|
108 |
<option title="$source.getSourceUrl()" value="$source.getSource()">$source.getSource()</option>
|
|
|
109 |
#end
|
|
|
110 |
</select>
|
|
|
111 |
<br><br>
|
|
|
112 |
<label for="password">Expert Review</label><br>
|
|
|
113 |
<div class="editable" style="border:1px solid red;padding:2px"><span style="cursor:pointer;color:blue">Click here to Edit</span></div><br><br>
|
|
|
114 |
<label for="sourceUrl">Source Url</label><br>
|
|
|
115 |
<input type="textbox" style="width:200px" class="text ui-widget-content ui-corner-all" name="sourceUrl" id="sourceUrl"/>
|
|
|
116 |
<input type="hidden" name="expertReviewHtml" id="expertReviewHtml"/><br><br>
|
|
|
117 |
<input type="submit" value="Create" name="submit"></input>
|
|
|
118 |
</fieldset>
|
|
|
119 |
</form>
|
| 7286 |
amit.gupta |
120 |
<h3>$entityId - $entityName</h3>
|
|
|
121 |
<table>
|
|
|
122 |
<tr>
|
|
|
123 |
<th>Score</th>
|
| 7312 |
amit.gupta |
124 |
<th>Source Label</th>
|
| 7286 |
amit.gupta |
125 |
<th style="width:50%">Expert Review</th>
|
|
|
126 |
<th>Status</th>
|
| 7312 |
amit.gupta |
127 |
<th>Source Url</th>
|
| 7286 |
amit.gupta |
128 |
#if($action.canOrder())
|
| 7471 |
amit.gupta |
129 |
<th>Update Order</th>
|
| 7286 |
amit.gupta |
130 |
#end
|
|
|
131 |
<th>Actions</th>
|
|
|
132 |
</tr>
|
|
|
133 |
#set ($iter = -1)
|
|
|
134 |
#set ($canDelete = $action.canDelete())
|
|
|
135 |
#foreach($review in $expertReviewByEntity)
|
|
|
136 |
<tr>
|
|
|
137 |
#set ($iter = $iter + 1)
|
|
|
138 |
<td>$iter</td>
|
|
|
139 |
<td>$review.getSource()</td>
|
|
|
140 |
<td><div#if ($action.canAddDelete($review)) class="editable"#end>$review.getReviewContent()</div></td>
|
|
|
141 |
<td>$review.getStatus()</td>
|
| 7312 |
amit.gupta |
142 |
<td>#if ($review.getUrl())
|
|
|
143 |
$review.getUrl()
|
|
|
144 |
#else Not provided
|
|
|
145 |
#end</td>
|
| 7286 |
amit.gupta |
146 |
#if($action.canOrder())
|
|
|
147 |
<td>
|
|
|
148 |
<form method="POST" action="$entityId!move">
|
|
|
149 |
<input type="text" style="width:50px" name="index"/>
|
|
|
150 |
<input type="hidden" name="previous" value="$iter"/>
|
|
|
151 |
<input type="submit" value="Move"/>
|
|
|
152 |
</form>
|
|
|
153 |
</td>
|
|
|
154 |
#end
|
|
|
155 |
<td>
|
| 7471 |
amit.gupta |
156 |
#if($action.canSendForApproval($review))
|
|
|
157 |
<a style="padding:1px" href="$entityId!sendForApproval?index=$iter" onclick="return confirm('Are you sure?');">Complete</a>
|
|
|
158 |
#end
|
| 7286 |
amit.gupta |
159 |
#if($action.canAddDelete($review) || $canDelete)
|
|
|
160 |
<a style="padding:1px" href="$entityId!delete?index=$iter" onclick="return confirm('Are you sure?');">Delete</a>
|
|
|
161 |
#end
|
|
|
162 |
#if($action.canApprove($review))
|
|
|
163 |
<a style="padding:1px" href="$entityId!approve?index=$iter" onclick="return confirm('Are you sure?');">Approve</a>
|
|
|
164 |
#end
|
|
|
165 |
#if($action.canPublish($review))
|
|
|
166 |
<a style="padding:1px" href="$entityId!publish?index=$iter" onclick="return confirm('Are you sure?');">Publish</a>
|
|
|
167 |
#end
|
|
|
168 |
#if($action.canPhaseOut($review))
|
|
|
169 |
<a style="padding:1px" href="$entityId!phaseOut?index=$iter" onclick="return confirm('Are you sure?');">Phase out</a>
|
|
|
170 |
#end
|
| 7471 |
amit.gupta |
171 |
|
| 7286 |
amit.gupta |
172 |
</td>
|
|
|
173 |
</tr>
|
|
|
174 |
#end
|
|
|
175 |
</table>
|
|
|
176 |
</div>
|
|
|
177 |
</body>
|
|
|
178 |
</html>
|