| author | rougeronj |
| Mon, 29 Dec 2014 17:27:43 +0100 | |
| changeset 415 | bf2db1849560 |
| parent 413 | 07ea964d33cd |
| child 417 | fd847122d85d |
| permissions | -rw-r--r-- |
| 288 | 1 |
{% extends "base.html" %} |
2 |
{% load static %} |
|
| 336 | 3 |
{% load i18n %} |
| 288 | 4 |
|
5 |
{% block title %}{{block.super}} > {{datasheet.title}}{% endblock %} |
|
6 |
||
7 |
{% block css_import %} |
|
8 |
{{block.super}} |
|
| 308 | 9 |
<link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/ui-lightness/jquery-ui-1.10.4.min.css' %}" /> |
| 311 | 10 |
<link rel="stylesheet" type="text/css" href="{% static 'renkanmanager/lib/renkan/css/renkan.css' %}" /> |
| 288 | 11 |
<link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/additionnal_renkan.css' %}" /> |
|
407
3f64001a8e1f
Split css of help Popup in new file + add dropdown to choose circle or line shape
rougeronj
parents:
385
diff
changeset
|
12 |
<link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/renkan_help.css' %}" /> |
| 337 | 13 |
<link rel="stylesheet" type="text/css" href="{% static 'hdalab/lib/bjqs.css' %}" /> |
| 288 | 14 |
{% endblock %} |
15 |
||
16 |
{% block js_import %} |
|
17 |
{{block.super}} |
|
| 337 | 18 |
<script src="{% static 'hdalab/lib/bjqs-1.3.min.js' %}"></script> |
| 413 | 19 |
<script src="{% static 'renkanmanager/lib/jquery-ui/jquery-ui.js' %}"></script> |
20 |
<script src="{% static 'renkanmanager/lib/jquery-mousewheel/jquery.mousewheel.js' %}"></script> |
|
21 |
<script src="{% static 'renkanmanager/lib/underscore/underscore.js' %}"></script> |
|
22 |
<script src="{% static 'renkanmanager/lib/backbone/backbone.js' %}"></script> |
|
23 |
<script src="{% static 'renkanmanager/lib/backbone-relational/backbone-relational.js' %}"></script> |
|
24 |
<script src="{% static 'renkanmanager/lib/paper/paper-full.js' %}"></script> |
|
| 288 | 25 |
<script type="text/javascript"> |
26 |
var require = { |
|
|
299
8e00641076e7
remove renkan management to an other django app (see renkan hg repo)
cavaliet
parents:
298
diff
changeset
|
27 |
baseUrl: "{% static 'renkanmanager/lib/' %}" |
| 288 | 28 |
}; |
29 |
</script> |
|
| 413 | 30 |
<script src="{% static 'renkanmanager/lib/requirejs/require.js' %}"></script> |
|
411
5e3f4a5f0900
Update ref to renkan.js + raise RENKANS_PER_PAGE from 3 to 8
rougeronj
parents:
409
diff
changeset
|
31 |
<script src="{% static 'renkanmanager/lib/renkan/js/renkan.js' %}"></script> |
|
323
67cff4e39ad8
search in notice json, and renkan search bin for notices.
cavaliet
parents:
311
diff
changeset
|
32 |
<script src="{% static 'hdalab/js/renkan-manual-save.js' %}"></script> |
|
67cff4e39ad8
search in notice json, and renkan search bin for notices.
cavaliet
parents:
311
diff
changeset
|
33 |
<script src="{% static 'hdalab/js/hdalab-renkan-bins.js' %}"></script> |
| 288 | 34 |
<script type="text/javascript"> |
| 308 | 35 |
var io_options = {}, dialog=false; |
| 288 | 36 |
function startRenkan(){ |
37 |
var _renkan = new Rkns.Renkan({ |
|
| 308 | 38 |
manual_save: true, |
|
412
436f3ec9d840
prevent from editing color (todo: hide color field) + pass user name to Renkan
rougeronj
parents:
411
diff
changeset
|
39 |
user_color_editable: false, |
|
436f3ec9d840
prevent from editing color (todo: hide color field) + pass user name to Renkan
rougeronj
parents:
411
diff
changeset
|
40 |
{% if user.is_authenticated %} |
| 415 | 41 |
user_id:"{{ user.id }}", |
42 |
user_name:"{{ user }}", |
|
|
412
436f3ec9d840
prevent from editing color (todo: hide color field) + pass user name to Renkan
rougeronj
parents:
411
diff
changeset
|
43 |
{% endif %} |
|
299
8e00641076e7
remove renkan management to an other django app (see renkan hg repo)
cavaliet
parents:
298
diff
changeset
|
44 |
static_url : "{% static 'renkanmanager/lib/renkan/' %}", |
| 288 | 45 |
search: [ |
46 |
{ |
|
| 324 | 47 |
type: "HdaTags", |
48 |
lang: "{{LANGUAGE_CODE}}", |
|
49 |
image: "http://dbpedia.org/statics/dbpedia_logo.png", |
|
50 |
url: "{% url 'tag_search' %}" |
|
51 |
}, |
|
52 |
{ |
|
|
323
67cff4e39ad8
search in notice json, and renkan search bin for notices.
cavaliet
parents:
311
diff
changeset
|
53 |
type: "HdaNotices", |
|
67cff4e39ad8
search in notice json, and renkan search bin for notices.
cavaliet
parents:
311
diff
changeset
|
54 |
lang: "{{LANGUAGE_CODE}}", |
|
67cff4e39ad8
search in notice json, and renkan search bin for notices.
cavaliet
parents:
311
diff
changeset
|
55 |
image: "http://digital-impulse.com/wp-content/plugins/smilies-themer/digicons/IronMan.png", |
|
67cff4e39ad8
search in notice json, and renkan search bin for notices.
cavaliet
parents:
311
diff
changeset
|
56 |
url: "{% url 'searchajax' %}" |
| 288 | 57 |
}, |
58 |
{ |
|
59 |
type: "Wikipedia", |
|
|
323
67cff4e39ad8
search in notice json, and renkan search bin for notices.
cavaliet
parents:
311
diff
changeset
|
60 |
lang: "{{LANGUAGE_CODE}}" |
| 288 | 61 |
} |
62 |
], |
|
63 |
bins: [ |
|
64 |
{ |
|
65 |
type: "ResourceList", |
|
66 |
title: "Ressources", |
|
67 |
list: [ |
|
68 |
{ |
|
69 |
url: "http://www.histoiredesarts.culture.fr/", |
|
70 |
title: "Histoire des arts", |
|
71 |
description: "Portail Histoire des arts sur culture.fr", |
|
72 |
image: "http://www.culture.fr/extension/culture_fr/design/culture/images/favicon.ico" |
|
|
323
67cff4e39ad8
search in notice json, and renkan search bin for notices.
cavaliet
parents:
311
diff
changeset
|
73 |
} |
| 288 | 74 |
] |
75 |
} |
|
76 |
], |
|
77 |
/*property_files: [ "data/properties.json" ], |
|
78 |
node_fill_color: false*/ |
|
|
323
67cff4e39ad8
search in notice json, and renkan search bin for notices.
cavaliet
parents:
311
diff
changeset
|
79 |
language: "{{LANGUAGE_CODE}}" |
| 288 | 80 |
}); |
| 308 | 81 |
|
|
412
436f3ec9d840
prevent from editing color (todo: hide color field) + pass user name to Renkan
rougeronj
parents:
411
diff
changeset
|
82 |
//_create_user_// |
|
436f3ec9d840
prevent from editing color (todo: hide color field) + pass user name to Renkan
rougeronj
parents:
411
diff
changeset
|
83 |
|
|
436f3ec9d840
prevent from editing color (todo: hide color field) + pass user name to Renkan
rougeronj
parents:
411
diff
changeset
|
84 |
//_____________// |
| 310 | 85 |
io_options = { url: "{% url 'renkan_get_put' %}" + window.location.search, user_authenticated: {% if user.is_authenticated %}true{% else %}false{% endif %} }; |
| 308 | 86 |
Rkns.jsonIOSaveOnClick(_renkan, io_options); |
|
412
436f3ec9d840
prevent from editing color (todo: hide color field) + pass user name to Renkan
rougeronj
parents:
411
diff
changeset
|
87 |
|
| 308 | 88 |
}; |
89 |
|
|
90 |
$(function() { |
|
91 |
var form; |
|
| 365 | 92 |
|
| 308 | 93 |
dialog = $( "#dialog-form" ).dialog({ |
94 |
autoOpen: false, |
|
| 385 | 95 |
height: 398, |
96 |
width: 520, |
|
97 |
modal: true, |
|
98 |
create: function (event, ui) { |
|
99 |
$("#login-popup-close").click(function(){ |
|
100 |
dialog.dialog("close"); |
|
101 |
}); |
|
102 |
} |
|
| 365 | 103 |
}); |
| 308 | 104 |
|
105 |
function manageLoginForm(e, form){ |
|
106 |
e.preventDefault(); |
|
107 |
f = $(form); |
|
108 |
$.ajax({ |
|
109 |
type: f.attr("method"), |
|
110 |
url: f.attr("action"), |
|
111 |
data: f.serialize(), |
|
112 |
success: function(data, textStatus, jqXHR) { |
|
| 310 | 113 |
var d = $(data); |
114 |
if($(".ok",d).length==1){ |
|
115 |
$("#dialog-form").html($(".ok",d)[0]); |
|
116 |
$(".hello-user").remove(); |
|
117 |
$("#nav").append($(".username",d).children()); |
|
118 |
//$("#dialog-form .close").click(function(){ |
|
119 |
// dialog.dialog( "close" ); |
|
120 |
//}); |
|
121 |
io_options.user_authenticated = true; |
|
122 |
$(".Rk-Save-Button").addClass("Rk-Save-Online"); |
|
123 |
dialog.dialog( "close" ); |
|
124 |
$(".Rk-Save-Button").click(); |
|
125 |
return true; |
|
126 |
} |
|
| 308 | 127 |
$("#dialog-form").html(data); |
128 |
// in case, login failed, we reassign the behaviour |
|
129 |
form = dialog.find( "form" ).on( "submit", function( event ) { |
|
130 |
manageLoginForm(event, this); |
|
131 |
}); |
|
132 |
} |
|
133 |
}); |
|
134 |
} |
|
135 |
|
|
| 365 | 136 |
form = dialog.find( "form" ).on( "submit", function( event ) { |
137 |
manageLoginForm(event, this); |
|
138 |
}); |
|
139 |
|
|
140 |
//help dialog init |
|
141 |
var help_dialog = $( "#help-container" ).dialog({ |
|
142 |
autoOpen: false, |
|
143 |
height: 330, |
|
144 |
width: 880, |
|
145 |
resizable: false, |
|
146 |
draggable: false, |
|
147 |
create: function (event, ui) { |
|
148 |
var help_slideshow = $('#help-slideshow').bjqs({ |
|
149 |
responsive:false, |
|
150 |
height: 320, |
|
151 |
width: 870, |
|
152 |
animtype: 'slide', |
|
153 |
showcontrols: true, |
|
154 |
centercontrols: false, |
|
155 |
nexttext: "", |
|
156 |
showmarkers : false, |
|
157 |
automatic: false |
|
158 |
}); |
|
159 |
|
|
160 |
$("#toggle-help").click(function(){ |
|
|
371
c70c34166758
Shrink help icon + Prevent the icon to disappear (with the text "circular view") when renkan is modified
rougeronj
parents:
366
diff
changeset
|
161 |
if (help_dialog.dialog("isOpen")){ |
|
c70c34166758
Shrink help icon + Prevent the icon to disappear (with the text "circular view") when renkan is modified
rougeronj
parents:
366
diff
changeset
|
162 |
help_dialog.dialog("close"); |
|
c70c34166758
Shrink help icon + Prevent the icon to disappear (with the text "circular view") when renkan is modified
rougeronj
parents:
366
diff
changeset
|
163 |
} |
|
c70c34166758
Shrink help icon + Prevent the icon to disappear (with the text "circular view") when renkan is modified
rougeronj
parents:
366
diff
changeset
|
164 |
else{ |
|
c70c34166758
Shrink help icon + Prevent the icon to disappear (with the text "circular view") when renkan is modified
rougeronj
parents:
366
diff
changeset
|
165 |
help_dialog.dialog("open"); |
|
c70c34166758
Shrink help icon + Prevent the icon to disappear (with the text "circular view") when renkan is modified
rougeronj
parents:
366
diff
changeset
|
166 |
} |
| 365 | 167 |
}); |
168 |
$(".img-close").click(function(){ |
|
169 |
help_dialog.dialog("close"); |
|
170 |
}); |
|
171 |
} |
|
172 |
}); |
|
173 |
}); |
|
| 308 | 174 |
|
| 288 | 175 |
</script> |
176 |
{% endblock %} |
|
177 |
||
178 |
{% block main_content %} |
|
|
407
3f64001a8e1f
Split css of help Popup in new file + add dropdown to choose circle or line shape
rougeronj
parents:
385
diff
changeset
|
179 |
<div class="all-title"> |
|
3f64001a8e1f
Split css of help Popup in new file + add dropdown to choose circle or line shape
rougeronj
parents:
385
diff
changeset
|
180 |
<h1><strong>RENKAN</strong></h1> |
|
3f64001a8e1f
Split css of help Popup in new file + add dropdown to choose circle or line shape
rougeronj
parents:
385
diff
changeset
|
181 |
<div class="renkan_help"> |
| 409 | 182 |
<ul> |
|
407
3f64001a8e1f
Split css of help Popup in new file + add dropdown to choose circle or line shape
rougeronj
parents:
385
diff
changeset
|
183 |
<li> |
| 409 | 184 |
{% trans 'Changer de disposition' %} |
185 |
<p> {% trans '(Indisponible si modification du RENKAN)' %}</p> |
|
|
407
3f64001a8e1f
Split css of help Popup in new file + add dropdown to choose circle or line shape
rougeronj
parents:
385
diff
changeset
|
186 |
<ul> |
|
3f64001a8e1f
Split css of help Popup in new file + add dropdown to choose circle or line shape
rougeronj
parents:
385
diff
changeset
|
187 |
{% if 'shape=circle' in switch_shape_url %} |
|
3f64001a8e1f
Split css of help Popup in new file + add dropdown to choose circle or line shape
rougeronj
parents:
385
diff
changeset
|
188 |
<li id="graph-line"><a href="">✓ {% trans 'See the graph in line' %}</a></li> |
| 409 | 189 |
<li id="graph-circle"><a href="{{ switch_shape_url }}"> {% trans 'See the graph in circle' %}</a></li> |
|
407
3f64001a8e1f
Split css of help Popup in new file + add dropdown to choose circle or line shape
rougeronj
parents:
385
diff
changeset
|
190 |
{% else %} |
| 409 | 191 |
<li id="graph-line"><a href="{{ switch_shape_url }}"> {% trans 'See the graph in line' %}</a></li> |
|
407
3f64001a8e1f
Split css of help Popup in new file + add dropdown to choose circle or line shape
rougeronj
parents:
385
diff
changeset
|
192 |
<li id="graph-circle"><a href="">✓ {% trans 'See the graph in circle' %}</a></li> |
|
3f64001a8e1f
Split css of help Popup in new file + add dropdown to choose circle or line shape
rougeronj
parents:
385
diff
changeset
|
193 |
{% endif %} |
|
3f64001a8e1f
Split css of help Popup in new file + add dropdown to choose circle or line shape
rougeronj
parents:
385
diff
changeset
|
194 |
</ul> |
|
3f64001a8e1f
Split css of help Popup in new file + add dropdown to choose circle or line shape
rougeronj
parents:
385
diff
changeset
|
195 |
</li> |
|
3f64001a8e1f
Split css of help Popup in new file + add dropdown to choose circle or line shape
rougeronj
parents:
385
diff
changeset
|
196 |
</ul> |
|
3f64001a8e1f
Split css of help Popup in new file + add dropdown to choose circle or line shape
rougeronj
parents:
385
diff
changeset
|
197 |
<a id="toggle-help" href="#"></a> |
|
3f64001a8e1f
Split css of help Popup in new file + add dropdown to choose circle or line shape
rougeronj
parents:
385
diff
changeset
|
198 |
</div> |
|
3f64001a8e1f
Split css of help Popup in new file + add dropdown to choose circle or line shape
rougeronj
parents:
385
diff
changeset
|
199 |
</div> |
| 308 | 200 |
<div id="dialog-form" title="Identification"> |
201 |
{% include 'ajax_identification/ajax_login.html' %} |
|
202 |
</div> |
|
| 365 | 203 |
|
204 |
<div id="help-container" class=""> |
|
| 337 | 205 |
<div id="help-slideshow"> |
| 365 | 206 |
<a class="img-close" href="#">{% trans 'Fermer<br>ce didacticiel' %}</a> |
207 |
<ul class="bjqs"> |
|
208 |
<li class="slide1"> |
|
209 |
<div class="slideShowTitle">{% trans 'Aide : Bienvenue !' %}</div> |
|
210 |
<div class="column-left"> |
|
|
366
cd359ba0137b
Update block trans for Django translation. Minor corrections in the text
rougeronj
parents:
365
diff
changeset
|
211 |
<p>{% trans 'Cet outil (RENKAN) vous permet de representer, spatialiser et organiser des collections de ressources du portails histoire des arts avec d’autres sites Web.<br><br>Vous pouvez déplacer chaque noeud en cliquant dessus et en déplacant votre curseur.' %}</p> |
| 365 | 212 |
</div> |
213 |
<div class="column-center"> |
|
214 |
<p class="columnTitle">{% trans 'Légende' %}</p> |
|
215 |
<label class="img-requete">{% trans 'Requête' %}</label> |
|
216 |
<label class="img-ressource">{% trans 'Ressource' %}</label> |
|
217 |
<label class="img-tag">{% trans 'Tag' %}</label> |
|
218 |
</div> |
|
219 |
||
220 |
<div class="column-right"> |
|
|
366
cd359ba0137b
Update block trans for Django translation. Minor corrections in the text
rougeronj
parents:
365
diff
changeset
|
221 |
<p>{% trans 'En cliquant sur chaque noeud ou lien vous pouvez les déplacer, éditer, supprimer, agrandir, rétraicir, modifier en utilisant le menu circulaire comme ci dessous.' %}</p> |
| 365 | 222 |
<img src="{% static 'hdalab/img/menu.png' %}" class="img-menu"> |
223 |
</div> |
|
224 |
</li> |
|
225 |
<li class="slide2"> |
|
226 |
<div class="slideShowTitle">{% trans 'Aide : Ajouter, Editer, Organiser, Enregistrer !' %}</div> |
|
227 |
<div class="column-left"> |
|
228 |
<h1 class="columnTitle">{% trans '1. Ajouter' %}</h1> |
|
229 |
<p>{% trans 'Une fois ce didacticiel fermer vous pouvez ajouter des ressources en faisant “drag and drop” a partir de n’importe qu’elle fenetre de navigation web.' %}</p><br> |
|
230 |
<img src="{% static 'hdalab/img/extend.png' %}" class="img-extend" /> |
|
|
366
cd359ba0137b
Update block trans for Django translation. Minor corrections in the text
rougeronj
parents:
365
diff
changeset
|
231 |
<p>{% trans 'En cliquant sur l’icone à gauche vous pouvez ouvrir le panel de recherche pour retrouver des ressources du site HDA ou Wikipédia.' %}</p> |
| 365 | 232 |
</div> |
233 |
<div class="column-center"> |
|
234 |
<h1 class="columnTitle">{% trans '2. Editer et organiser' %}</h1> |
|
|
366
cd359ba0137b
Update block trans for Django translation. Minor corrections in the text
rougeronj
parents:
365
diff
changeset
|
235 |
<p>{% blocktrans %}Le Lorem Ipsum est simplement du faux texte employé dans la composition et la mise en page avant impression.<br><br>Le Lorem Ipsum est le faux texte standard de l'imprimerie depuis les années 1500, quand un peintre anonyme assembla ensemble des morceaux de texte pour réaliser un livre de texte.{% endblocktrans %}</p> |
| 365 | 236 |
</div> |
237 |
<div class="column-right"> |
|
238 |
<h1 class="columnTitle">{% trans '3. Enregistrer' %}</h1> |
|
239 |
<p>{% trans 'En cliquant sur chaque noeud ou lien vous pouvez les déplacer, éditer, supprimer, agrandir, rétraicir, modifier en utilisant le menu circulaire comme ci dessous.' %}</p><br> |
|
240 |
<img src="{% static 'hdalab/img/save.png' %}" class="img-save" /> |
|
|
366
cd359ba0137b
Update block trans for Django translation. Minor corrections in the text
rougeronj
parents:
365
diff
changeset
|
241 |
<p>{% blocktrans %}Ensuite vous pouvez enregistrer en ciquant sur l’icone representant une disquette.{% endblocktrans %}</p> |
| 365 | 242 |
</div> |
243 |
</li> |
|
244 |
</ul> |
|
| 337 | 245 |
</div> |
| 336 | 246 |
</div> |
| 365 | 247 |
|
| 288 | 248 |
<div class="rnk-wrapper"> |
249 |
<div class="rnk-container"> |
|
250 |
<div id="renkan"></div> |
|
251 |
</div> |
|
| 308 | 252 |
</div> |
| 288 | 253 |
{% endblock %} |