| 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(){
|
|
|
15 |
$('div.editable').click(function(e){
|
|
|
16 |
var clicked = $(this);
|
|
|
17 |
e.preventDefault();
|
|
|
18 |
$('<div title="Expert Review"><textarea name="abc" style="height:240px;width:500px"></textarea></div>').find('textarea')
|
|
|
19 |
.val($(this).html())
|
|
|
20 |
.end()
|
|
|
21 |
.dialog( {
|
|
|
22 |
height: 470,
|
|
|
23 |
width: 700,
|
|
|
24 |
buttons: {
|
|
|
25 |
"OK": function() {
|
|
|
26 |
inputContent = tinyMCE.activeEditor.getContent();
|
|
|
27 |
if (inputContent == "" || inputContent == '<p><span style="cursor:pointer;color:blue">Click here to Edit</span></p>'){
|
|
|
28 |
inputContent = '<span style="cursor:pointer;color:blue">Click here to Edit</span>';
|
|
|
29 |
}
|
|
|
30 |
$('#expertReviewHtml').val(inputContent);
|
|
|
31 |
clicked.html(inputContent);
|
|
|
32 |
$(this).dialog("close");
|
|
|
33 |
}
|
|
|
34 |
},
|
|
|
35 |
modal: true});
|
|
|
36 |
tinymce.init({
|
|
|
37 |
selector: "textarea",
|
|
|
38 |
plugins: [
|
|
|
39 |
"advlist autolink lists link image charmap print preview anchor",
|
|
|
40 |
"searchreplace visualblocks code fullscreen",
|
|
|
41 |
"insertdatetime media table contextmenu paste"
|
|
|
42 |
],
|
|
|
43 |
toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
|
|
|
44 |
autosave_ask_before_unload: false
|
|
|
45 |
});
|
|
|
46 |
});
|
|
|
47 |
});
|
|
|
48 |
</script>
|
|
|
49 |
<link type="text/css" href="../jquery/jqueryui/themes/ui-lightness/jquery.ui.all.css" rel="stylesheet" />
|
|
|
50 |
<style type="text/css">
|
|
|
51 |
|
|
|
52 |
* { font-family: Verdana; font-size: 96%; }
|
|
|
53 |
fieldset.label { width: 10em; float: left; }
|
|
|
54 |
label.error { float: none; color: red; padding-left: .5em; vertical-align: top; }
|
|
|
55 |
p { clear: both; }
|
|
|
56 |
.submit { margin-left: 12em; }
|
|
|
57 |
em { font-weight: bold; padding-right: 1em; vertical-align: top; }
|
|
|
58 |
|
|
|
59 |
table {
|
|
|
60 |
border-width: 1px 1px 1px 1px;
|
|
|
61 |
border-spacing: 0px;
|
|
|
62 |
border-color: gray gray gray gray;
|
|
|
63 |
border-collapse: separate;
|
|
|
64 |
border-style: solid;
|
|
|
65 |
background-color: white;
|
|
|
66 |
}
|
|
|
67 |
th {
|
|
|
68 |
border-width: 1px 1px 1px 1px;
|
|
|
69 |
border-style: solid;
|
|
|
70 |
padding: 3px;
|
|
|
71 |
border-color: gray gray gray gray;
|
|
|
72 |
background-color: white;
|
|
|
73 |
-moz-border-radius: 0px 0px 0px 0px;
|
|
|
74 |
}
|
|
|
75 |
td {
|
|
|
76 |
border-style: solid;
|
|
|
77 |
border-width: 1px 1px 1px 1px;
|
|
|
78 |
padding: 3px 4px;
|
|
|
79 |
border-color: gray gray gray gray;
|
|
|
80 |
background-color: white;
|
|
|
81 |
-moz-border-radius: 0px 0px 0px 0px;
|
|
|
82 |
}
|
|
|
83 |
div.dialog {
|
|
|
84 |
padding:12px;
|
|
|
85 |
font-family: "Trebuchet MS", "Arial", "Helvetica", "Verdana", "sans-serif";
|
|
|
86 |
}
|
|
|
87 |
</style>
|
|
|
88 |
|
|
|
89 |
</head>
|
|
|
90 |
<body>
|
|
|
91 |
<div>
|
|
|
92 |
<span align="right"> Welcome $action.getUsername() <a href="$request.contextPath/logout">logout</a></span>
|
|
|
93 |
</div>
|
|
|
94 |
<div>
|
|
|
95 |
<h2>Expert Review</h2>
|
|
|
96 |
<a style="padding:2px" href="new">Create New</a>
|
|
|
97 |
<h3>$entityId - $entityName</h3>
|
|
|
98 |
<table>
|
|
|
99 |
<tr>
|
|
|
100 |
<th>Score</th>
|
|
|
101 |
<th>Source Url</th>
|
|
|
102 |
<th style="width:50%">Expert Review</th>
|
|
|
103 |
<th>Status</th>
|
|
|
104 |
<th>Created on</th>
|
|
|
105 |
#if($action.canOrder())
|
|
|
106 |
<th>Move to index</th>
|
|
|
107 |
#end
|
|
|
108 |
<th>Actions</th>
|
|
|
109 |
</tr>
|
|
|
110 |
#set ($iter = -1)
|
|
|
111 |
#set ($canDelete = $action.canDelete())
|
|
|
112 |
#foreach($review in $expertReviewByEntity)
|
|
|
113 |
<tr>
|
|
|
114 |
#set ($iter = $iter + 1)
|
|
|
115 |
<td>$iter</td>
|
|
|
116 |
<td>$review.getSource()</td>
|
|
|
117 |
<td><div#if ($action.canAddDelete($review)) class="editable"#end>$review.getReviewContent()</div></td>
|
|
|
118 |
<td>$review.getStatus()</td>
|
|
|
119 |
<td>$review.getCreatedOn()</td>
|
|
|
120 |
#if($action.canOrder())
|
|
|
121 |
<td>
|
|
|
122 |
<form method="POST" action="$entityId!move">
|
|
|
123 |
<input type="text" style="width:50px" name="index"/>
|
|
|
124 |
<input type="hidden" name="previous" value="$iter"/>
|
|
|
125 |
<input type="submit" value="Move"/>
|
|
|
126 |
</form>
|
|
|
127 |
</td>
|
|
|
128 |
#end
|
|
|
129 |
<td>
|
|
|
130 |
#if($action.canAddDelete($review) || $canDelete)
|
|
|
131 |
<a style="padding:1px" href="$entityId!delete?index=$iter" onclick="return confirm('Are you sure?');">Delete</a>
|
|
|
132 |
#end
|
|
|
133 |
#if($action.canApprove($review))
|
|
|
134 |
<a style="padding:1px" href="$entityId!approve?index=$iter" onclick="return confirm('Are you sure?');">Approve</a>
|
|
|
135 |
#end
|
|
|
136 |
#if($action.canPublish($review))
|
|
|
137 |
<a style="padding:1px" href="$entityId!publish?index=$iter" onclick="return confirm('Are you sure?');">Publish</a>
|
|
|
138 |
#end
|
|
|
139 |
#if($action.canPhaseOut($review))
|
|
|
140 |
<a style="padding:1px" href="$entityId!phaseOut?index=$iter" onclick="return confirm('Are you sure?');">Phase out</a>
|
|
|
141 |
#end
|
|
|
142 |
</td>
|
|
|
143 |
</tr>
|
|
|
144 |
#end
|
|
|
145 |
</table>
|
|
|
146 |
</div>
|
|
|
147 |
</body>
|
|
|
148 |
</html>
|