|
a |
|
b/OSSEval/IMDBMovieApp/templates/IMDBMovieApp/search_results.html |
|
|
1 |
<!--
|
|
|
2 |
# This Source Code Form of OSSEval is subject to the terms of the GNU AFFERO
|
|
|
3 |
# GENERAL PUBLIC LICENSE, v. 3.0. If a copy of the AGPL was not
|
|
|
4 |
# distributed with this file, You can obtain one at http://www.gnu.org/licenses/agpl.txt
|
|
|
5 |
#
|
|
|
6 |
# OSSeval is powered by the SOS Open Source AGPL edition.
|
|
|
7 |
# The AGPL requires that you do not remove the SOS Open Source attribution and copyright
|
|
|
8 |
# notices from the user interface (see section 5.d below).
|
|
|
9 |
|
|
|
10 |
# OSSEval Copyright 2014 Bitergium SLL
|
|
|
11 |
# SOS Open Source Copyright 2012 Roberto Galoppini
|
|
|
12 |
# Author: Davide Galletti
|
|
|
13 |
-->
|
|
|
14 |
|
|
|
15 |
{% load staticfiles %}
|
|
|
16 |
<thead><tr><th></th><th>Title</th><th>Description</th></tr></thead>
|
|
|
17 |
<tbody>
|
|
|
18 |
{% for m in movies %}
|
|
|
19 |
<tr>
|
|
|
20 |
<td class="" valign="center">
|
|
|
21 |
<a id="movie_instance" analysis_id="{{ analysis_id }}" imdb_id="{{ m.imdb_id }}" title="{{ m.title }}">
|
|
|
22 |
<img src="{% static "images/add.jpg" %}" />
|
|
|
23 |
</a>
|
|
|
24 |
|
|
|
25 |
<a id="movie_instance_info" identifier="{{ m.imdb_id }}" target="_blank" href="http://www.imdb.com/title/{{ m.imdb_id }}"><img src="{% static "images/" %}imdb.jpg" /></a><br/>
|
|
|
26 |
</td>
|
|
|
27 |
<td class="" valign="center">{{ m.title }}</td>
|
|
|
28 |
<td class="truncateIt">{{ m.description }}</td>
|
|
|
29 |
</tr>
|
|
|
30 |
{% endfor %}
|
|
|
31 |
|
|
|
32 |
<script type="text/javascript">
|
|
|
33 |
$("a#movie_instance_info").click(function(){
|
|
|
34 |
$.post("{% url 'OSProjectForgeFromResultList_detail' %}",
|
|
|
35 |
{
|
|
|
36 |
csrfmiddlewaretoken: '{{ csrf_token }}',
|
|
|
37 |
id_forge: $(this).attr("id_forge"),
|
|
|
38 |
identifier_in_forge: $(this).attr("identifier_in_forge")
|
|
|
39 |
},
|
|
|
40 |
function(data) {
|
|
|
41 |
var popup=window.open('','name','height=400,width=500');
|
|
|
42 |
popup.document.write('<PRE>');
|
|
|
43 |
popup.document.write(data);
|
|
|
44 |
popup.document.write('</PRE>');
|
|
|
45 |
}
|
|
|
46 |
);
|
|
|
47 |
});
|
|
|
48 |
var clicked_item = null
|
|
|
49 |
$("a#movie_instance").click(function(){
|
|
|
50 |
clicked_item = $(this);
|
|
|
51 |
$.post("{% url 'IMDBMovie_add' %}",
|
|
|
52 |
{
|
|
|
53 |
csrfmiddlewaretoken: '{{ csrf_token }}',
|
|
|
54 |
analysis_id: clicked_item.attr("analysis_id"),
|
|
|
55 |
imdb_id: clicked_item.attr("imdb_id"),
|
|
|
56 |
title: clicked_item.attr("title")
|
|
|
57 |
},
|
|
|
58 |
function(data) {
|
|
|
59 |
location.reload(true);
|
|
|
60 |
}
|
|
|
61 |
);
|
|
|
62 |
});
|
|
|
63 |
</script>
|
|
|
64 |
|
|
|
65 |
<div id="popup_osp_choice" title="Where to add the project">
|
|
|
66 |
</div>
|
|
|
67 |
|
|
|
68 |
|
|
|
69 |
<script type="text/javascript">
|
|
|
70 |
$( "#popup_osp_choice" ).dialog({
|
|
|
71 |
autoOpen: false, height: 300, width: 300, modal: true,
|
|
|
72 |
buttons: {
|
|
|
73 |
"Add to selected tab": function() {
|
|
|
74 |
$.post("{% url 'OSProjectForge_add' %}",
|
|
|
75 |
{
|
|
|
76 |
csrfmiddlewaretoken: '{{ csrf_token }}',
|
|
|
77 |
id_selected_instance: id_selected_instance,
|
|
|
78 |
analysis_id: clicked_item.attr("analysis_id"),
|
|
|
79 |
id_forge: clicked_item.attr("id_forge"),
|
|
|
80 |
datasource_id: clicked_item.attr("datasource_id"),
|
|
|
81 |
identifier_in_forge: clicked_item.attr("identifier_in_forge"),
|
|
|
82 |
project_name: clicked_item.attr("name")
|
|
|
83 |
},
|
|
|
84 |
function(data) {
|
|
|
85 |
location.reload(true);
|
|
|
86 |
}
|
|
|
87 |
);
|
|
|
88 |
$( this ).dialog( "close" );
|
|
|
89 |
},
|
|
|
90 |
"Add to new tab": function() {
|
|
|
91 |
$.post("{% url 'OSProjectForge_add' %}",
|
|
|
92 |
{
|
|
|
93 |
csrfmiddlewaretoken: '{{ csrf_token }}',
|
|
|
94 |
id_selected_instance: -1,
|
|
|
95 |
analysis_id: clicked_item.attr("analysis_id"),
|
|
|
96 |
id_forge: clicked_item.attr("id_forge"),
|
|
|
97 |
datasource_id: clicked_item.attr("datasource_id"),
|
|
|
98 |
identifier_in_forge: clicked_item.attr("identifier_in_forge"),
|
|
|
99 |
project_name: clicked_item.attr("name")
|
|
|
100 |
},
|
|
|
101 |
function(data) {
|
|
|
102 |
location.reload(true);
|
|
|
103 |
}
|
|
|
104 |
);
|
|
|
105 |
$( this ).dialog( "close" );
|
|
|
106 |
}
|
|
|
107 |
},
|
|
|
108 |
close: function() {
|
|
|
109 |
}
|
|
|
110 |
});
|
|
|
111 |
</script>
|
|
|
112 |
|