Parent: [c9d94b] (diff)

Child: [831432] (diff)

Download this file

search_results.html    121 lines (113 with data), 7.4 kB

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