from haystack.forms import *
from haystack.query import SearchQuerySet
from datetime import date
-
+from django.utils.translation import ugettext_lazy as _
class HaySearchForm(FacetedSearchForm):
q = forms.CharField(required=False, widget=forms.TextInput(attrs={'class': 'form-control', 'type' : 'text'}))
#begin create field
#to replace de basic search form field
- q = forms.CharField(required=False, label=('title'), widget=forms.TextInput(attrs={'class': 'form-control', 'type': 'search'}))
+ q = forms.CharField(required=False, label=(_('title')), widget=forms.TextInput(attrs={'class': 'form-control', 'type': 'search'}))
location = forms.CharField(required=False, label=('Location'), widget=forms.TextInput(attrs={'class': 'form-control', 'type': 'search'}))
+++ /dev/null
-.overflow{
- max-height:200px;
-}
-
-.module ul, li {
- border-radius: 0px 0px 0px 0px;
-}
-
-.ui-selectmenu-button.ui-widget.ui-state-default{
- background-image:none;
- background-color:#6a0307;
- border-color:#6a0307;
- color:white;
-}
-
-.ui-selectmenu-button.ui-widget.ui-state-hover{
- background-image:none;
- background-color:#6a0307;
- border-color:#6a0307;
- color:white;
-}
-
-.ui-selectmenu-button.ui-widget.ui-state-focus{
- background-image:none;
- background-color:#6a0307;
- border-color:#6a0307;
- color:white;
-}
-
-.ui-selectmenu-button.ui-widget.ui-state-default .ui-icon{
- background-image:url("images/ui-icons_ffffff_256x240.png");
-}
-
-.ui-menu-item{
- background-color:white;
-}
-
-.ui-menu-item.ui-state-focus{
- background-image:none;
- background-color:#6a0307;
- border-color:#6a0307;
- color:white;
-}
--- /dev/null
+.overflow{
+ max-height:200px;
+}
+
+.module ul, li {
+ border-radius: 0px 0px 0px 0px;
+}
+
+.ui-selectmenu-button.ui-widget.ui-state-default{
+ background-image:none;
+ background-color:#6a0307;
+ border-color:#6a0307;
+ color:white;
+}
+
+.ui-selectmenu-button.ui-widget.ui-state-hover{
+ background-image:none;
+ background-color:#6a0307;
+ border-color:#6a0307;
+ color:white;
+}
+
+.ui-selectmenu-button.ui-widget.ui-state-focus{
+ background-image:none;
+ background-color:#6a0307;
+ border-color:#6a0307;
+ color:white;
+}
+
+.ui-selectmenu-button.ui-widget.ui-state-default .ui-icon{
+ background-image:url("images/ui-icons_ffffff_256x240.png");
+}
+
+.ui-menu-item{
+ background-color:white;
+}
+
+.ui-menu-item.ui-state-focus{
+ background-image:none;
+ background-color:#6a0307;
+ border-color:#6a0307;
+ color:white;
+}
+++ /dev/null
-$(function() {
-
- function getPrevUrlParameter(sParam){
- var sPageURL = document.referrer.substring(1);
- var sURLVariables = sPageURL.split('&');
- for (var i = 0; i < sURLVariables.length; i++)
- {
- var sParameterName = sURLVariables[i].split('=');
- if (sParameterName[0] == sParam)
- {
- return sParameterName[1];
- }
- }
- };
-
- function getCurrUrlParameter(sParam){
- var sPageURL = window.location.search.substring(1);
- var sURLVariables = sPageURL.split('&');
- for (var i = 0; i < sURLVariables.length; i++)
- {
- var sParameterName = sURLVariables[i].split('=');
- if (sParameterName[0] == sParam)
- {
- return sParameterName[1];
- }
- }
- };
-
- var prev = getPrevUrlParameter("page");
- var curr = getCurrUrlParameter("page");
- if(prev<curr){
- $(".fullpage").show( "slide", {direction:"right"} );
- }
- else if(!curr){
- $(".fullpage").fadeIn(500);
- }
- else if(!prev){
- $(".fullpage").show( "slide", {direction:"right"} );
- }
- else{
- $(".fullpage").show( "slide", {direction:"left"} );
- };
-
- //alert("prev = "+ prev +" curr = "+ curr);
-
- var nouvellesIcones = {
- header : 'ui-icon-carat-1-e',
- activeHeader : 'ui-icon-carat-1-s',
-
-
- };
-
- $("#accordeon").accordion({
- collapsible : true,
- icons : nouvellesIcones,
- });
- $("#selectAll").click(function(){
- if(this.checked){
- $(".check1").each(function(){
- this.checked=true;
- });
- }
- else{
- $(".check1").each(function(){
- this.checked=false;
- });
- }
- });
- });
{% endblock %}
{% block extra_stylesheets %}
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}telemeta/css/jquery-ui.css" />
+ <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}telemeta/css/search.css" />
{% endblock %}
{% block content %}
{% endblock %}
{% block extra_stylesheets %}
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}telemeta/css/jquery-ui.css" />
+ <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}telemeta/css/search.css" />
{% endblock %}
{% block content %}
<form method="get" action=".">
<div class="col-md-5" id="left-form">
<div class="fieldWrapper">
{{form.q.errors}}
- {% trans form.q.label_tag %}</br>
+ {{ form.q.label_tag }}</br>
{{form.q}}
</div>
+ <div class="fieldWrapper">
+ {{form.collectors.errors}}
+ {{ form.collectors.label_tag }}</br>
+ {{form.collectors}}
+ </div>
<div class="fieldWrapper">
{{form.location.errors}}
{% trans form.location.label_tag %}</br>
{% trans form.instruments.label_tag %}</br>
{{form.instruments}}
</div>
- <div class="fieldWrapper">
- {{form.year_published_from.errors}} {{form.year_published_to.errors}}
- <label> {% trans "Year Published" %} :</label></br>
- {{form.year_published_from}} <span style="font-size:3em" aria-hidden="true">-</span> {{form.year_published_to}}
- </div>
+
<div class="fieldWrapper">
{{form.media_type.errors}}
<label>{% trans "Media Type" %} :</label></br>
</div>
</div>
<div class="col-md-5" id="right-form" style="margin-left:13%">
- <div class="fieldWrapper">
- {{form.collectors.errors}}
- {% trans form.collectors.label_tag %}</br>
- {{form.collectors}}
- </div>
<div class="fieldWrapper">
{{form.recorded_from_date.errors}} {{form.recorded_to_date.errors}}
<label>{% trans "Recording date" %}:</label></br>
{%endifequal%}
</ul>
</div>
+ <div class="fieldWrapper">
+ {{form.year_published_from.errors}} {{form.year_published_to.errors}}
+ <label> {% trans "Year Published" %} :</label></br>
+ {{form.year_published_from}} <span style="font-size:3em" aria-hidden="true">-</span> {{form.year_published_to}}
+ </div>
<div class="fieldWrapper">
{{form.recording_context.errors}}
{% trans form.recording_context.label_tag %}</br>