| 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() {
|
| 7794 |
amit.gupta |
29 |
inputContent = $(this).find('textarea').val();
|
|
|
30 |
if (inputContent == "" || inputContent == 'Click here to Edit'){
|
|
|
31 |
inputContent = 'Click here to Edit';
|
| 7286 |
amit.gupta |
32 |
}
|
| 7585 |
amit.gupta |
33 |
$('#erhtml').val(inputContent);
|
| 7586 |
amit.gupta |
34 |
$('#expertReviewHtml').val(inputContent);
|
| 7286 |
amit.gupta |
35 |
clicked.html(inputContent);
|
| 7585 |
amit.gupta |
36 |
$("#indexid").val(clicked.closest('tr').find('td').html());
|
|
|
37 |
$(this).dialog("close");
|
| 7586 |
amit.gupta |
38 |
if(!clicked.hasClass("new")){
|
|
|
39 |
$("#changeContent").submit();
|
|
|
40 |
}
|
| 7286 |
amit.gupta |
41 |
}
|
|
|
42 |
},
|
|
|
43 |
modal: true});
|
|
|
44 |
});
|
|
|
45 |
});
|
|
|
46 |
</script>
|
|
|
47 |
<link type="text/css" href="../jquery/jqueryui/themes/ui-lightness/jquery.ui.all.css" rel="stylesheet" />
|
|
|
48 |
<style type="text/css">
|
|
|
49 |
|
|
|
50 |
* { font-family: Verdana; font-size: 96%; }
|
|
|
51 |
fieldset.label { width: 10em; float: left; }
|
|
|
52 |
label.error { float: none; color: red; padding-left: .5em; vertical-align: top; }
|
|
|
53 |
p { clear: both; }
|
|
|
54 |
.submit { margin-left: 12em; }
|
|
|
55 |
em { font-weight: bold; padding-right: 1em; vertical-align: top; }
|
|
|
56 |
|
|
|
57 |
table {
|
|
|
58 |
border-width: 1px 1px 1px 1px;
|
|
|
59 |
border-spacing: 0px;
|
|
|
60 |
border-color: gray gray gray gray;
|
|
|
61 |
border-collapse: separate;
|
|
|
62 |
border-style: solid;
|
|
|
63 |
background-color: white;
|
|
|
64 |
}
|
|
|
65 |
th {
|
|
|
66 |
border-width: 1px 1px 1px 1px;
|
|
|
67 |
border-style: solid;
|
|
|
68 |
padding: 3px;
|
|
|
69 |
border-color: gray gray gray gray;
|
|
|
70 |
background-color: white;
|
|
|
71 |
-moz-border-radius: 0px 0px 0px 0px;
|
|
|
72 |
}
|
|
|
73 |
td {
|
|
|
74 |
border-style: solid;
|
|
|
75 |
border-width: 1px 1px 1px 1px;
|
|
|
76 |
padding: 3px 4px;
|
|
|
77 |
border-color: gray gray gray gray;
|
|
|
78 |
background-color: white;
|
|
|
79 |
-moz-border-radius: 0px 0px 0px 0px;
|
|
|
80 |
}
|
|
|
81 |
div.dialog {
|
|
|
82 |
padding:12px;
|
|
|
83 |
font-family: "Trebuchet MS", "Arial", "Helvetica", "Verdana", "sans-serif";
|
|
|
84 |
}
|
|
|
85 |
</style>
|
|
|
86 |
|
|
|
87 |
</head>
|
|
|
88 |
<body>
|
|
|
89 |
<div>
|
|
|
90 |
<span align="right"> Welcome $action.getUsername() <a href="$request.contextPath/logout">logout</a></span>
|
|
|
91 |
</div>
|
|
|
92 |
<div>
|
|
|
93 |
<h2>Expert Review</h2>
|
| 7312 |
amit.gupta |
94 |
<a style="padding:2px" href="javascript:void(0)" id="newreview">Add New Review</a>
|
|
|
95 |
<form method="POST" action="/content/expert-review" style="display:none" id="addNew">
|
|
|
96 |
<fieldset style="width:600px">
|
|
|
97 |
<label for="entityId">Entity ID</label><br>
|
|
|
98 |
<input type="text" name="entityId" id="entityId" class="text ui-widget-content ui-corner-all" disabled value="$entityId"/><br><br>
|
|
|
99 |
<input type="hidden" name="entityId" value="$entityId"/>
|
|
|
100 |
<label for="source">Source Label</label><br>
|
|
|
101 |
<select name="source" id="source" class="text ui-widget-content ui-corner-all" >
|
|
|
102 |
#foreach ($source in $sources)
|
|
|
103 |
<option title="$source.getSourceUrl()" value="$source.getSource()">$source.getSource()</option>
|
|
|
104 |
#end
|
|
|
105 |
</select>
|
|
|
106 |
<br><br>
|
| 7794 |
amit.gupta |
107 |
<label for="password">Expert Review</label><br>
|
| 7587 |
amit.gupta |
108 |
<div class="editable new" style="border:1px solid red;padding:2px"><span style="cursor:pointer;color:blue">Click here to Edit</span></div><br><br>
|
| 7312 |
amit.gupta |
109 |
<label for="sourceUrl">Source Url</label><br>
|
|
|
110 |
<input type="textbox" style="width:200px" class="text ui-widget-content ui-corner-all" name="sourceUrl" id="sourceUrl"/>
|
|
|
111 |
<input type="hidden" name="expertReviewHtml" id="expertReviewHtml"/><br><br>
|
|
|
112 |
<input type="submit" value="Create" name="submit"></input>
|
|
|
113 |
</fieldset>
|
|
|
114 |
</form>
|
| 7286 |
amit.gupta |
115 |
<h3>$entityId - $entityName</h3>
|
|
|
116 |
<table>
|
|
|
117 |
<tr>
|
|
|
118 |
<th>Score</th>
|
| 7312 |
amit.gupta |
119 |
<th>Source Label</th>
|
| 7286 |
amit.gupta |
120 |
<th style="width:50%">Expert Review</th>
|
|
|
121 |
<th>Status</th>
|
| 7312 |
amit.gupta |
122 |
<th>Source Url</th>
|
| 7286 |
amit.gupta |
123 |
#if($action.canOrder())
|
| 7471 |
amit.gupta |
124 |
<th>Update Order</th>
|
| 7286 |
amit.gupta |
125 |
#end
|
|
|
126 |
<th>Actions</th>
|
|
|
127 |
</tr>
|
|
|
128 |
#set ($iter = -1)
|
|
|
129 |
#set ($canDelete = $action.canDelete())
|
|
|
130 |
#foreach($review in $expertReviewByEntity)
|
|
|
131 |
<tr>
|
|
|
132 |
#set ($iter = $iter + 1)
|
|
|
133 |
<td>$iter</td>
|
|
|
134 |
<td>$review.getSource()</td>
|
| 7794 |
amit.gupta |
135 |
<td><div#if ($action.canAddDelete($review)) class="editable" #end style="font-style:italic">$review.getReviewContent()</div></td>
|
| 7286 |
amit.gupta |
136 |
<td>$review.getStatus()</td>
|
| 7312 |
amit.gupta |
137 |
<td>#if ($review.getUrl())
|
|
|
138 |
$review.getUrl()
|
|
|
139 |
#else Not provided
|
|
|
140 |
#end</td>
|
| 7286 |
amit.gupta |
141 |
#if($action.canOrder())
|
|
|
142 |
<td>
|
|
|
143 |
<form method="POST" action="$entityId!move">
|
|
|
144 |
<input type="text" style="width:50px" name="index"/>
|
|
|
145 |
<input type="hidden" name="previous" value="$iter"/>
|
|
|
146 |
<input type="submit" value="Move"/>
|
|
|
147 |
</form>
|
|
|
148 |
</td>
|
|
|
149 |
#end
|
|
|
150 |
<td>
|
| 7471 |
amit.gupta |
151 |
#if($action.canSendForApproval($review))
|
|
|
152 |
<a style="padding:1px" href="$entityId!sendForApproval?index=$iter" onclick="return confirm('Are you sure?');">Complete</a>
|
|
|
153 |
#end
|
| 7286 |
amit.gupta |
154 |
#if($action.canAddDelete($review) || $canDelete)
|
|
|
155 |
<a style="padding:1px" href="$entityId!delete?index=$iter" onclick="return confirm('Are you sure?');">Delete</a>
|
|
|
156 |
#end
|
|
|
157 |
#if($action.canApprove($review))
|
|
|
158 |
<a style="padding:1px" href="$entityId!approve?index=$iter" onclick="return confirm('Are you sure?');">Approve</a>
|
|
|
159 |
#end
|
|
|
160 |
#if($action.canPublish($review))
|
|
|
161 |
<a style="padding:1px" href="$entityId!publish?index=$iter" onclick="return confirm('Are you sure?');">Publish</a>
|
|
|
162 |
#end
|
|
|
163 |
#if($action.canPhaseOut($review))
|
|
|
164 |
<a style="padding:1px" href="$entityId!phaseOut?index=$iter" onclick="return confirm('Are you sure?');">Phase out</a>
|
|
|
165 |
#end
|
| 7471 |
amit.gupta |
166 |
|
| 7286 |
amit.gupta |
167 |
</td>
|
|
|
168 |
</tr>
|
|
|
169 |
#end
|
|
|
170 |
</table>
|
|
|
171 |
</div>
|
| 7585 |
amit.gupta |
172 |
<form id="changeContent" method="POST" action="$entityId!change" style="display:none">
|
|
|
173 |
<input id="indexid" type="hidden" style="width:50px" name="index"/>
|
|
|
174 |
<input id="erhtml" type="hidden" name="expertReviewHtml"/>
|
|
|
175 |
<input type="submit" value="Move"/>
|
|
|
176 |
</form>
|
| 7286 |
amit.gupta |
177 |
</body>
|
|
|
178 |
</html>
|