diff options
Diffstat (limited to 'chimere/templates/chimere')
| -rw-r--r-- | chimere/templates/chimere/base.html | 1 | ||||
| -rw-r--r-- | chimere/templates/chimere/blocks/actions.html | 4 | ||||
| -rw-r--r-- | chimere/templates/chimere/blocks/alternate_multimedia.html | 151 | ||||
| -rw-r--r-- | chimere/templates/chimere/blocks/categories.html | 56 | ||||
| -rw-r--r-- | chimere/templates/chimere/blocks/head_chimere.html | 2 | ||||
| -rw-r--r-- | chimere/templates/chimere/blocks/head_form.html | 2 | ||||
| -rw-r--r-- | chimere/templates/chimere/blocks/map.html | 39 | ||||
| -rw-r--r-- | chimere/templates/chimere/blocks/map_menu.html | 14 | ||||
| -rw-r--r-- | chimere/templates/chimere/blocks/multimedia_file.html | 2 | ||||
| -rw-r--r-- | chimere/templates/chimere/blocks/news.html | 53 | ||||
| -rw-r--r-- | chimere/templates/chimere/blocks/routing.html | 45 | ||||
| -rw-r--r-- | chimere/templates/chimere/blocks/share_bar.html | 39 | ||||
| -rw-r--r-- | chimere/templates/chimere/default_extra_page.html | 15 | ||||
| -rw-r--r-- | chimere/templates/chimere/detail.html | 14 | ||||
| -rw-r--r-- | chimere/templates/chimere/edit.html | 3 | ||||
| -rw-r--r-- | chimere/templates/chimere/main_map.html | 14 |
16 files changed, 406 insertions, 48 deletions
diff --git a/chimere/templates/chimere/base.html b/chimere/templates/chimere/base.html index 709ff9c..e4d514a 100644 --- a/chimere/templates/chimere/base.html +++ b/chimere/templates/chimere/base.html @@ -2,6 +2,7 @@ {% load chimere_tags i18n %} {% block extra_head %} <link rel="stylesheet" href="{{ STATIC_URL }}chimere/css/styles.css" /> +<link rel="stylesheet" href="{{ STATIC_URL }}chimere/css/print.css" media='print'/> {% if css_area %} <link rel="stylesheet" href="{{ css_area }}" />{% endif %} {% endblock %} diff --git a/chimere/templates/chimere/blocks/actions.html b/chimere/templates/chimere/blocks/actions.html index 2806321..93debb0 100644 --- a/chimere/templates/chimere/blocks/actions.html +++ b/chimere/templates/chimere/blocks/actions.html @@ -2,7 +2,7 @@ <ul id='action' class='action'> {% for action, subactions in actions %} <li class='ui-widget ui-button ui-state-default ui-corner-all {% ifequal action.id action_selected.0 %} ui-state-active{% endifequal %}'> - <a href='{{extra_url}}{{ action.path }}' onclick='jQuery("#map").chimere("saveExtent");'>{{ action.label }}</a> + <a href='{{ action.url }}' onclick='jQuery("#map").chimere("saveExtent");'>{{ action.label }}</a> </li> {% endfor %} </ul> @@ -11,7 +11,7 @@ {% ifequal action.id action_selected.0 %}{% if subactions %} {% for subaction in subactions %} <li class='ui-widget ui-button ui-state-default ui-corner-all{% ifequal subaction.id action_selected.1 %} ui-state-active{% endifequal %}'> - <a href='{{extra_url}}{{ subaction.path }}' onclick='saveExtent();'>{{ subaction.label }}</a> + <a href='{{ subaction.url }}' onclick='saveExtent();'>{{ subaction.label }}</a> </li> {% endfor %} {% endif %}{% endifequal %} diff --git a/chimere/templates/chimere/blocks/alternate_multimedia.html b/chimere/templates/chimere/blocks/alternate_multimedia.html new file mode 100644 index 0000000..ccee804 --- /dev/null +++ b/chimere/templates/chimere/blocks/alternate_multimedia.html @@ -0,0 +1,151 @@ +{% load i18n %} + <div id='multimedia_list'> + {% for formset in formsets %} + {{ formset.management_form }} + {% if formset.errors %}<div class='errors'> + {% for dict in formset.errors %} + {% for error in dict.values %} + {{ error }} + {% endfor %} + {% endfor %} + </div>{% endif %} + {% endfor %} + <ul id='multimedia_list_content'> + {% for formset in formsets %} + {% for frm in formset%} + {% if not forloop.last %} + <li class='{% if forloop.parentloop.counter0 %}picture{%else%}multimedia{%endif%}'> + {%if forloop.first %}{% for hidden in frm.hidden_fields %} + {{ hidden }} + {% endfor %}{% endif %} + {% for field in frm.visible_fields %} + {% if field.name == "name" %} + <span class='value'>{{ field.value }}</span> + <img class='remove-media' src='{{STATIC_URL}}chimere/img/close.png'/> + {% endif %} + <span class='hidden'>{{field}}</span> + {% endfor %} + </li> + {% endif %} + {% endfor %} + {% endfor %} + </ul> + <button id='add_multimedia_list'>{% trans "Add" %}</button> + </div> + <div id='multimedia_form' title="{% trans "Add multimedia from your computer or a website"%}"> + <div class='notice'>{% trans "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc eu luctus ipsum. Donec vel urna a turpis consectetur consectetur. Vestibulum ut enim vel odio porta vulputate." %} + </div> + <div class="fieldWrapper"> + <label for="multimedia_name">{% trans "Name" %}</label> + <input type='text' id='multimedia_name' name='multimedia_name'> + </div> + <div class="fieldWrapper"> + <input type='radio' value='image' id='media_type_image' name="multimedia_type"> {% trans "Image" %} + <input type='radio' value='other' id='media_type_other' name="multimedia_type"> {% trans "Audio, video, other..." %} + </div> + <div class="fieldWrapper"> + <label id="multimedia_file_label">{% trans "Download"%}</label> <input type='file' name='picture-0-picture' id='picture-0-picture' class='multimedia_file'> + <p class='notice'>{% trans "Or" %}</p> + <label for='multimedia_url'>{% trans "Web address"%}</label> <input type='text' name='multimedia_url' id='multimedia_url'> + </div> + <button id='add_media'>{% trans "Add" %}</button> + </div> + <script text='text/javascript'> + $(function(){ + $(".remove-media").click(function(){ + $(this).parents('li').remove(); + }); + var current_image_number = 0; + var current_multi_number = 0; + $("#multimedia_form").dialog({autoOpen:false, + modal:true, + resizable:false, + width:400, + height:250}); + $('#add_multimedia_list').click(function(){ + $("#multimedia_form").dialog("open"); + return false; + }); + $('#media_type_image').click(function(){ + $("#multimedia_file_label").removeClass('disabled'); + $("#multimedia_file").removeAttr('disabled'); + }); + $('#media_type_other').click(function(){ + $("#multimedia_file_label").addClass('disabled'); + $("#multimedia_file").attr('disabled', 'disabled'); + }); + $('#add_media').click(function(){ + // test the validity + if (!$('#multimedia_name').val()){ + alert("{% trans "You must provide a name." %}") + return false; + } + if (!$('#media_type_image:checked').val() && + !$('#media_type_other:checked').val()){ + alert("{% trans "You must choose a media type." %}") + return false; + } + if ($('#media_type_image:checked').val() + && !$("#picture-"+current_image_number+"-picture").val() + && !$("#multimedia_url").val()){ + alert("{% trans "You must provide a file or a web address." %}") + return false; + } + if ($('#media_type_other:checked').val() + && !$("#multimedia_url").val()){ + alert("{% trans "You must provide a web address." %}") + return false; + } + // recopy field in the main form + var prefix = ''; + var contener = $("#multimedia_list_content") + content = '<li'; + if ($('#media_type_image:checked').val()){ + content += ' class="picture">'; + prefix = 'picture-' + current_image_number; + } else { + content += ' class="multimedia">'; + prefix = 'multimedia-' + current_multi_number; + content += '<input type="hidden" name="'+prefix+'-multimedia_type" value="{{auto_type_id}}" />\n'; + content += '<input type="hidden" name="'+prefix+'-url" value="'+$("#multimedia_url").val()+'" />\n'; + } + content += '<input type="hidden" name="'+prefix+'-id"/>\n'; + content += '<input type="hidden" name="'+prefix+'-miniature" value="1"/>\n'; + content += '<input type="hidden" name="'+prefix+'-DELETE" value=""/>\n'; + content += '<input type="hidden" name="'+prefix+'-name" value="'+ $("#multimedia_name").val() +'"/>\n'; + content += $("#multimedia_name").val(); + content += " <img class='remove-media' src='{{STATIC_URL}}chimere/img/close.png'/>"; + content += '</li>'; + contener.append(content); + if ($('#media_type_image:checked').val() + && $("#picture-"+current_image_number+"-picture").val()){ + // the file field cannot be recopied - security issue + // so it is moved + var file_item = $('#picture-'+current_image_number+'-picture'); + var cloned = file_item.clone(true); + file_item.hide(); + cloned.insertAfter(file_item); + file_item.appendTo($("#multimedia_list_content li").last()); + current_image_number += 1; + cloned.attr('id', 'picture-'+current_image_number+'-picture'); + cloned.attr('name', 'picture-'+current_image_number+'-picture'); + cloned.val(''); + $('#id_picture-TOTAL_FORMS').val(current_image_number + 1); + } else { + current_multi_number += 1; + $('#id_multimedia-TOTAL_FORMS').val(current_multi_number + 1); + } + // empty the fields + $("#multimedia_name").val(''); + $("#multimedia_url").val(''); + $("#media_type_image").prop('checked', ''); + $("#media_type_other").prop('checked', ''); + $("#multimedia_form").dialog("close"); + $(".remove-media").click(function(){ + $(this).parents('li').remove(); + }); + return false; + }); + }); + </script> + diff --git a/chimere/templates/chimere/blocks/categories.html b/chimere/templates/chimere/blocks/categories.html index 5ba89fc..9c5ffd6 100644 --- a/chimere/templates/chimere/blocks/categories.html +++ b/chimere/templates/chimere/blocks/categories.html @@ -1,29 +1,29 @@ {% load i18n %} -<ul id='ul_categories'> - {% for category, lst_sub_categories in sub_categories %} - <li> - <img class="control_image toggle_category" id="maincategory_img_{{category.id}}" alt="control" src="{{ STATIC_URL }}chimere/img/{% if category.selected %}minus.png{% else %}plus.png{% endif %}" /> - <input type="checkbox" id='checkall_{{category.id}}'> - {% trans category.name %} - <img id="zoom_to_category_{{category.id}}" class="zoom_image zoom_to_category" alt='{% trans "Zoom to" %} {{category.name}}' src='{{ STATIC_URL }}chimere/img/zoom.png' /> - <ul class='subcategories' id='maincategory_{{category.id}}'{% if not category.selected %} style='display:None'{% endif %}> - {% for sub_category in lst_sub_categories %} - <li id='li_sub_{{sub_category.id}}'> - <input type='checkbox' name='category_{{sub_category.id}}' id='category_{{sub_category.id}}'{% if sub_category.selected %} checked='checked'{% endif %}/> - <label for='category_{{sub_category.id}}'> - <img alt='{{ sub_category.name }}' src='{{ MEDIA_URL }}{{sub_category.icon.image}}'/> - {% trans sub_category.name %} - </label> - <img id="zoom_to_subcategory_{{sub_category.id}}" class="zoom_image zoom_to_subcategory" alt='{% trans "Zoom to" %} {{sub_category.name}}' src='{{ STATIC_URL }}chimere/img/zoom.png' /> - </li> - {% endfor %} - {% if category.description %} - <li><a href="#" onclick="$('#map').chimere('category_detail', {{category.id}});">{% trans "Tell me more..." %}</a></li> - {% endif %} - </ul> - </li> - {% endfor %} - <li id='display_submited'> - <input type='checkbox' name='display_submited' id='display_submited_check'/> {% trans "Display markers and routes waiting for validation"%} - </li> -</ul> + <ul id='ul_categories'> + {% for category, lst_sub_categories in sub_categories %} + <li> + <img class="control_image toggle_category" id="maincategory_img_{{category.id}}" alt="control" src="{{ STATIC_URL }}chimere/img/{% if category.selected %}minus.png{% else %}plus.png{% endif %}" /> + <input type="checkbox" id='checkall_{{category.id}}'> + {% trans category.name %} + <img id="zoom_to_category_{{category.id}}" class="zoom_image zoom_to_category" alt='{% trans "Zoom to" %} {{category.name}}' src='{{ STATIC_URL }}chimere/img/zoom.png' /> + <ul class='subcategories' id='maincategory_{{category.id}}'{% if not category.selected %} style='display:None'{% endif %}> + {% for sub_category in lst_sub_categories %} + <li id='li_sub_{{sub_category.id}}'> + <input type='checkbox' name='category_{{sub_category.id}}' id='category_{{sub_category.id}}'{% if sub_category.selected %} checked='checked'{% endif %}/> + <label for='category_{{sub_category.id}}'> + <img alt='{{ sub_category.name }}' src='{{ MEDIA_URL }}{{sub_category.icon.image}}'/> + {% trans sub_category.name %} + </label> + <img id="zoom_to_subcategory_{{sub_category.id}}" class="zoom_image zoom_to_subcategory" alt='{% trans "Zoom to" %} {{sub_category.name}}' src='{{ STATIC_URL }}chimere/img/zoom.png' /> + </li> + {% endfor %} + {% if category.description %} + <li><a href="#" onclick="$('#map').chimere('category_detail', {{category.id}});">{% trans "Tell me more..." %}</a></li> + {% endif %} + </ul> + </li> + {% endfor %} + <li id='display_submited'> + <input type='checkbox' name='display_submited' id='display_submited_check'/> {% trans "Display markers and routes waiting for validation"%} + </li> + </ul> diff --git a/chimere/templates/chimere/blocks/head_chimere.html b/chimere/templates/chimere/blocks/head_chimere.html index 4031ac4..29a1be4 100644 --- a/chimere/templates/chimere/blocks/head_chimere.html +++ b/chimere/templates/chimere/blocks/head_chimere.html @@ -2,6 +2,7 @@ <link rel="stylesheet" href="{{ css_url }}" />{% endfor %} {% for js_url in OSM_JS_URLS %} <script src="{{ js_url }}"></script>{% endfor %} +{% if routing %}<script src="{{ STATIC_URL }}chimere/js/routing-widget.js"></script>{% endif %} <script src="{{ STATIC_URL }}chimere/js/jquery.chimere.js"></script> <script type="text/javascript"> /* Global variables */ @@ -23,6 +24,7 @@ var area_name = '{{ area_name }}';{% endif %} $(function() {$( ".draggable" ).draggable({handle:"h2"});}); + var get_share_url = '{% url chimere:get-share-url %}'; </script> <style> .olControlPanPanel div { diff --git a/chimere/templates/chimere/blocks/head_form.html b/chimere/templates/chimere/blocks/head_form.html new file mode 100644 index 0000000..2485c1a --- /dev/null +++ b/chimere/templates/chimere/blocks/head_form.html @@ -0,0 +1,2 @@ + +<script src="{{ TINYMCE_URL }}tiny_mce.js"></script> diff --git a/chimere/templates/chimere/blocks/map.html b/chimere/templates/chimere/blocks/map.html index 886c50b..ff77593 100644 --- a/chimere/templates/chimere/blocks/map.html +++ b/chimere/templates/chimere/blocks/map.html @@ -9,6 +9,12 @@ <p>{% trans "Loading of the map in progress" %}</p> </div> </div> +<div id="layer_selection"> + <h4>{% trans "Display options" %}</h4> + <ul id='layer_list'> + <li class='head layer_map_type'>{% trans "Map type"%}</li> + </ul> +</div> <script type="text/javascript"> {% if single_category %} $(function() {$('#panel').hide()});{% endif %} @@ -17,6 +23,7 @@ chimere_init_options["map_layers"] = [{{map_layers|safe|escape}}]; chimere_init_options['permalink_label'] = '{%trans "Permalink"%}'; chimere_init_options['permalink_element'] = document.getElementById('permalink'); + chimere_init_options['routing'] = {{routing}}; {% if dynamic_categories %}chimere_init_options['dynamic_categories'] = true;{% endif %} {% if default_area %} chimere_init_options["default_area"] = new Array({{default_area.upper_left_corner.x}}, {{default_area.upper_left_corner.y}}, {{default_area.lower_right_corner.x}}, {{default_area.lower_right_corner.y}}); @@ -24,11 +31,16 @@ {% if p_zoom %}chimere_init_options["zoom"] = {{ p_zoom }};{% endif %} {% if p_lat %}chimere_init_options["lat"] = {{ p_lat }};{% endif %} {% if p_lon %}chimere_init_options["lon"] = {{ p_lon }};{% endif %} + {% if p_routing_start_lon %}chimere_init_options["routing_start_lon"] = {{ p_routing_start_lon }};{% endif %} + {% if p_routing_start_lat %}chimere_init_options["routing_start_lat"] = {{ p_routing_start_lat }};{% endif %} + {% if p_routing_end_lon %}chimere_init_options["routing_end_lon"] = {{ p_routing_end_lon }};{% endif %} + {% if p_routing_end_lat %}chimere_init_options["routing_end_lat"] = {{ p_routing_end_lat }};{% endif %} + {% if p_routing_steps %}chimere_init_options["routing_steps_lonlat"] = [{{ p_routing_steps }}];{% endif %} chimere_init_options["icon_offset"] = new OpenLayers.Pixel({{icon_offset_x}}, {{icon_offset_y}}); chimere_init_options["dynamic_categories"] = {{ dynamic_categories }}; {% if p_display_submited %}chimere_init_options["display_submited"] = {{ p_display_submited }};{% endif %} - chimere_init_options["checked_categories"] = {{ p_checked_categories }}; + chimere_init_options["checked_categories"] = [{% for cc in checked_categories %}{% if forloop.counter0 > 0 %}, {% endif %}{{cc}}{% endfor %}]; {% if area_id %}chimere_init_options['area_id'] = "{{area_id}}";{% endif %} {% if p_current_feature %} chimere_init_options["display_feature"] = {{ p_current_feature }}; @@ -43,5 +55,28 @@ {% if zoom %} $('#maps').chimere('zoom', {'area':{{zoom}} }); {% endif %} -</script> + // init layer selection + $(function() { + {% for layer_name, js, def in map_layers %} + $('#layer_list').append("<li><input type='radio' value='{{forloop.counter0}}' name='layer_type' id='layer_{{forloop.counter}}'{% if def %} checked='checked'{% endif %}><label for='layer_{{forloop.counter}}'>{{layer_name}}</li>");{% endfor %} + {% for subcat in subcat_layer %} + {% if not subcat.category %} + $('#layer_list').append("<li class='head layer_category'>{{subcat.name}}</li>");{% else %} + $('#layer_list').append("<li><input type='checkbox' name='layer_cat' value='category_{{subcat.pk}}' id='layer_cat_{{subcat.pk}}'{% if subcat.pk in checked_categories %} checked='checked'{% endif %}><label for='layer_cat_{{subcat.pk}}'>{{subcat.name}}</li>");{%endif%}{% endfor %} + $('#layer_selection h4').click(function(){ + $('#layer_list').toggle(); + }); + $('#layer_list input[name=layer_type]').change(function(){ + $('#{{map_id}}').chimere('changeMapLayer', $(this).val()); + }); + $('#layer_list input[name=layer_cat]').change(function(){ + // the prop has to be called twice not to mess up with the triggered + // click + $('#'+$(this).val()).prop("checked", this.checked); + $('#'+$(this).val()).trigger('click'); + $('#'+$(this).val()).prop("checked", this.checked); + }); + }); +</script> +<div id='marker_hover'><div id='marker_hover_content'></div></div> diff --git a/chimere/templates/chimere/blocks/map_menu.html b/chimere/templates/chimere/blocks/map_menu.html new file mode 100644 index 0000000..38fb4a8 --- /dev/null +++ b/chimere/templates/chimere/blocks/map_menu.html @@ -0,0 +1,14 @@ +{% load i18n %} +<div id='chimere_map_menu'> + <ul> + {% if routing %} + <li id='map_menu_from' class='routing_item'>{% trans "From" context "routing" %}</li> + <li id='map_menu_step' class='routing_item'>{% trans "Add a step" context "routing" %}</li> + <li id='map_menu_to' class='routing_item'>{% trans "To" context "routing" %}</li> + <li id='map_menu_clear' class='routing_item'>{% trans "Clear the itinerary" context "routing" %}</li> + {% endif%} + <li id='map_menu_zoomin'>{% trans "Zoom in" %}</li> + <li id='map_menu_zoomout'>{% trans "Zoom out" %}</li> + <li id='map_menu_center'>{% trans "Center the map here" %}</li> + </ul> +</div> diff --git a/chimere/templates/chimere/blocks/multimedia_file.html b/chimere/templates/chimere/blocks/multimedia_file.html index a1e9868..d659348 100644 --- a/chimere/templates/chimere/blocks/multimedia_file.html +++ b/chimere/templates/chimere/blocks/multimedia_file.html @@ -1,6 +1,6 @@ {% load i18n %} {% if multimedia_item.picture %} -<a rel="prettyPhoto" href='{{multimedia_item.picture.url}}' ><img alt="{{multimedia_item.name}}" src='{{multimedia_item.thumbnailfile.url}}'/></a>{% endif %} +<a rel="prettyPhoto" href='{{multimedia_item.picture.url}}' ><img class='thumbnail' alt="{{multimedia_item.name}}" src='{{multimedia_item.thumbnailfile.url}}'/></a>{% endif %} {% if multimedia_item.url %} {% if multimedia_item.multimedia_type.iframe %} diff --git a/chimere/templates/chimere/blocks/news.html b/chimere/templates/chimere/blocks/news.html new file mode 100644 index 0000000..fa581f7 --- /dev/null +++ b/chimere/templates/chimere/blocks/news.html @@ -0,0 +1,53 @@ +{% load i18n sanitize chimere_tags %} +{% if news_lst %} +<a href='#' id='news_button' class='ui-widget ui-button ui-state-default ui-corner-all'>{% trans "News"%}</a> +<script type='text/javascript'> +function display_news(){$("#welcome").dialog({title:"{% trans "News"%}", + width:360});} +$("#news_button").bind('click', display_welcome); +$(function(){ + $('#news div.media-player').jmeEmbedControls(); + $('#news video').each(function(index){$(this).pause()}); + $('#news audio').each(function(index){$(this).pause()}); + {% if display %}display_news();{%endif%} +}); +</script> +<div id='news' style='display:none'> + <div id='detail_content'> + <div class='news'> + {% if news_lst %} + {% for news in news_lst %} + <div class='info'> + {% if news.title %} + <h3>{{news.title}} – {{ news.date }}</h3> + <p>{{news.content|safe}}</p> + {% else %} + <h3>{{news.name}} – {{ news.start_date }}{% if news.end_date %} - {{ news.end_date }}{% endif %}</h3> + {% if news.default_pictures or news.default_pictures or news.default_multimedia_items%} + <div class='small-gallery'> + {% for picture in news.default_pictures %} + {% multimedia_render picture %} + {%endfor%} + {% for multimedia_item in news.default_multimedia_items %} + {% multimedia_render multimedia_item %} + {%endfor%} + </div> + {%endif%} + {% if news.description %} + <p class='description'>{{news.description|sanitize:"p b i br hr strong em span:style a:href:target ul li ol h1 h2 h3 h4 table td th tr"|safe}}</p> + {% endif %} + {% for property in news.getProperties %} + <p class='{{news.propertymodel.getNamedId}}'>{{ property.value|sanitize:"p b i br hr strong em span:style a:href:target ul li ol h1 h2 h3 h4 table td th tr"|safe }}</p> + {% endfor %} + <p class='marker_link'><a href='{% get_tinyfied_url news area_name %}'>{% trans "See it on the map"%}</a></p> + {% endif %} + </div> + {%endfor%} + {% endif %} + <div class='info'> + </div> + </div> + </div> +</div> +{% endif %} + diff --git a/chimere/templates/chimere/blocks/routing.html b/chimere/templates/chimere/blocks/routing.html new file mode 100644 index 0000000..15aee04 --- /dev/null +++ b/chimere/templates/chimere/blocks/routing.html @@ -0,0 +1,45 @@ +{% load i18n %} +{# Don't forget to include routing-widget.js in your main template #} +{% if routing %} +{{itinerary_form.media}} +<a href='#' id='routing_button' class='ui-widget ui-button ui-state-default ui-corner-all'>{% trans "Itinerary"%}</a> +<div id='chimere_itinerary_panel'> + <div id='chimere_itinerary_form'> + {% for hidden in itinerary_form.hidden_fields %} + {{ hidden }} + {% endfor %} + {% for field in itinerary_form.visible_fields %} + <div id='{{field.auto_id}}_div'> + {% if field.label %}<label for='{{field.auto_id}}'>{{ field.label }}</label>{%endif%} + {{field}}</div> + {% endfor %} + <a id='add_step_link' href='#'>{% trans "Add a step" %}</a> + <span id='search_routing'>{% trans "Search" %}</span> + </div> + <div id='chimere_itinerary'> + <div id='chimere_itinerary_action'> + <ul class='action'> + <li class='ui-widget ui-button ui-state-default ui-corner-all'> + <a href='#' id='chimere_itinerary_modify'>{% trans "Modify" %}</a> + </li> + <li class='ui-widget ui-button ui-state-default ui-corner-all'> + <a href='#' id='chimere_itinerary_new'>{% trans "New search" %}</a> + </li> + </ul> + </div> + <div class='itinerary_label' id='total_label_div'> + <span id='chimere_total_label'></span> + </div> + <div class='itinerary_label'> + <span class='label'>{% trans "Start:"%}</span> <span id='chimere_start_label'></span></div> + <div id='chimere_itinerary_content'> + </div> + <div class='itinerary_label'> + <span class='label'>{% trans "Finish:"%}</span> <span id='chimere_end_label'></span> + </div> + </div> +</div> +<script language='javascript' type='text/javascript'> +step_label = "{% trans "Step" %}"; +</script> +{% endif%} diff --git a/chimere/templates/chimere/blocks/share_bar.html b/chimere/templates/chimere/blocks/share_bar.html new file mode 100644 index 0000000..e421a0f --- /dev/null +++ b/chimere/templates/chimere/blocks/share_bar.html @@ -0,0 +1,39 @@ +{% load i18n %} + {% if share_networks %} + {% if simple %}{% trans "Share on"%}{% for share_network in share_networks %} + <a href='{{share_network.1}}'>{{share_network.0}}</a> + {% endfor %}{%else%} + <ul class='share'> + <li>{% trans "Share"%}</li>{% for share_network in share_networks %} + <li><a class='share_link share_id_{{share_network.0}}' href='{{share_network.1}}'><img src="{{share_network.2}}" alt="{{share_network.0}}"/></a></li> + {% endfor %}</ul>{% endif %} + <script language='text/javascript'> + $(function(){ + $('.share_link').click(function(){ + var href = $(this).attr('href'); + var url = '{% url chimere:get-share-url %}'; + var classes = $(this).attr('class').split(' '); + prefix = 'share_id_'; + var share_id; + for (idx=0;idx<classes.length;idx++){ + if(classes[idx].substring(0, prefix.length) == prefix){ + var share_id = classes[idx].substring(prefix.length); + } + } + var params = $('#permalink a').attr('href').split('/'); + url += share_id + params[params.length-1]; + $.ajax({url: url, + dataType: "html", + success: function (url) { + window.open(url); + return false; + }, + error: function(){ + return false; + } + }); + return false; + }); + }); + </script> + {% endif %} diff --git a/chimere/templates/chimere/default_extra_page.html b/chimere/templates/chimere/default_extra_page.html new file mode 100644 index 0000000..884d4cc --- /dev/null +++ b/chimere/templates/chimere/default_extra_page.html @@ -0,0 +1,15 @@ +{% extends "chimere/base.html" %} +{% load i18n chimere_tags %} +{% block extra_head %} + {{ block.super }} + {{ form.media }} + {% head_jquery %} +{% endblock %} +{% block message_map %}{% endblock %} +{% block message_edit%}{% endblock %} +{% block content %} + {{ block.super }} + <h3>{{title}}</h3> + {{content|safe}} +{% endblock %} + diff --git a/chimere/templates/chimere/detail.html b/chimere/templates/chimere/detail.html index c195fbe..858a7ae 100644 --- a/chimere/templates/chimere/detail.html +++ b/chimere/templates/chimere/detail.html @@ -28,23 +28,11 @@ <a href='#' id='show_gallery_link'>{% trans "Show multimedia gallery" %}</a> {% endif %} </div> - {% comment %} - <a href='{% if marker.route %}{% url chimere:editroute-item area_name_slash|default_if_none:"" marker.route.pk "" %}{%else%}{% url chimere:edit-item area_name_slash|default_if_none:"" marker.pk "" %}{%endif%}'> - {% trans "Submit a modification" %} - </a> - {% endcomment %} {% if moderator_emails %} <a href="mailto:?from={{moderator_emails}}&subject={% trans "Propose amendment" %}&body={% trans "I would like to propose an amendment for this item:"%} {{share_url}}"> {% trans "Propose amendment" %} </a>{%endif%} - {% if share_networks %} - {% if simple %}{% trans "Share on"%}{% for share_network in share_networks %} - <a href='{{share_network.1}}'>{{share_network.0}}</a> - {% endfor %}{%else%} - <ul id='share'> - <li>{% trans "Share"%}</li>{% for share_network in share_networks %} - <li><a href='{{share_network.1}}'><img src="{{share_network.2}}" alt="{{share_network.0}}"/></a></li> - {% endfor %}</ul>{% endif %} + {% share_bar marker.name %} {% endif %} </div> {% if marker.multimedia_items %} diff --git a/chimere/templates/chimere/edit.html b/chimere/templates/chimere/edit.html index 66862cd..867437e 100644 --- a/chimere/templates/chimere/edit.html +++ b/chimere/templates/chimere/edit.html @@ -139,7 +139,8 @@ modal: true, resizable:false, height:110, - autoOpen:false + autoOpen:false, + dialogClass:'alert-box' } ); $(".ui-dialog-titlebar").hide(); diff --git a/chimere/templates/chimere/main_map.html b/chimere/templates/chimere/main_map.html index b87c31e..70e8850 100644 --- a/chimere/templates/chimere/main_map.html +++ b/chimere/templates/chimere/main_map.html @@ -18,18 +18,30 @@ </form> </div> + <div id='category_description'> + </div> + <script type='text/javascript'> + $(function(){$('#category_description').dialog({'autoOpen':false});}); + </script> + <div id='utils-div' class='ui-widget ui-state-default ui-corner-all'> {% if areas_visible %} {% display_areas %} {% endif %} + {% routing %} + {% display_welcome %} {% display_news news_visible %} <div id='permalink' class='ui-widget ui-button ui-state-default ui-corner-all'></div> </div> <div id='detail' class='ui-widget ui-corner-all'></div> - <div id='category_detail'></div> {% endblock %} {% block content %} {{block.super}} + <div id='main-map'></div> +<script type="text/javascript"> + $("#main-map").show(); +</script> + {% map_menu %} {% map 'main-map' %} {% endblock %} {% block footer %} |
