ajout champ disciplinaire, modif ordre champs de recherche master
authorCalin Dordia <calin.dordia@auf.org>
Fri, 8 Mar 2013 04:29:24 +0000 (06:29 +0200)
committerCalin Dordia <calin.dordia@auf.org>
Fri, 8 Mar 2013 04:29:24 +0000 (06:29 +0200)
project/people/filters.py
project/scholarships/admin.py
project/scholarships/filters.py
project/scholarships/models.py
project/scholarships/templates/scholarships/scholarship_detail.html
project/scholarships/templates/scholarships/scholarship_filter.html

index c2f6000..0e4b1f4 100644 (file)
@@ -23,4 +23,4 @@ class PersonFilter(FilterSet):
     institution_region = PersonHasRegionFilter(queryset = ref.Region.objects.all(), label = _(u"Région"))
     institution_country = PersonHasCountryFilter(queryset = ref.Pays.objects.all(), label = _(u"Pays de l'établissement"))
     comments = django_filters.CharFilter(lookup_type = "icontains", label = _(u"Commentaire"))
-#    disciplines = AutoCompleteMultipleFilter(channel = "discipline", label = _(u"Disciplines"))
\ No newline at end of file
+#    disciplines = AutoCompleteMultipleFilter(channel = "discipline", label = _(u"Disciplines"))
index 28e305f..b28e98d 100644 (file)
@@ -7,3 +7,4 @@ from project.scholarships.models import Scholarship, ScholarshipReceiver,\
 admin.site.register(Scholarship)
 admin.site.register(ScholarshipReceiver)
 admin.site.register(ScholarshipType)
+
index daa1261..98d0e72 100644 (file)
@@ -15,7 +15,7 @@ class ScholarshipFilter(FilterSet):
                   'sender_office', 'sender_department', 
                   'receiver_office', 'receiver_institution', 'receiver_department', 'receiver_town', 'receiver_country',
                   'supported_duration_count', 'supported_amount',
-                  'title', 'disciplines', 'comments']
+                  'title', 'disciplines', 'champ_disciplinaire', 'comments']
 
     beneficiary = AutoCompleteFilter(channel = "betterscholarship_receiver", label = _(u"Bénéficiaire"))
     year_accepted = RangeFilter(label = _(u"Année d'acceptation"))
index deb6ef5..39aaa88 100644 (file)
@@ -130,7 +130,7 @@ class Scholarship(models.Model):
             null = True, blank = True,
             verbose_name = _(u"Intitulé"))
     disciplines = models.ManyToManyField(ref.Discipline, verbose_name = _(u"Disciplines"))
-    champ_disciplinaire = models.CharField(max_length = 1024,
+    champ_disciplinaire = models.CharField(max_length = 128,
            null = True, blank = True,
            verbose_name = _(u"Champ Disciplinaire"))
     # comment
index 5209ef0..996f056 100644 (file)
@@ -9,6 +9,7 @@
 <ul class = "data-list">
        <li><strong>{% trans 'Bénéficiaire' %}</strong>: <a href = "{% url people:person_details object_id=object.beneficiary.id %}">{{ object.beneficiary }}</a></li>
        <li><strong>{% trans 'Type' %}</strong>: {{ object.scholarship_type }}</li>
+    {% if object.chmap_disciplinaire %}<li><strong>{% trans 'Champ Disciplinaire' %}</strong>: {{ object.chmap_disciplinaire }}</li>{% endif %}
 </ul>
 
 <h2>{% trans 'Information origine' %}</h2>
index 9f9cbfc..ba812ff 100644 (file)
@@ -8,7 +8,7 @@
                jQuery("document").ready(function () {
                        console.log("here");
                        $("#id_year_accepted_0").parent().prepend("de")
-                       var html = jQuery("#id_year_accepted_1").parent().html().replace("-", " a ");
+                       var html = jQuery("#id_year_accepted_1").parent().html().replace("-", " à ");
                        jQuery("#id_year_accepted_1").parent().html(html);
                });
        </script>