]> git.parisson.com Git - mezzo.git/commitdiff
update Project form
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Fri, 10 Mar 2017 17:08:40 +0000 (18:08 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Fri, 10 Mar 2017 17:08:40 +0000 (18:08 +0100)
app/organization/projects/forms.py
app/organization/projects/migrations/0049_auto_20170310_1658.py [new file with mode: 0644]
app/organization/projects/models.py
app/themes/base/static/src/sass/global/_typography.scss
app/themes/vertigo_starts_eu/templates/projects/project_call_detail.html
app/themes/vertigo_starts_eu/templates/projects/project_ict_create.html
app/themes/vertigo_starts_eu/templates/vertigo_starts_eu/pages/menus/header.html
app/themes/vertigo_starts_eu/templates/vertigo_starts_eu/pages/page.html
lib/mezzanine-agenda
var

index 8467ab14b76d0d781053dbfa1bf9e26f066e94ef..c878e37a206cd7eb6bbe920a8916934157dddd73 100644 (file)
@@ -60,33 +60,31 @@ class ProjectForm(ModelForm):
         fields = ('title', 'description', 'keywords', 'website')
 
 
-class ProjectICTForm(ModelForm):
-
-    class Meta:
-        model = Project
-        exclude = ('external_id', '_meta_title')
-
-
 class ProjectICTDataInline(InlineFormSet):
 
     max_num = 1
     model = ProjectICTData
-    exclude = ('validation_status', )
-
+    prefix = 'ICT data'
+    can_delete = False
+    fields = '__all__'
 
 class ProjectSimpleImageInline(InlineFormSet):
 
-    max_num = 3
+    max_num = 4
     model = ProjectSimpleImage
-    fields = ('file', 'credits')
+    prefix = 'Images'
+    can_delete = False
+    fields = ['file', 'credits']
 
 
 class ProjectContactInline(InlineFormSet):
 
     max_num = 1
     model = ProjectContact
-    fields = ('gender', 'person_title', 'first_name', 'last_name', 'address', 'email', 'telephone', 'bio', 'address', 'postal_code', 'city', 'country')
-
+    prefix = 'Contact'
+    can_delete = False
+    fields = ['gender', 'person_title', 'first_name', 'last_name', 'address', 'email',
+                 'telephone', 'address', 'postal_code', 'city', 'country']
 
 class ProducerForm(ModelForm):
 
diff --git a/app/organization/projects/migrations/0049_auto_20170310_1658.py b/app/organization/projects/migrations/0049_auto_20170310_1658.py
new file mode 100644 (file)
index 0000000..2c129e4
--- /dev/null
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.11 on 2017-03-10 15:58
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('organization-projects', '0048_auto_20170307_1540'),
+    ]
+
+    operations = [
+        migrations.RemoveField(
+            model_name='projectictdata',
+            name='validation_status',
+        ),
+        migrations.AddField(
+            model_name='project',
+            name='validation_status',
+            field=models.IntegerField(choices=[(0, 'rejected'), (1, 'pending'), (2, 'in process'), (3, 'accepted')], default=1, verbose_name='validation status'),
+        ),
+    ]
index d113b487e7f1341a690333ce24f74c9e4ceded06..75a2c5205f26ffc15c31b13c93fdf93b2f5b1c31 100644 (file)
@@ -47,10 +47,10 @@ REPOSITORY_ACCESS_CHOICES = [
 ]
 
 PROJECT_STATUS_CHOICES = (
-    (0, _('pending')),
-    (1, _('accepted')),
-    (2, _('rejected')),
-    (3, _('in process'))
+    (0, _('rejected')),
+    (1, _('pending')),
+    (2, _('in process')),
+    (3, _('accepted')),
 )
 
 
@@ -70,6 +70,7 @@ class Project(Displayable, Period, RichText):
     topic = models.ForeignKey('ProjectTopic', verbose_name=_('topic'), related_name='projects', blank=True, null=True)
     referring_person = models.ManyToManyField('organization-network.Person', verbose_name=_('Referring Person'), related_name='projects_referring_person', blank=True)
     manager =  models.ManyToManyField('organization-network.Person', verbose_name=_('Manager'), related_name='projects_manager', blank=True)
+    validation_status = models.IntegerField(_('validation status'), choices=PROJECT_STATUS_CHOICES, default=1)
 
     class Meta:
         verbose_name = _('project')
@@ -345,7 +346,6 @@ class ProjectICTData(models.Model):
 
     # Private
     letter = models.TextField(_('letter of commitment'))
-    validation_status = models.IntegerField(_('validation status'), choices=PROJECT_STATUS_CHOICES)
 
     class Meta:
         verbose_name = 'Project ICT data'
index b4d0c4845df137bfb78d5ed04ccffad881d7ba94..9b0a83c3f625ef1c0d8f244bb1104b1876000a86 100755 (executable)
@@ -181,7 +181,7 @@ hr {
 
        border: 0;
 
-       height: 11px;
+       height: 1px;
        background-color: $color-main;
        @include margin(5 0 2 0);
 
index 459baf0843f0571610d675cb503a90c33cc9fd77..f8f0aa4cb4f1585b3dc3a6eed573d89c4b32e45c 100644 (file)
 
 {% block page_sub_content %}
     {% with object.blocks.all as blocks %}
-        {% include "projects/inc/project_block.html" %}
+        {% include "core/inc/block.html" %}
     {% endwith %}
 {% endblock %}
 
index 1f0e9402dda895239c974d3f720f756a61d60793..f4e123d89c2acbd484e927496d9da2deffef4890 100644 (file)
 
 {% block page_title %}
     {% editable object.title %}
-        <h1 class="dotted">{% trans "New project form" %}</h1>
+        <h1 class="dotted">{% trans "Framework and submission process for hosting R&D Projects" %}</h1>
     {% endeditable %}
 {% endblock %}
 
 {% block page_content %}
 
     <div class="row">
-        {% if object.content %}
-            {% editable object.content %}
+        {% if call.project_form_content %}
+            {% editable call.project_form_content %}
                 {{ call.project_form_content|richtext_filters|safe }}
             {% endeditable %}
         {% endif %}
     </div>
 
     <div class="row">
+        <h2 class="dotted">{% trans "Project submission form" %}</h2>
         {% errors_for form %}
         <form class="mezzanine-form form" method="post"{% if form.is_multipart %} enctype="multipart/form-data"{% endif %}>
             {% fields_for form %}
             {% for formset in inlines %}
                 {{ formset.management_form }}
+                <hr>
+                <h2>{{ formset.prefix }}</h2>
                 {% for form in formset %}
                    {% fields_for form %}
                 {% endfor %}
index 0676e819b634df4ed6900c14e04f633bf0b9f88b..94084d5daf4587d1e9afe8e66fb8519b3d5997a0 100644 (file)
@@ -52,9 +52,9 @@
                 {# <li class="nav-header__item nav-header__item--right nav-header__item--separator">#}
                     {# {% include "includes/languages.html" %}#}
                 {# </li>#}
-                <li class="nav-header__item nav-header__item--centered nav-header__item--right nav-header__item--no-separator">
+                {# <li class="nav-header__item nav-header__item--centered nav-header__item--right nav-header__item--no-separator">
                     <a href="#" class="fsxl" data-open-button="search" data-search-button><i class="fa fa-search" aria-hidden="true"></i></a>
-                </li>
+                </li>#}
 
             </ul>
             {% endif %}
index d236815a0806dea5ce7f0f8192fbed035b8b45fa..af1ced3a2b1c1757093ab2ccd2f7144eeff68a69 100644 (file)
 
                 <div class="col-md-2 page__sidebar">
 
+                    {% comment %}
                     <div style="position: relative;">
                         {% block page_sidebar %}
                         {% endblock %}
                     </div>
+                    {% endcomment %}
 
                 </div>
 
index 677c2faeb8b46a52846d6663c7f4c1a3d9509e18..d94d8e658d32c24121f184857e193b5f5fbd2e78 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 677c2faeb8b46a52846d6663c7f4c1a3d9509e18
+Subproject commit d94d8e658d32c24121f184857e193b5f5fbd2e78
diff --git a/var b/var
index 6bc517e8659de1d64d09f3a190e97a7e4c4abe5f..44ddbf77ef50c0a6eb3daa3eea967241fc646df2 160000 (submodule)
--- a/var
+++ b/var
@@ -1 +1 @@
-Subproject commit 6bc517e8659de1d64d09f3a190e97a7e4c4abe5f
+Subproject commit 44ddbf77ef50c0a6eb3daa3eea967241fc646df2