From ef0b5f8441cf7b3d5a03da715263003d9f550f2f Mon Sep 17 00:00:00 2001 From: Biel Frontera Date: Wed, 4 Mar 2015 15:28:09 +0100 Subject: [PATCH] New daily reports and flag changes --- grumers/apps/data/admin.py | 9 + grumers/apps/data/forms.py | 256 ++++++++- ...d_flagchange__add_field_observationrout.py | 184 +++++++ ..._del_jellyfishincident__add_dailyreport.py | 177 +++++++ grumers/apps/data/models.py | 89 ++++ grumers/apps/data/tables.py | 160 +++++- grumers/apps/data/urls.py | 56 ++ grumers/apps/data/views.py | 484 +++++++++++++++++- grumers/locale/ca/LC_MESSAGES/django.mo | Bin 8529 -> 11598 bytes grumers/locale/ca/LC_MESSAGES/django.po | 452 +++++++++++----- grumers/locale/es/LC_MESSAGES/django.mo | Bin 8483 -> 11789 bytes grumers/locale/es/LC_MESSAGES/django.po | 460 ++++++++++++----- grumers/static/css/style.less | 10 + .../templates/data/dailyreport_create.html | 12 + grumers/templates/data/dailyreport_list.html | 32 ++ .../templates/data/dailyreport_update.html | 191 +++++++ grumers/templates/data/flagchange_create.html | 12 + grumers/templates/data/flagchange_delete.html | 19 + grumers/templates/data/flagchange_list.html | 32 ++ grumers/templates/data/flagchange_update.html | 184 +++++++ .../data/jellyfishobservation_update.html | 2 +- .../templates/data/observationbeach_list.html | 5 +- requirements/common.pip | 2 +- 23 files changed, 2571 insertions(+), 257 deletions(-) create mode 100644 grumers/apps/data/migrations/0010_auto__add_jellyfishincident__add_flagchange__add_field_observationrout.py create mode 100644 grumers/apps/data/migrations/0011_auto__del_jellyfishincident__add_dailyreport.py create mode 100644 grumers/templates/data/dailyreport_create.html create mode 100644 grumers/templates/data/dailyreport_list.html create mode 100644 grumers/templates/data/dailyreport_update.html create mode 100644 grumers/templates/data/flagchange_create.html create mode 100644 grumers/templates/data/flagchange_delete.html create mode 100644 grumers/templates/data/flagchange_list.html create mode 100644 grumers/templates/data/flagchange_update.html diff --git a/grumers/apps/data/admin.py b/grumers/apps/data/admin.py index fbb3f16..d9db108 100644 --- a/grumers/apps/data/admin.py +++ b/grumers/apps/data/admin.py @@ -24,6 +24,8 @@ class JellyfishSpeciesAdmin(AuditModelAdmin): class ObservationRouteAdmin(AuditModelAdmin): list_display = ('name', 'group_list', 'active',) filter_horizontal = ('groups',) + list_filter = ['route_type', 'island', 'municipality'] + search_fields = ['name'] def save_model(self, request, obj, form, change): if form.cleaned_data['route_type'] == 'B' and not form.cleaned_data['groups']: @@ -61,7 +63,14 @@ def get_form(self, request, obj=None, **kwargs): choices=models.JellyfishObservation.QUANTITY_CHOICES) return form + +class DailyReportAdmin(AuditModelAdmin): + list_display = ('date_observed', 'sting_incidents', 'total_incidents', 'created_by') + list_filter = ['observation_station', 'created_by', 'date_observed'] + + admin.site.register(models.JellyfishSpecie, JellyfishSpeciesAdmin) admin.site.register(models.ObservationRoute, ObservationRouteAdmin) admin.site.register(models.ObservationStation, ObservationStationAdmin) admin.site.register(models.JellyfishObservation, JellyfishObservationAdmin) +admin.site.register(models.DailyReport, DailyReportAdmin) diff --git a/grumers/apps/data/forms.py b/grumers/apps/data/forms.py index c407239..0fb85cb 100644 --- a/grumers/apps/data/forms.py +++ b/grumers/apps/data/forms.py @@ -3,7 +3,7 @@ from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User from crispy_forms.helper import FormHelper -from crispy_forms.layout import Submit, Fieldset, ButtonHolder +from crispy_forms.layout import Submit, Fieldset, ButtonHolder, Field, Div, HTML from crispy_forms.bootstrap import StrictButton from bootstrap3_datetime.widgets import DateTimePicker from grumers.utils.crispy import ExtendedLayout @@ -43,14 +43,13 @@ def clean(self): self._errors["jellyfish_specie"] = self.error_class([msg]) del cleaned_data["quantity"] del cleaned_data["jellyfish_specie"] - - if ['sting_incidents', 'total_incidents'] in cleaned_data.keys(): + if 'sting_incidents' in cleaned_data.keys() and 'total_incidents' in cleaned_data.keys(): if cleaned_data['sting_incidents'] > cleaned_data['total_incidents']: msg = _('Sting incidents can not be greater than total incidents') self._errors["sting_incidents"] = self.error_class([msg]) - self._errors["jellyfish_specie"] = self.error_class([msg]) - del cleaned_data["total_incidents"] + self._errors["total_incidents"] = self.error_class([msg]) del cleaned_data["total_incidents"] + del cleaned_data["sting_incidents"] return cleaned_data def __init__(self, *args, **kwargs): @@ -261,6 +260,12 @@ def __init__(self, *args, **kwargs): self.fields[key].label = self.fields[key].label.capitalize() +class DailyReportFilterForm(JellyfishObservationFilterForm): + def __init__(self, *args, **kwargs): + super(DailyReportFilterForm, self).__init__(*args, **kwargs) + self.fields.pop('jellyfish_specie') + + class ObservationStationFilterForm(forms.Form): route = forms.ModelChoiceField( models.ObservationRoute.objects.filter(disabled=False), @@ -301,3 +306,244 @@ def __init__(self, *args, **kwargs): for key in self.fields: self.fields[key].label = self.fields[key].label.capitalize() + + +class DailyReportUpdateForm(forms.ModelForm): + button_prefix = _("Update") + + class Meta: + model = models.DailyReport + fields = [ + 'date_observed', + 'observation_station', + 'sting_incidents', + 'total_incidents', + ] + + def clean(self): + cleaned_data = super(DailyReportUpdateForm, self).clean() + if 'sting_incidents' in cleaned_data.keys() and 'total_incidents' in cleaned_data.keys(): + if cleaned_data['sting_incidents'] > cleaned_data['total_incidents']: + msg = _('Sting incidents can not be greater than total incidents') + self._errors["sting_incidents"] = self.error_class([msg]) + self._errors["total_incidents"] = self.error_class([msg]) + del cleaned_data["sting_incidents"] + del cleaned_data["total_incidents"] + + return cleaned_data + + def __init__(self, *args, **kwargs): + self.helper = FormHelper() + self.helper.form_class = 'form-horizontal' + self.helper.label_class = 'col-sm-3' + self.helper.field_class = 'col-sm-5' + submit_button = StrictButton( + ' ' + + _('%s daily report') % self.button_prefix, + css_class='btn btn-primary', + name='dailyreport', + value='submit_dailyreport', + type='submit') + next_station_button = StrictButton( + _('%s Create report and continue with next station') % + '', + css_class='btn btn-primary', + name='next_station', + value='submit_next_station', + type='submit') + cancel_button = StrictButton( + _('Cancel'), + css_class='btn', + name='cancel', + value='cancel', + type='submit') + + if not isinstance(self, DailyReportCreateForm): + next_station_button = None + + self.helper.add_layout( + ExtendedLayout( + Fieldset( + _('When / Where'), + 'date_observed', + 'observation_station', + ), + Fieldset( + _('Incidents during the day'), + 'sting_incidents', + 'total_incidents', + css_class='incidents' + ), + ButtonHolder( + next_station_button, + submit_button, + cancel_button, + ), + ) + ) + + station = kwargs.pop('station', None) + route = kwargs.pop('route', None) + super(DailyReportUpdateForm, self).__init__(*args, **kwargs) + if station: + self.fields['observation_station'].initial = station + + station_queryset = self.fields['observation_station'].queryset + if route: + station_queryset = station_queryset.filter(observation_route=route) + station_queryset = station_queryset.filter(disabled=False) + self.fields['observation_station'].queryset = station_queryset + + +class DailyReportCreateForm(DailyReportUpdateForm): + + button_prefix = _("Create") + + def __init__(self, *args, **kwargs): + super(DailyReportCreateForm, self).__init__(*args, **kwargs) + + +class FlagChangeUpdateForm(forms.ModelForm): + button_prefix = _("Update") + + class Meta: + model = models.FlagChange + fields = [ + 'date', + 'observation_station', + 'flag_status', + 'jellyfish_flag' + ] + + def __init__(self, *args, **kwargs): + self.helper = FormHelper() + self.helper.form_class = 'form-horizontal' + self.helper.label_class = 'col-sm-3' + self.helper.field_class = 'col-sm-5' + submit_button = StrictButton( + ' ' + + _('%s flag change') % self.button_prefix, + css_class='btn btn-primary', + name='flagchange', + value='submit_flagchange', + type='submit') + next_station_button = StrictButton( + _('%s Create flag change and continue') % + '', + css_class='btn btn-primary', + name='continue', + value='submit_continue', + type='submit') + delete_button = HTML(""" + {% load i18n %} + {% if object.pk %} + + + {% trans 'Remove' %} + {% endif %} + + """) + cancel_button = StrictButton( + _('Cancel'), + css_class='btn', + name='cancel', + value='cancel', + type='submit') + + if not isinstance(self, FlagChangeCreateForm): + next_station_button = None + else: + submit_button = None + + self.helper.add_layout( + ExtendedLayout( + Fieldset( + _('When / Where'), + 'date', + 'observation_station', + ), + Fieldset( + _('Flag'), + 'flag_status', + Div( + Field('jellyfish_flag'), + css_class="col-sm-offset-3"), + css_class='flags' + ), + ButtonHolder( + next_station_button, + submit_button, + delete_button, + cancel_button, + ), + ) + ) + + station = kwargs.pop('station', None) + route = kwargs.pop('route', None) + super(FlagChangeUpdateForm, self).__init__(*args, **kwargs) + if station: + self.fields['observation_station'].initial = station + + station_queryset = self.fields['observation_station'].queryset + if route: + station_queryset = station_queryset.filter(observation_route=route) + station_queryset = station_queryset.filter(station_type='B') + station_queryset = station_queryset.filter(disabled=False) + self.fields['observation_station'].queryset = station_queryset + self.fields['date'].widget = DateTimePicker( + options={"format": "YYYY-MM-DD HH:mm", + "pickSeconds": False}) + + +class FlagChangeCreateForm(FlagChangeUpdateForm): + + button_prefix = _("Create") + + def __init__(self, *args, **kwargs): + super(FlagChangeCreateForm, self).__init__(*args, **kwargs) + + +def get_municipality_choices(): + municipalities = models.ObservationRoute.objects.all().order_by( + 'municipality').values_list('municipality').distinct() + return [('', _('Municipality: all'))] + [(mun[0], mun[0]) for mun in municipalities] + + +class ObservationBeachFilterForm(forms.Form): + name = forms.CharField( + label=_('Name'), + required=False) + + island = forms.ChoiceField( + [('', _('Island: all'))] + list(models.ISLAND_CHOICES), + label=_('Island'), + required=False) + + municipality = forms.ChoiceField( + [('', _('Municipality: all'))], + label=_('Municipality'), + required=False) + + def __init__(self, *args, **kwargs): + self.helper = FormHelper() + self.helper.form_method = 'GET' + filter_button = Submit( + 'filter', + css_class='btn btn-default', + value=_('Filter'), + type='submit') + self.helper.add_layout( + ExtendedLayout( + Div(Field('name'), css_class="col-sm-4"), + Div(Field('island'), css_class="col-sm-3"), + Div(Field('municipality'), css_class="col-sm-3"), + Div(filter_button, css_class="col-sm-2 valign-button-iform"), + ) + ) + super(ObservationBeachFilterForm, self).__init__(*args, **kwargs) + self.fields['municipality'].choices = get_municipality_choices() + + for key in self.fields: + self.fields[key].label = self.fields[key].label.capitalize() diff --git a/grumers/apps/data/migrations/0010_auto__add_jellyfishincident__add_flagchange__add_field_observationrout.py b/grumers/apps/data/migrations/0010_auto__add_jellyfishincident__add_flagchange__add_field_observationrout.py new file mode 100644 index 0000000..890221a --- /dev/null +++ b/grumers/apps/data/migrations/0010_auto__add_jellyfishincident__add_flagchange__add_field_observationrout.py @@ -0,0 +1,184 @@ +# -*- coding: utf-8 -*- +from south.utils import datetime_utils as datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + # Adding model 'JellyfishIncident' + db.create_table(u'data_jellyfishincident', ( + (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('date_observed', self.gf('django.db.models.fields.DateField')()), + ('observation_station', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['data.ObservationStation'], on_delete=models.PROTECT)), + ('source', self.gf('django.db.models.fields.CharField')(default='W', max_length=2)), + ('sting_incidents', self.gf('django.db.models.fields.IntegerField')(default=0, blank=True)), + ('total_incidents', self.gf('django.db.models.fields.IntegerField')(default=0, blank=True)), + ('created_on', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), + ('created_by', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='created-incident', null=True, to=orm['auth.User'])), + ('updated_on', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), + ('updated_by', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='updated-incident', null=True, to=orm['auth.User'])), + )) + db.send_create_signal(u'data', ['JellyfishIncident']) + + # Adding model 'FlagChange' + db.create_table(u'data_flagchange', ( + (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('date', self.gf('django.db.models.fields.DateTimeField')()), + ('observation_station', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['data.ObservationStation'], on_delete=models.PROTECT)), + ('flag_status', self.gf('django.db.models.fields.CharField')(default='N', max_length=1)), + ('jellyfish_flag', self.gf('django.db.models.fields.BooleanField')(default=False)), + ('created_on', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), + ('created_by', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='created-flag', null=True, to=orm['auth.User'])), + ('updated_on', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), + ('updated_by', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='updated-flag', null=True, to=orm['auth.User'])), + )) + db.send_create_signal(u'data', ['FlagChange']) + + # Adding field 'ObservationRoute.use_incident_form' + db.add_column(u'data_observationroute', 'use_incident_form', + self.gf('django.db.models.fields.BooleanField')(default=False), + keep_default=False) + + + def backwards(self, orm): + # Deleting model 'JellyfishIncident' + db.delete_table(u'data_jellyfishincident') + + # Deleting model 'FlagChange' + db.delete_table(u'data_flagchange') + + # Deleting field 'ObservationRoute.use_incident_form' + db.delete_column(u'data_observationroute', 'use_incident_form') + + + models = { + u'auth.group': { + 'Meta': {'object_name': 'Group'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + u'auth.permission': { + 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + u'auth.user': { + 'Meta': {'object_name': 'User'}, + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + u'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + u'data.flagchange': { + 'Meta': {'ordering': "['-date']", 'object_name': 'FlagChange'}, + 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'created-flag'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'date': ('django.db.models.fields.DateTimeField', [], {}), + 'flag_status': ('django.db.models.fields.CharField', [], {'default': "'N'", 'max_length': '1'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'jellyfish_flag': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'observation_station': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['data.ObservationStation']", 'on_delete': 'models.PROTECT'}), + 'updated_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'updated-flag'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'updated_on': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) + }, + u'data.jellyfishincident': { + 'Meta': {'ordering': "['-date_observed']", 'object_name': 'JellyfishIncident'}, + 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'created-incident'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'date_observed': ('django.db.models.fields.DateField', [], {}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'observation_station': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['data.ObservationStation']", 'on_delete': 'models.PROTECT'}), + 'source': ('django.db.models.fields.CharField', [], {'default': "'W'", 'max_length': '2'}), + 'sting_incidents': ('django.db.models.fields.IntegerField', [], {'default': '0', 'blank': 'True'}), + 'total_incidents': ('django.db.models.fields.IntegerField', [], {'default': '0', 'blank': 'True'}), + 'updated_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'updated-incident'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'updated_on': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) + }, + u'data.jellyfishobservation': { + 'Meta': {'ordering': "['-date_observed']", 'object_name': 'JellyfishObservation'}, + 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'created-observation'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'date_observed': ('django.db.models.fields.DateTimeField', [], {}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'jellyfish_specie': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['data.JellyfishSpecie']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}), + 'observation_station': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['data.ObservationStation']", 'on_delete': 'models.PROTECT'}), + 'picture': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), + 'quantity': ('django.db.models.fields.IntegerField', [], {'blank': 'True'}), + 'remarks': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'source': ('django.db.models.fields.CharField', [], {'default': "'W'", 'max_length': '2'}), + 'sting_incidents': ('django.db.models.fields.IntegerField', [], {'default': '0', 'blank': 'True'}), + 'total_incidents': ('django.db.models.fields.IntegerField', [], {'default': '0', 'blank': 'True'}), + 'updated_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'updated-observation'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'updated_on': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) + }, + u'data.jellyfishspecie': { + 'Meta': {'ordering': "['order', 'name']", 'object_name': 'JellyfishSpecie'}, + 'common_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), + 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'created-specie'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'disabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'order': ('django.db.models.fields.IntegerField', [], {}), + 'picture': ('django.db.models.fields.files.ImageField', [], {'default': "'jellyfish_species/no-img.jpg'", 'max_length': '100'}), + 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}), + 'updated_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'updated-specie'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'updated_on': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) + }, + u'data.observationroute': { + 'Meta': {'ordering': "['name']", 'object_name': 'ObservationRoute'}, + 'code': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '10', 'null': 'True', 'blank': 'True'}), + 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'created-route'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'disabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['auth.Group']", 'null': 'True', 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'island': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}), + 'municipality': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'route_type': ('django.db.models.fields.CharField', [], {'default': "'C'", 'max_length': '1'}), + 'updated_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'updated-route'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'updated_on': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), + 'use_incident_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) + }, + u'data.observationstation': { + 'Meta': {'ordering': "['observation_route', 'order']", 'object_name': 'ObservationStation'}, + 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'created-station'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'disabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'observation_route': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['data.ObservationRoute']", 'on_delete': 'models.PROTECT'}), + 'order': ('django.db.models.fields.IntegerField', [], {}), + 'position': ('django.contrib.gis.db.models.fields.PointField', [], {}), + 'station_type': ('django.db.models.fields.CharField', [], {'default': "'S'", 'max_length': '1'}), + 'updated_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'updated-station'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'updated_on': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) + } + } + + complete_apps = ['data'] \ No newline at end of file diff --git a/grumers/apps/data/migrations/0011_auto__del_jellyfishincident__add_dailyreport.py b/grumers/apps/data/migrations/0011_auto__del_jellyfishincident__add_dailyreport.py new file mode 100644 index 0000000..abd2259 --- /dev/null +++ b/grumers/apps/data/migrations/0011_auto__del_jellyfishincident__add_dailyreport.py @@ -0,0 +1,177 @@ +# -*- coding: utf-8 -*- +from south.utils import datetime_utils as datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + # Deleting model 'JellyfishIncident' + db.delete_table(u'data_jellyfishincident') + + # Adding model 'DailyReport' + db.create_table(u'data_dailyreport', ( + (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('date_observed', self.gf('django.db.models.fields.DateField')()), + ('observation_station', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['data.ObservationStation'], on_delete=models.PROTECT)), + ('source', self.gf('django.db.models.fields.CharField')(default='W', max_length=2)), + ('sting_incidents', self.gf('django.db.models.fields.IntegerField')(default=0, blank=True)), + ('total_incidents', self.gf('django.db.models.fields.IntegerField')(default=0, blank=True)), + ('created_on', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), + ('created_by', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='created-incident', null=True, to=orm['auth.User'])), + ('updated_on', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), + ('updated_by', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='updated-incident', null=True, to=orm['auth.User'])), + )) + db.send_create_signal(u'data', ['DailyReport']) + + + def backwards(self, orm): + # Adding model 'JellyfishIncident' + db.create_table(u'data_jellyfishincident', ( + ('updated_by', self.gf('django.db.models.fields.related.ForeignKey')(related_name='updated-incident', null=True, to=orm['auth.User'], blank=True)), + ('date_observed', self.gf('django.db.models.fields.DateField')()), + ('created_on', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), + ('total_incidents', self.gf('django.db.models.fields.IntegerField')(default=0, blank=True)), + (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('sting_incidents', self.gf('django.db.models.fields.IntegerField')(default=0, blank=True)), + ('observation_station', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['data.ObservationStation'], on_delete=models.PROTECT)), + ('created_by', self.gf('django.db.models.fields.related.ForeignKey')(related_name='created-incident', null=True, to=orm['auth.User'], blank=True)), + ('source', self.gf('django.db.models.fields.CharField')(default='W', max_length=2)), + ('updated_on', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), + )) + db.send_create_signal(u'data', ['JellyfishIncident']) + + # Deleting model 'DailyReport' + db.delete_table(u'data_dailyreport') + + + models = { + u'auth.group': { + 'Meta': {'object_name': 'Group'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + u'auth.permission': { + 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + u'auth.user': { + 'Meta': {'object_name': 'User'}, + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + u'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + u'data.dailyreport': { + 'Meta': {'ordering': "['-date_observed']", 'object_name': 'DailyReport'}, + 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'created-incident'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'date_observed': ('django.db.models.fields.DateField', [], {}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'observation_station': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['data.ObservationStation']", 'on_delete': 'models.PROTECT'}), + 'source': ('django.db.models.fields.CharField', [], {'default': "'W'", 'max_length': '2'}), + 'sting_incidents': ('django.db.models.fields.IntegerField', [], {'default': '0', 'blank': 'True'}), + 'total_incidents': ('django.db.models.fields.IntegerField', [], {'default': '0', 'blank': 'True'}), + 'updated_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'updated-incident'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'updated_on': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) + }, + u'data.flagchange': { + 'Meta': {'ordering': "['-date']", 'object_name': 'FlagChange'}, + 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'created-flag'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'date': ('django.db.models.fields.DateTimeField', [], {}), + 'flag_status': ('django.db.models.fields.CharField', [], {'default': "'N'", 'max_length': '1'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'jellyfish_flag': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'observation_station': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['data.ObservationStation']", 'on_delete': 'models.PROTECT'}), + 'updated_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'updated-flag'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'updated_on': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) + }, + u'data.jellyfishobservation': { + 'Meta': {'ordering': "['-date_observed']", 'object_name': 'JellyfishObservation'}, + 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'created-observation'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'date_observed': ('django.db.models.fields.DateTimeField', [], {}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'jellyfish_specie': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['data.JellyfishSpecie']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}), + 'observation_station': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['data.ObservationStation']", 'on_delete': 'models.PROTECT'}), + 'picture': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), + 'quantity': ('django.db.models.fields.IntegerField', [], {'blank': 'True'}), + 'remarks': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'source': ('django.db.models.fields.CharField', [], {'default': "'W'", 'max_length': '2'}), + 'sting_incidents': ('django.db.models.fields.IntegerField', [], {'default': '0', 'blank': 'True'}), + 'total_incidents': ('django.db.models.fields.IntegerField', [], {'default': '0', 'blank': 'True'}), + 'updated_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'updated-observation'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'updated_on': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) + }, + u'data.jellyfishspecie': { + 'Meta': {'ordering': "['order', 'name']", 'object_name': 'JellyfishSpecie'}, + 'common_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), + 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'created-specie'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'disabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'order': ('django.db.models.fields.IntegerField', [], {}), + 'picture': ('django.db.models.fields.files.ImageField', [], {'default': "'jellyfish_species/no-img.jpg'", 'max_length': '100'}), + 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}), + 'updated_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'updated-specie'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'updated_on': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) + }, + u'data.observationroute': { + 'Meta': {'ordering': "['name']", 'object_name': 'ObservationRoute'}, + 'code': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '10', 'null': 'True', 'blank': 'True'}), + 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'created-route'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'disabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['auth.Group']", 'null': 'True', 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'island': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}), + 'municipality': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'route_type': ('django.db.models.fields.CharField', [], {'default': "'C'", 'max_length': '1'}), + 'updated_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'updated-route'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'updated_on': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), + 'use_incident_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) + }, + u'data.observationstation': { + 'Meta': {'ordering': "['observation_route', 'order']", 'object_name': 'ObservationStation'}, + 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'created-station'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'disabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'observation_route': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['data.ObservationRoute']", 'on_delete': 'models.PROTECT'}), + 'order': ('django.db.models.fields.IntegerField', [], {}), + 'position': ('django.contrib.gis.db.models.fields.PointField', [], {}), + 'station_type': ('django.db.models.fields.CharField', [], {'default': "'S'", 'max_length': '1'}), + 'updated_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'updated-station'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'updated_on': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) + } + } + + complete_apps = ['data'] \ No newline at end of file diff --git a/grumers/apps/data/models.py b/grumers/apps/data/models.py index be34876..868130f 100644 --- a/grumers/apps/data/models.py +++ b/grumers/apps/data/models.py @@ -102,6 +102,7 @@ class ObservationRoute(models.Model): route_type = models.CharField(_('type'), max_length=1, choices=ROUTE_TYPE_CHOICES, default='C') + use_incident_form = models.BooleanField(_('use incident form'), default=False) island = models.CharField(_('island'), max_length=15, choices=ISLAND_CHOICES, blank=True, null=True) @@ -325,3 +326,91 @@ def get_group(group_name): assign_default_beach_groups, sender=ObservationRoute, dispatch_uid="assign_beach_groups") + + +class FlagChange(models.Model): + + NONE, RED, YELLOW, GREEN = ('N', 'R', 'Y', 'G') + FLAG_STATUS_CHOICES = ( + (NONE, _('None')), + (RED, _('Red')), + (YELLOW, _('Yellow')), + (GREEN, _('Green')), + ) + + date = models.DateTimeField(_('date and time')) + observation_station = models.ForeignKey(ObservationStation, on_delete=models.PROTECT, + verbose_name=_('observation station')) + flag_status = models.CharField(_('flag status'), max_length=1, + choices=FLAG_STATUS_CHOICES, + default=NONE, blank=False) + jellyfish_flag = models.BooleanField(_('jellyfish flag'), default=False) + # Audit + created_on = models.DateTimeField(_('date added'), auto_now_add=True) + created_by = models.ForeignKey(User, blank=True, null=True, + editable=False, related_name='created-flag', + verbose_name=_('created by')) + updated_on = models.DateTimeField(_('date modified'), auto_now=True) + updated_by = models.ForeignKey(User, blank=True, null=True, + editable=False, related_name='updated-flag', + verbose_name=_('update by')) + + class Meta: + verbose_name = _('flag change') + verbose_name_plural = _('flag changes') + ordering = ['-date'] + + def __unicode__(self): + return "{flag} flag on {date:%d/%m/%Y}".format( + flag=self.get_flag_status_display(), + date=self.date) + + def save(self, *args, **kwargs): + user = kwargs.pop('user', None) + self.updated_by = user + if not self.id: + self.created_by = user + return super(FlagChange, self).save(*args, **kwargs) + + +class DailyReport(models.Model): + WEBFORM, API, BULK = ('W', 'A', 'B') + SOURCE_CHOICES = ( + (WEBFORM, _('Web Form')), + (API, _('API')), + (BULK, _('Bulk upload')), + ) + + date_observed = models.DateField(_('date')) + observation_station = models.ForeignKey(ObservationStation, on_delete=models.PROTECT, + verbose_name=_('observation station')) + source = models.CharField(_('source'), max_length=2, + choices=SOURCE_CHOICES, + default=WEBFORM, blank=False) + sting_incidents = models.IntegerField( + _('total sting incidents'), + default=0, blank=True) + total_incidents = models.IntegerField( + _('total incidents'), + default=0, blank=True) + # Audit + created_on = models.DateTimeField(_('date added'), auto_now_add=True) + created_by = models.ForeignKey(User, blank=True, null=True, + editable=False, related_name='created-incident', + verbose_name=_('created by')) + updated_on = models.DateTimeField(_('date modified'), auto_now=True) + updated_by = models.ForeignKey(User, blank=True, null=True, + editable=False, related_name='updated-incident', + verbose_name=_('update by')) + + class Meta: + verbose_name = _('daily report') + verbose_name_plural = _('daily report') + ordering = ['-date_observed'] + + def save(self, *args, **kwargs): + user = kwargs.pop('user', None) + self.updated_by = user + if not self.id: + self.created_by = user + return super(DailyReport, self).save(*args, **kwargs) diff --git a/grumers/apps/data/tables.py b/grumers/apps/data/tables.py index 4963633..bb3546e 100644 --- a/grumers/apps/data/tables.py +++ b/grumers/apps/data/tables.py @@ -149,28 +149,44 @@ class Meta: class ObservationBeachTable(tables.Table): name = tables.TemplateColumn( - """ - {{ record.name }} + """{% load i18n %}{{ record.name }} + {%if record.use_incident_form %} + + {% else %} + + {% endif %} + + """) island = tables.Column() municipality = tables.Column() create_observation = tables.TemplateColumn( """{% load i18n %} - + + {% trans 'Add' %} {% trans 'daily report' %} + + {% else %} {% trans 'Add' %} {% trans 'observation' %} - """, - verbose_name=_('create observation')) - create_bulk_observation = tables.TemplateColumn( - """{% load i18n %} - + {% trans 'Add bulk no-observations' %} - """, - verbose_name=_('create bulk no-observations')) + {% endif %} + + + {% trans 'Add' %} {% trans 'flag change' %} + + + """, + verbose_name=_('actions')) class Meta: model = models.ObservationRoute @@ -228,3 +244,127 @@ def __init__(self, *args, **kwargs): class Meta: model = models.ObservationStation attrs = {"class": "table table-striped table-condensed"} + + +class DailyReportTable(tables.Table): + date_observed = tables.TemplateColumn( + """ + {{ record.date_observed|date:'d/m/Y'}} + + """) + observation_station = tables.Column() + sting_incidents = tables.Column() + total_incidents = tables.Column() + source = tables.Column() + created_by = tables.Column() + route = None + + def __init__(self, *args, **kwargs): + self.route = kwargs.pop('route', None) + super(DailyReportTable, self).__init__(*args, **kwargs) + if self.route: + self.context = Context({'route': self.route}) + self.base_columns['date_observed'].template_code = """ + + {{ record.date_observed|date:'d/m/Y'}} + + """ + + class Meta: + model = models.DailyReport + attrs = {"class": "table table-striped table-condensed"} + sequence = fields = ( + 'date_observed', + 'observation_station', + 'sting_incidents', + 'total_incidents', + 'created_by', + 'source', + ) + + @property + def verbose_name(self): + if getattr(self, 'display_name', None): + return self.display_name + return self.Meta.model._meta.verbose_name_plural.title() + + +class DailyReportExportTable(DailyReportTable): + date_observed = tables.Column() + observation_route = tables.Column( + accessor='observation_station.observation_route.name') + + def __init__(self, *args, **kwargs): + self.route = kwargs.pop('route', None) + super(DailyReportExportTable, self).__init__(*args, **kwargs) + + class Meta: + model = models.DailyReport + fields = ( + 'date_observed', + 'observation_station', + 'created_by', + 'source', + 'sting_incidents', + 'total_incidents' + ) + sequence = ( + 'date_observed', + 'observation_route', + 'observation_station', + 'sting_incidents', + 'total_incidents', + 'created_by', + 'source', + ) + + +class FlagChangeTable(tables.Table): + date = tables.TemplateColumn( + """ + {{ record.date|date:'d/m/Y H:i'}} + + """) + observation_station = tables.Column() + flag_status = tables.Column() + jellyfish_flag = tables.Column() + created_by = tables.Column() + route = None + + def __init__(self, *args, **kwargs): + self.route = kwargs.pop('route', None) + super(FlagChangeTable, self).__init__(*args, **kwargs) + if self.route: + self.context = Context({'route': self.route}) + self.base_columns['date'].template_code = """ + + {{ record.date|date:'d/m/Y H:i'}} + + """ + + class Meta: + model = models.FlagChange + attrs = {"class": "table table-striped table-condensed"} + sequence = fields = ( + 'date', + 'observation_station', + 'flag_status', + 'jellyfish_flag', + 'created_by', + ) + + @property + def verbose_name(self): + if getattr(self, 'display_name', None): + return self.display_name + return self.Meta.model._meta.verbose_name_plural.title() + + +class FlagChangeExportTable(FlagChangeTable): + date = tables.Column() + observation_route = tables.Column( + accessor='observation_station.observation_route.name') + + def __init__(self, *args, **kwargs): + self.route = kwargs.pop('route', None) + super(FlagChangeExportTable, self).__init__(*args, **kwargs) diff --git a/grumers/apps/data/urls.py b/grumers/apps/data/urls.py index 04b0474..dc0f4c8 100644 --- a/grumers/apps/data/urls.py +++ b/grumers/apps/data/urls.py @@ -55,6 +55,62 @@ views.JellyfishObservationMap.as_view(), name='data_route_observation_map', ), + url(r'^route/(?P\d+)/dailyreport/create/?$', + views.DailyReportCreate.as_view(), + name='data_route_dailyreport_create', + ), + url(r'^route/(?P\d+)/dailyreport/(?P\d+)/update/?$', + views.DailyReportUpdate.as_view(), + name='data_route_dailyreport_update', + ), + url(r'^route/(?P\d+)/dailyreport/list/?$', + views.DailyReportList.as_view(), + name='data_route_dailyreport_list', + ), + url(r'^route/(?P\d+)/flagchange/create/?$', + views.FlagChangeCreate.as_view(), + name='data_route_flagchange_create', + ), + url(r'^route/(?P\d+)/flagchange/(?P\d+)/update/?$', + views.FlagChangeUpdate.as_view(), + name='data_route_flagchange_update', + ), + url(r'^route/(?P\d+)/flagchange/(?P\d+)/delete/?$', + views.FlagChangeDelete.as_view(), + name='data_route_flagchange_delete', + ), + url(r'^route/(?P\d+)/flagchange/list/?$', + views.FlagChangeList.as_view(), + name='data_route_flagchange_list', + ), + url(r'^dailyreport/create/?$', + views.DailyReportCreate.as_view(), + name='data_dailyreport_create', + ), + url(r'^dailyreport/(?P\d+)/update/?$', + views.DailyReportUpdate.as_view(), + name='data_dailyreport_update', + ), + url(r'^dailyreport/list/?$', + views.DailyReportList.as_view(), + name='data_dailyreport_list', + ), + url(r'^flagchange/create/?$', + views.FlagChangeCreate.as_view(), + name='data_flagchange_create', + ), + url(r'^flagchange/(?P\d+)/update/?$', + views.FlagChangeUpdate.as_view(), + name='data_flagchange_update', + ), + url(r'^flagchange/(?P\d+)/delete/?$', + views.FlagChangeDelete.as_view(), + name='data_flagchange_delete', + ), + url(r'^flagchange/list/?$', + views.FlagChangeList.as_view(), + name='data_flagchange_list', + ), url(r'^route/list/?$', views.ObservationRouteList.as_view(), name='data_route_list', diff --git a/grumers/apps/data/views.py b/grumers/apps/data/views.py index 9e15882..f2e4171 100644 --- a/grumers/apps/data/views.py +++ b/grumers/apps/data/views.py @@ -13,7 +13,7 @@ from django.shortcuts import redirect from django.db.models import Sum, Max from django.core.exceptions import PermissionDenied -from datetime import datetime, date +from datetime import datetime, date, timedelta from grumers.utils import exporter import models import forms @@ -388,14 +388,34 @@ class ObservationBeachList(ObservationRouteList): table_class = tables.ObservationBeachTable template_name = 'data/observationbeach_list.html' + @method_decorator(login_required) + def dispatch(self, request, *args, **kwargs): + self.filter_form = forms.ObservationBeachFilterForm(self.request.GET) + return super(ObservationBeachList, self).dispatch(request, *args, **kwargs) + def get_queryset(self): routes = models.ObservationRoute.objects.filter( route_type='B') if not self.request.user.is_superuser: routes = routes.filter( groups__in=self.request.user.groups.all()) + + if self.filter_form.is_valid(): + if self.filter_form.cleaned_data['island']: + routes = routes.filter( + island=self.filter_form.cleaned_data['island']) + if self.filter_form.cleaned_data['municipality']: + routes = routes.filter( + municipality=self.filter_form.cleaned_data['municipality']) + if self.filter_form.cleaned_data['name']: + routes = routes.filter(name__icontains=self.filter_form.cleaned_data['name']) return routes + def get_context_data(self, **kwargs): + context = super(ObservationBeachList, self).get_context_data(**kwargs) + context['filterform'] = self.filter_form + return context + class JSONJellyfishSpecieList(BaseListView): @@ -495,3 +515,465 @@ def get_table_data(self): return data data = data.values('position') return data + + +class DailyReportMixin(BasePageView): + """ + Shared code for create or update DailyReport + """ + + model = models.DailyReport + + @method_decorator(login_required) + def dispatch(self, request, *args, **kwargs): + self.station = request.GET.get('station', None) + pk_route = kwargs.get('pk_route', None) + if pk_route: + self.route = models.ObservationRoute.objects.get(pk=pk_route) + # Check if user is member of a group in route groups (if it has any) + if not request.user.is_superuser and self.route.groups and\ + not (request.user.groups.all() & self.route.groups.all()): + raise PermissionDenied() + else: + self.route = None + + self.date = request.GET.get('date', None) + if self.date: + self.date = datetime.strptime(self.date, '%Y%m%d%H%M') + self.next_station = None + self.station_list = models.ObservationStation.objects.filter(disabled=False) + if self.route: + self.station_list = self.station_list.filter(observation_route=self.route) + return super(DailyReportMixin, self).dispatch(request, *args, **kwargs) + + def get_context_data(self, **kwargs): + context = super(DailyReportMixin, self).get_context_data(**kwargs) + context['station_list'] = self.station_list + context['route'] = self.route + return context + + def post(self, request, *args, **kwargs): + if "cancel" in request.POST: + url = self.get_success_url() + return HttpResponseRedirect(url) + return super(DailyReportMixin, self).post(request, *args, **kwargs) + + def get_form_kwargs(self): + kwargs = super(DailyReportMixin, self).get_form_kwargs() + kwargs['station'] = self.station + if self.route: + kwargs['route'] = self.route + return kwargs + + def get_success_url(self): + if self.next_station: + if self.route: + return "{url}?station={next_station}&date={date:%Y%m%d%H%M}".format( + url=reverse('data_route_dailyreport_create', + args=[self.route.pk]), + next_station=self.next_station, + date=self.object.date_observed) + return "{url}?station={next_station}&date={date:%Y%m%d%H%M}".format( + url=reverse('data_dailyreport_create'), + next_station=self.next_station, + date=self.object.date_observed) + if self.route: + return reverse('data_route_dailyreport_update', args=[self.route.pk, self.object.pk]) + return reverse('data_dailyreport_update', args=[self.object.pk]) + + +class DailyReportCreate(DailyReportMixin, CreateView): + """ + Create a new DailyReport + """ + + template_name_suffix = '_create' + form_class = forms.DailyReportCreateForm + + def form_valid(self, form): + self.object = form.save(commit=False) + self.object.source = models.DailyReport.WEBFORM + self.object.save(user=self.request.user) + # Notify that in messages area + messages.add_message(self.request, messages.SUCCESS, _('Daily report created')) + if 'next_station' in form.data: + # calculate next station + station = models.ObservationStation.objects.filter( + observation_route=self.object.observation_station.observation_route, + disabled=False, + order__gte=self.object.observation_station.order)\ + .exclude(pk__in=[self.object.observation_station.pk])\ + .order_by('order') + if station: + self.next_station = station[0].pk + + return super(DailyReportCreate, self).form_valid(form) + + def get_initial(self): + initial = super(DailyReportCreate, self).get_initial() + initial = initial.copy() + if self.date: + initial['date_observed'] = self.date + else: + initial['date_observed'] = datetime.now() + if len(self.station_list) == 1: + initial['observation_station'] = self.station_list[0] + return initial + + +class DailyReportUpdate(DailyReportMixin, UpdateView): + """ + Update Daily Report + """ + + template_name_suffix = '_update' + form_class = forms.DailyReportUpdateForm + + def form_valid(self, form): + self.object = form.save(commit=False) + self.object.save(user=self.request.user) + messages.add_message(self.request, messages.SUCCESS, _('Daily report updated')) + return super(DailyReportUpdate, self).form_valid(form) + + def get_context_data(self, **kwargs): + context = super(DailyReportUpdate, self).get_context_data(**kwargs) + context['flagchanges'] = self.get_flagchanges() + return context + + def get_flagchanges(self): + obj = self.get_object() + data = models.FlagChange.objects.all() + data = data.filter( + observation_station=obj.observation_station) + data = data.filter( + date__gte=obj.date_observed) + data = data.filter( + date__lt=obj.date_observed + timedelta(days=1)) + data = data.order_by('-date') + return data + + +class DailyReportList(BasePageView, SingleTableView): + """List daily reports + """ + + table_class = tables.DailyReportTable + model = models.DailyReport + table_pagination = {"per_page": 50} + export_format = None + + @method_decorator(login_required) + def dispatch(self, request, *args, **kwargs): + if not request.user.has_perm('data.can_list_jellyfishobservations'): + raise PermissionDenied() + pk_route = kwargs.get('pk_route', None) + if pk_route: + self.route = models.ObservationRoute.objects.get(pk=pk_route) + # Check if user is member of a group in route groups (if it has any) + if not request.user.is_superuser and self.route.groups and\ + not (request.user.groups.all() & self.route.groups.all()): + raise PermissionDenied() + else: + self.route = None + self.form = forms.DailyReportFilterForm(self.request.GET, + user=request.user, + route=self.route) + # Get export_type + if "export" in request.POST or "export" in request.GET: + self.export_format = 'xlsx' + self.table_class = tables.DailyReportExportTable + + return super(DailyReportList, self).dispatch(request, *args, **kwargs) + + def get_table(self, **kwargs): + if self.route: + kwargs['route'] = self.route.pk + return super(DailyReportList, self).get_table(**kwargs) + + def get_table_data(self): + data = models.DailyReport.objects.all() + user = self.request.user + + # Filter observations + if not user.is_superuser and not user.is_staff: + data = data.filter(created_by=user) + if self.route: + data = data.filter( + observation_station__observation_route=self.route) + + if self.form.is_valid(): + if self.form.cleaned_data['route']: + data = data.filter( + observation_station__observation_route= + self.form.cleaned_data['route']) + if self.form.cleaned_data['route_type']: + data = data.filter( + observation_station__observation_route__route_type= + self.form.cleaned_data['route_type']) + if self.form.cleaned_data['station']: + data = data.filter( + observation_station=self.form.cleaned_data['station']) + if self.form.cleaned_data.get('created_by'): + data = data.filter( + created_by=self.form.cleaned_data['created_by']) + if self.form.cleaned_data.get('source'): + data = data.filter( + source__in=self.form.cleaned_data['source']) + if self.form.cleaned_data.get('from_date'): + data = data.filter( + date_observed__gte=self.form.cleaned_data['from_date']) + if self.form.cleaned_data.get('to_date'): + data = data.filter( + date_observed__lte=self.form.cleaned_data['to_date']) + data = data.order_by('-date_observed') + return data + + def get_context_data(self, **kwargs): + context = super(DailyReportList, self).get_context_data(**kwargs) + context['form'] = self.form + context['route'] = self.route + return context + + def export_data(self): + table = self.get_table() + return exporter.export_table(table, format=self.export_format) + + def render_to_response(self, context, **response_kwargs): + if self.export_format is not None: + return self.export_data() + return super( + DailyReportList, + self).render_to_response(context, **response_kwargs) + + +class FlagChangeMixin(BasePageView): + """ + Shared code for create or update FlagChange + """ + + model = models.FlagChange + + @method_decorator(login_required) + def dispatch(self, request, *args, **kwargs): + self.station = request.GET.get('station', None) + pk_route = kwargs.get('pk_route', None) + if pk_route: + self.route = models.ObservationRoute.objects.get(pk=pk_route) + # Check if user is member of a group in route groups (if it has any) + if not request.user.is_superuser and self.route.groups and\ + not (request.user.groups.all() & self.route.groups.all()): + raise PermissionDenied() + else: + self.route = None + + self.date = request.GET.get('date', None) + if self.date: + self.date = datetime.strptime(self.date, '%Y%m%d%H%M') + self.next_station = None + self.station_list = models.ObservationStation.objects.filter( + disabled=False, station_type='B') + if self.route: + self.station_list = self.station_list.filter(observation_route=self.route) + return super(FlagChangeMixin, self).dispatch(request, *args, **kwargs) + + def get_context_data(self, **kwargs): + context = super(FlagChangeMixin, self).get_context_data(**kwargs) + context['station_list'] = self.station_list + context['route'] = self.route + context['last_flagchanges'] = self.get_last_flagchanges() + return context + + def post(self, request, *args, **kwargs): + if "cancel" in request.POST: + url = self.get_success_url() + return HttpResponseRedirect(url) + return super(FlagChangeMixin, self).post(request, *args, **kwargs) + + def get_form_kwargs(self): + kwargs = super(FlagChangeMixin, self).get_form_kwargs() + kwargs['station'] = self.station + if self.route: + kwargs['route'] = self.route + return kwargs + + def get_success_url(self): + if self.next_station: + if self.route: + return "{url}?station={next_station}&date={date:%Y%m%d%H%M}".format( + url=reverse('data_route_flagchange_create', + args=[self.route.pk]), + next_station=self.next_station, + date=self.object.date) + return "{url}?station={next_station}&date={date:%Y%m%d%H%M}".format( + url=reverse('data_flagchange_create'), + next_station=self.next_station, + date=self.object.date) + if self.route: + return reverse('data_route_flagchange_list', args=[self.route.pk]) + return reverse('data_flagchange_list') + + def get_last_flagchanges(self): + if not self.route: + return None + + data = models.FlagChange.objects.all() + data = data.filter( + observation_station__observation_route=self.route) + data = data.order_by('-date')[:10] + return data + + +class FlagChangeCreate(FlagChangeMixin, CreateView): + """ + Create a new FlagChange + """ + + template_name_suffix = '_create' + form_class = forms.FlagChangeCreateForm + + def form_valid(self, form): + self.object = form.save(commit=False) + self.object.save(user=self.request.user) + # Notify that in messages area + messages.add_message(self.request, messages.SUCCESS, _('Flag change created')) + if 'continue' in form.data: + self.next_station = self.object.observation_station + + return super(FlagChangeCreate, self).form_valid(form) + + def get_initial(self): + initial = super(FlagChangeCreate, self).get_initial() + initial = initial.copy() + if self.date: + initial['date'] = self.date + else: + initial['date'] = datetime.now() + if len(self.station_list) == 1: + initial['observation_station'] = self.station_list[0] + return initial + + +class FlagChangeUpdate(FlagChangeMixin, UpdateView): + """ + Update FlagChange + """ + + template_name_suffix = '_update' + form_class = forms.FlagChangeUpdateForm + + def form_valid(self, form): + self.object = form.save(commit=False) + self.object.save(user=self.request.user) + messages.add_message(self.request, messages.SUCCESS, _('Flag Change updated')) + return super(FlagChangeUpdate, self).form_valid(form) + + +class FlagChangeDelete(FlagChangeMixin, DeleteView): + """ + Delete an FlagChange + """ + + template_name_suffix = '_delete' + + def delete(self, request, *args, **kwargs): + """ + Override delete method to add message + """ + self.object = self.get_object() + success_url = self.get_success_url() + messages.add_message(self.request, messages.SUCCESS, _('Flag change deleted')) + self.object.delete() + return HttpResponseRedirect(success_url) + + +class FlagChangeList(BasePageView, SingleTableView): + """List flags changes + """ + + table_class = tables.FlagChangeTable + model = models.FlagChange + table_pagination = {"per_page": 50} + export_format = None + + @method_decorator(login_required) + def dispatch(self, request, *args, **kwargs): + if not request.user.has_perm('data.can_list_jellyfishobservations'): + raise PermissionDenied() + pk_route = kwargs.get('pk_route', None) + if pk_route: + self.route = models.ObservationRoute.objects.get(pk=pk_route) + # Check if user is member of a group in route groups (if it has any) + if not request.user.is_superuser and self.route.groups and\ + not (request.user.groups.all() & self.route.groups.all()): + raise PermissionDenied() + else: + self.route = None + self.form = forms.DailyReportFilterForm(self.request.GET, + user=request.user, + route=self.route) + # Get export_type + if "export" in request.POST or "export" in request.GET: + self.export_format = 'xlsx' + self.table_class = tables.FlagChangeExportTable + + return super(FlagChangeList, self).dispatch(request, *args, **kwargs) + + def get_table(self, **kwargs): + if self.route: + kwargs['route'] = self.route.pk + return super(FlagChangeList, self).get_table(**kwargs) + + def get_table_data(self): + data = models.FlagChange.objects.all() + user = self.request.user + + # Filter observations + if not user.is_superuser and not user.is_staff: + data = data.filter(created_by=user) + if self.route: + data = data.filter( + observation_station__observation_route=self.route) + + if self.form.is_valid(): + if self.form.cleaned_data['route']: + data = data.filter( + observation_station__observation_route= + self.form.cleaned_data['route']) + if self.form.cleaned_data['route_type']: + data = data.filter( + observation_station__observation_route__route_type= + self.form.cleaned_data['route_type']) + if self.form.cleaned_data['station']: + data = data.filter( + observation_station=self.form.cleaned_data['station']) + if self.form.cleaned_data.get('created_by'): + data = data.filter( + created_by=self.form.cleaned_data['created_by']) + if self.form.cleaned_data.get('source'): + data = data.filter( + source__in=self.form.cleaned_data['source']) + if self.form.cleaned_data.get('from_date'): + data = data.filter( + date__gte=self.form.cleaned_data['from_date']) + if self.form.cleaned_data.get('to_date'): + data = data.filter( + date__lte=self.form.cleaned_data['to_date']) + data = data.order_by('-date') + return data + + def get_context_data(self, **kwargs): + context = super(FlagChangeList, self).get_context_data(**kwargs) + context['form'] = self.form + context['route'] = self.route + return context + + def export_data(self): + table = self.get_table() + return exporter.export_table(table, format=self.export_format) + + def render_to_response(self, context, **response_kwargs): + if self.export_format is not None: + return self.export_data() + return super( + FlagChangeList, + self).render_to_response(context, **response_kwargs) diff --git a/grumers/locale/ca/LC_MESSAGES/django.mo b/grumers/locale/ca/LC_MESSAGES/django.mo index 82189ab9a459c50372fe9f08308c69737321c61f..3ab91c2498fef95b513e4ec0fc08734098ef87f0 100644 GIT binary patch literal 11598 zcma)>f0Q0odB-mT0vjm>1ZgRHh0r9BH`#=QA0dfsk_}ndBx`=~ON7q8@9evi%scZk zGjGDGC@5H=7Fvr!r639jqO?M&{HWN{^`PxJlnUpx^$#ee2akUhwB@uGd+g_X=gzyc zo3(Y$KJRDlojdo(^E~&t_s+g@++m+LT+brEg)DrhF^3#t%+hx$*OEk`$15YA-GE_aQ;8M5| z4!|xv8h+ICW~ln_fGU3o@$hWO zpSj5M!|-I%UC68Ev+&*U9?t{tFw)c@{^1HJ)IgQw7l@`s?_+X7LM z*$VkHS9xZhpN2BY7oqg=AUqsC1~lTh`3466Jmq3XRE%3hy?dhZKR<9h(A{zp8YhSJaXp!)GcpMC`{B>g5-dnfQC zp2?5KJp}dM4ygB9Q2mMg^Xs7Ocq`Pn?t$-tPe7G>!Si1|{}ZZT3r;NUbP`lM4JbRV zhZ@fnP~*7@s{M{ne*$WJw?ei11*mqu3iaO8PbCfw55ISPki_+2-?G@D$QhQ1kH)xEDSSWjD)9>eo`JdRM`7;1E=MQ&9c99^z`| zcFzalQKX-Svgdc9n-@^^y$t1_uS3;){BM-?S*Urp2%ZU7!}DPP_1@i3_Id!Se-A_H z_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.po index 4b3ad79..347e0eb 100644 --- a/grumers/locale/ca/LC_MESSAGES/django.po +++ b/grumers/locale/ca/LC_MESSAGES/django.po @@ -7,17 +7,17 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-30 14:02+0200\n" -"PO-Revision-Date: 2014-05-30 14:07+0100\n" +"POT-Creation-Date: 2015-03-04 14:39+0100\n" +"PO-Revision-Date: 2015-03-04 15:06+0100\n" "Last-Translator: Biel Frontera \n" "Language-Team: LANGUAGE \n" -"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 1.5.4\n" -#: apps/data/forms.py:16 +#: apps/data/forms.py:16 apps/data/forms.py:312 apps/data/forms.py:407 msgid "Update" msgstr "Actualitza" @@ -29,44 +29,43 @@ msgstr "Omple espècie o posa la quantitat a zero" msgid "Fill quantity or set specie to none" msgstr "Indica la quantita o deixa la espècie buida" -#: apps/data/forms.py:49 +#: apps/data/forms.py:48 apps/data/forms.py:327 msgid "Sting incidents can not be greater than total incidents" msgstr "Els nombre de picades no pot ser major al total d'indidències" -#: apps/data/forms.py:63 +#: apps/data/forms.py:62 #, python-format msgid "%s observation" msgstr "%s observació" -#: apps/data/forms.py:69 +#: apps/data/forms.py:68 #, python-format msgid "%s Create observation and continue with next station" msgstr "%s Desa i segueix amb el següent punt" -#: apps/data/forms.py:76 -#: apps/data/forms.py:169 +#: apps/data/forms.py:75 apps/data/forms.py:169 apps/data/forms.py:355 +#: apps/data/forms.py:448 msgid "Cancel" msgstr "Cancel·la" -#: apps/data/forms.py:88 +#: apps/data/forms.py:87 apps/data/forms.py:367 apps/data/forms.py:462 msgid "When / Where" msgstr "Quan / On" -#: apps/data/forms.py:93 +#: apps/data/forms.py:92 msgid "Jellyfish observation" msgstr "Observació de grumers" -#: apps/data/forms.py:100 +#: apps/data/forms.py:99 apps/data/forms.py:372 msgid "Incidents during the day" msgstr "Indicències al llarg del dia" -#: apps/data/forms.py:118 -#: apps/data/models.py:199 -#: apps/data/models.py:249 +#: apps/data/forms.py:117 apps/data/models.py:215 apps/data/models.py:265 +#: apps/data/models.py:335 msgid "None" msgstr "Cap" -#: apps/data/forms.py:147 +#: apps/data/forms.py:147 apps/data/forms.py:400 apps/data/forms.py:502 msgid "Create" msgstr "Crea" @@ -86,11 +85,9 @@ msgstr "espècie" msgid "Specie: all" msgstr "Espècie: totes" -#: apps/data/forms.py:201 -#: apps/data/models.py:34 -#: apps/data/models.py:111 -#: apps/data/models.py:157 -#: apps/data/models.py:231 +#: apps/data/forms.py:201 apps/data/models.py:35 apps/data/models.py:118 +#: apps/data/models.py:169 apps/data/models.py:247 apps/data/models.py:352 +#: apps/data/models.py:400 msgid "created by" msgstr "creat per" @@ -98,43 +95,97 @@ msgstr "creat per" msgid "User: all" msgstr "Usuari: tots" -#: apps/data/forms.py:206 -#: apps/data/models.py:118 -#: apps/data/models.py:147 +#: apps/data/forms.py:206 apps/data/forms.py:272 apps/data/models.py:125 +#: apps/data/models.py:158 msgid "observation route" msgstr "ruta d'observació" -#: apps/data/forms.py:207 +#: apps/data/forms.py:207 apps/data/forms.py:273 msgid "Route: all" msgstr "Ruta: totes" -#: apps/data/forms.py:211 -#: apps/data/models.py:166 -#: apps/data/models.py:209 +#: apps/data/forms.py:210 apps/data/forms.py:276 +msgid "Route type: all" +msgstr "Tipus de ruta: totes" + +#: apps/data/forms.py:211 apps/data/forms.py:277 +msgid "observation route type" +msgstr "tipus de ruta" + +#: apps/data/forms.py:215 apps/data/models.py:178 apps/data/models.py:225 +#: apps/data/models.py:343 apps/data/models.py:386 msgid "observation station" msgstr "punt d'observació" -#: apps/data/forms.py:212 +#: apps/data/forms.py:216 msgid "Station: all" msgstr "Punts: tots" -#: apps/data/forms.py:215 -#: apps/data/models.py:217 +#: apps/data/forms.py:219 apps/data/models.py:233 apps/data/models.py:387 msgid "source" msgstr "font" -#: apps/data/forms.py:216 +#: apps/data/forms.py:220 msgid "from date" msgstr "des de data" -#: apps/data/forms.py:224 +#: apps/data/forms.py:221 +msgid "to date" +msgstr "fins a data" + +#: apps/data/forms.py:229 apps/data/forms.py:286 apps/data/forms.py:535 msgid "Filter" msgstr "Filtra" -#: apps/data/forms.py:230 +#: apps/data/forms.py:235 apps/data/forms.py:292 msgid "Export" msgstr "Exporta" +#: apps/data/forms.py:342 +#, python-format +msgid "%s daily report" +msgstr "%s informe diari" + +#: apps/data/forms.py:348 +#, python-format +msgid "%s Create report and continue with next station" +msgstr "%s Desa l'infome i segueix amb el següent punt" + +#: apps/data/forms.py:425 +#, python-format +msgid "%s flag change" +msgstr "%s canvi de bandera" + +#: apps/data/forms.py:431 +#, python-format +msgid "%s Create flag change and continue" +msgstr "%s Crea el canvi de bandera i continua" + +#: apps/data/forms.py:467 templates/data/dailyreport_update.html:31 +#: templates/data/flagchange_update.html:31 +msgid "Flag" +msgstr "Bandera" + +#: apps/data/forms.py:511 apps/data/forms.py:525 +msgid "Municipality: all" +msgstr "Municipi: tots" + +#: apps/data/forms.py:516 +msgid "Name" +msgstr "Nom" + +#: apps/data/forms.py:520 +msgid "Island: all" +msgstr "Illa: totes" + +#: apps/data/forms.py:521 +msgid "Island" +msgstr "Illa" + +#: apps/data/forms.py:526 +msgid "Municipality" +msgstr "Municipi" + #: apps/data/models.py:21 msgid "scientific name" msgstr "nom científic" @@ -147,13 +198,11 @@ msgstr "nom comú" msgid "slug" msgstr "slug" -#: apps/data/models.py:25 -#: apps/data/models.py:96 +#: apps/data/models.py:25 apps/data/models.py:101 msgid "description" msgstr "descripció" -#: apps/data/models.py:26 -#: apps/data/models.py:214 +#: apps/data/models.py:26 apps/data/models.py:230 msgid "picture" msgstr "fotografia" @@ -161,220 +210,281 @@ msgstr "fotografia" msgid "display order" msgstr "Ordre visualització" -#: apps/data/models.py:31 -#: apps/data/models.py:108 -#: apps/data/models.py:154 -#: apps/data/models.py:228 +#: apps/data/models.py:30 apps/data/models.py:113 apps/data/models.py:164 +msgid "disabled" +msgstr "deshabilitat" + +#: apps/data/models.py:32 apps/data/models.py:115 apps/data/models.py:166 +#: apps/data/models.py:244 apps/data/models.py:349 apps/data/models.py:397 msgid "date added" msgstr "afegit en data" -#: apps/data/models.py:35 -#: apps/data/models.py:112 -#: apps/data/models.py:158 -#: apps/data/models.py:232 +#: apps/data/models.py:36 apps/data/models.py:119 apps/data/models.py:170 +#: apps/data/models.py:248 apps/data/models.py:353 apps/data/models.py:401 msgid "date modified" msgstr "modificat en data" -#: apps/data/models.py:38 -#: apps/data/models.py:115 -#: apps/data/models.py:161 -#: apps/data/models.py:235 +#: apps/data/models.py:39 apps/data/models.py:122 apps/data/models.py:173 +#: apps/data/models.py:251 apps/data/models.py:356 apps/data/models.py:404 msgid "update by" msgstr "actualitzat per" -#: apps/data/models.py:41 -#: apps/data/models.py:212 +#: apps/data/models.py:42 apps/data/models.py:228 msgid "jellyfish specie" msgstr "espècie de grumer" -#: apps/data/models.py:42 -#: templates/_header_nav.html:38 +#: apps/data/models.py:43 templates/_header_nav.html:38 msgid "jellyfish species" msgstr "espècies de grumers" -#: apps/data/models.py:79 +#: apps/data/models.py:84 msgid "Mallorca" msgstr "Mallorca" -#: apps/data/models.py:80 +#: apps/data/models.py:85 msgid "Menorca" msgstr "Menorca" -#: apps/data/models.py:81 +#: apps/data/models.py:86 msgid "Eivissa" msgstr "Eivissa" -#: apps/data/models.py:82 +#: apps/data/models.py:87 msgid "Formentera" msgstr "Formentera" -#: apps/data/models.py:88 +#: apps/data/models.py:93 msgid "Marine reserve" msgstr "Reserva marina" -#: apps/data/models.py:89 +#: apps/data/models.py:94 msgid "Cleaning route" msgstr "Ruta de neteja" -#: apps/data/models.py:90 +#: apps/data/models.py:95 msgid "Beach watching" msgstr "Vigilància platja" -#: apps/data/models.py:93 -#: apps/data/models.py:145 +#: apps/data/models.py:98 apps/data/models.py:156 msgid "name" msgstr "nom" -#: apps/data/models.py:94 +#: apps/data/models.py:99 msgid "code" msgstr "codi" -#: apps/data/models.py:97 -#: apps/data/models.py:150 +#: apps/data/models.py:102 apps/data/models.py:161 msgid "type" msgstr "tipus" -#: apps/data/models.py:100 +#: apps/data/models.py:105 +msgid "use incident form" +msgstr "utilitza formulari incidències diàries" + +#: apps/data/models.py:106 msgid "island" msgstr "illa" -#: apps/data/models.py:103 +#: apps/data/models.py:109 msgid "municipality" msgstr "municipi" -#: apps/data/models.py:105 -#: apps/web/models.py:17 +#: apps/data/models.py:111 apps/web/models.py:17 msgid "user groups allowed" msgstr "grups amb permís" -#: apps/data/models.py:119 -#: templates/_header_nav.html:39 +#: apps/data/models.py:126 templates/_header_nav.html:39 msgid "observation routes" msgstr "rutes d'observació" -#: apps/data/models.py:139 +#: apps/data/models.py:150 msgid "High sea" msgstr "A la mar" -#: apps/data/models.py:140 +#: apps/data/models.py:151 msgid "Offshore - 200 m" msgstr "Fora de la costa - 200m" -#: apps/data/models.py:141 +#: apps/data/models.py:152 msgid "Nearshore - 100 m" msgstr "A prop de la costa - 100m" -#: apps/data/models.py:142 +#: apps/data/models.py:153 msgid "Beach shore" msgstr "Platja" -#: apps/data/models.py:148 +#: apps/data/models.py:159 msgid "order in route" msgstr "ordre a la ruta" -#: apps/data/models.py:149 +#: apps/data/models.py:160 msgid "position" msgstr "localització" -#: apps/data/models.py:167 -#: templates/_header_nav.html:40 +#: apps/data/models.py:179 templates/_header_nav.html:40 msgid "observation stations" msgstr "punts d'observació" -#: apps/data/models.py:192 +#: apps/data/models.py:208 apps/data/models.py:379 msgid "Web Form" msgstr "Formulari web" -#: apps/data/models.py:193 +#: apps/data/models.py:209 msgid "Web Form (Bulk)" msgstr "Formulari web (massiva)" -#: apps/data/models.py:194 +#: apps/data/models.py:210 apps/data/models.py:380 msgid "API" msgstr "API" -#: apps/data/models.py:195 +#: apps/data/models.py:211 apps/data/models.py:381 msgid "Bulk upload" msgstr "Importació massiva" -#: apps/data/models.py:200 +#: apps/data/models.py:216 msgid "One" msgstr "Una" -#: apps/data/models.py:201 +#: apps/data/models.py:217 msgid "2 to 5" msgstr "2 a 5" -#: apps/data/models.py:202 +#: apps/data/models.py:218 msgid "6 to 10" msgstr "6 a 10" -#: apps/data/models.py:203 +#: apps/data/models.py:219 msgid "11 to 99" msgstr "11 a 99" -#: apps/data/models.py:204 +#: apps/data/models.py:220 msgid "100 or more" msgstr "100 o més" -#: apps/data/models.py:207 +#: apps/data/models.py:223 msgid "observation date and time" msgstr "data i hora observació" -#: apps/data/models.py:213 +#: apps/data/models.py:229 msgid "quantity observed" msgstr "quantitat observada" -#: apps/data/models.py:220 +#: apps/data/models.py:236 msgid "remarks" msgstr "comentaris" -#: apps/data/models.py:222 +#: apps/data/models.py:238 apps/data/models.py:391 msgid "total sting incidents" msgstr "Picades totals" -#: apps/data/models.py:225 +#: apps/data/models.py:241 apps/data/models.py:394 msgid "total incidents" msgstr "Incidències totals" -#: apps/data/models.py:238 +#: apps/data/models.py:254 msgid "jellyfish observation" msgstr "observació de grumers" -#: apps/data/models.py:239 +#: apps/data/models.py:255 msgid "jellyfish observations" msgstr "observacions de grumers" +#: apps/data/models.py:336 +msgid "Red" +msgstr "Vermella" + +#: apps/data/models.py:337 +msgid "Yellow" +msgstr "Groga" + +#: apps/data/models.py:338 +msgid "Green" +msgstr "Verda" + +#: apps/data/models.py:341 +msgid "date and time" +msgstr "Data i hora" + +#: apps/data/models.py:344 +msgid "flag status" +msgstr "estat de la bandera" + +#: apps/data/models.py:347 +msgid "jellyfish flag" +msgstr "Bandera de grumers" + +#: apps/data/models.py:359 templates/data/dailyreport_update.html:41 +#: templates/data/flagchange_list.html:26 +#: templates/data/flagchange_list.html:28 +msgid "flag change" +msgstr "canvi de bandera" + +#: apps/data/models.py:360 +msgid "flag changes" +msgstr "canvis de bandera" + +#: apps/data/models.py:384 +msgid "date" +msgstr "data" + +#: apps/data/models.py:407 apps/data/models.py:408 +#: templates/data/dailyreport_list.html:26 +#: templates/data/dailyreport_list.html:28 +msgid "daily report" +msgstr "informe diari" + #: apps/data/tables.py:132 -#: apps/data/tables.py:165 msgid "create observation" msgstr "crea observació" #: apps/data/tables.py:140 -#: apps/data/tables.py:173 msgid "create bulk no-observations" msgstr "crea no-observacions massives" +#: apps/data/tables.py:187 +msgid "actions" +msgstr "accions" + #: apps/data/views.py:101 msgid "Observation created" msgstr "Observació creada" -#: apps/data/views.py:138 +#: apps/data/views.py:139 msgid "Observation updated" msgstr "Observació actualitzada" -#: apps/data/views.py:159 +#: apps/data/views.py:160 msgid "Route reference missed" msgstr "Falta la referència de la ruta" -#: apps/data/views.py:205 +#: apps/data/views.py:206 msgid "Observations created" msgstr "Observacions creades" -#: apps/data/views.py:230 +#: apps/data/views.py:231 msgid "Observation deleted" msgstr "Observació esborrada" +#: apps/data/views.py:598 +msgid "Daily report created" +msgstr "Informe diari creat" + +#: apps/data/views.py:635 +msgid "Daily report updated" +msgstr "Informe diari actualitzat" + +#: apps/data/views.py:838 +msgid "Flag change created" +msgstr "Canvi de bandera creat" + +#: apps/data/views.py:867 +msgid "Flag Change updated" +msgstr "Canvi de bandera actualitzat" + +#: apps/data/views.py:884 +msgid "Flag change deleted" +msgstr "Canvi de bandera esborrat" + #: apps/web/forms.py:10 msgid "first name" msgstr "nom" @@ -444,7 +554,7 @@ msgstr "la pàgina és només un contenidor" msgid "Page not found" msgstr "Pàgina no trobada" -#: apps/web/views.py:100 +#: apps/web/views.py:106 msgid "Profile updated" msgstr "Perfil actualitzat" @@ -488,8 +598,7 @@ msgstr "Modifica el perfil" msgid "Logout" msgstr "Surt" -#: templates/_header_nav.html:59 -#: templates/registration/login.html:9 +#: templates/_header_nav.html:59 templates/registration/login.html:9 #: templates/registration/login.html:39 msgid "Login" msgstr "Identificació" @@ -498,6 +607,95 @@ msgstr "Identificació" msgid "Change language" msgstr "Canvia l'idioma" +#: templates/data/dailyreport_create.html:5 +#: templates/data/dailyreport_create.html:8 +msgid "Create Daily Report" +msgstr "Crea Informe Diari" + +#: templates/data/dailyreport_list.html:6 +#: templates/data/dailyreport_list.html:9 +msgid "Daily Report List" +msgstr "Llista d'informes diaris" + +#: templates/data/dailyreport_list.html:23 +msgid "No reports found" +msgstr "No s'ha trobat cap informe" + +#: templates/data/dailyreport_list.html:26 +#: templates/data/dailyreport_list.html:28 +#: templates/data/dailyreport_update.html:41 +#: templates/data/flagchange_list.html:26 +#: templates/data/flagchange_list.html:28 +#: templates/data/jellyfishobservation_list.html:28 +#: templates/data/jellyfishobservation_list.html:31 +msgid "Add" +msgstr "Afegeix" + +#: templates/data/dailyreport_update.html:8 +#: templates/data/dailyreport_update.html:11 +msgid "Update Daily Report" +msgstr "Actualitza Informe Diari" + +#: templates/data/dailyreport_update.html:23 +#: templates/data/flagchange_update.html:23 +#: templates/data/jellyfishobservation_update.html:23 +msgid "Map" +msgstr "Mapa" + +#: templates/data/dailyreport_update.html:29 +msgid "Flag changes" +msgstr "Canvis de bandera" + +#: templates/data/dailyreport_update.html:31 +#: templates/data/flagchange_update.html:31 +msgid "Date" +msgstr "Data" + +#: templates/data/dailyreport_update.html:31 +#: templates/data/flagchange_update.html:31 +msgid "Station" +msgstr "Punt" + +#: templates/data/dailyreport_update.html:31 +#: templates/data/flagchange_update.html:31 +msgid "Jellyfish flag" +msgstr "Bandera de grumers" + +#: templates/data/flagchange_create.html:5 +#: templates/data/flagchange_create.html:8 +msgid "Create Flag Change" +msgstr "Crea canvi de bandera" + +#: templates/data/flagchange_delete.html:4 +#: templates/data/flagchange_delete.html:7 +msgid "Delete Flag Change" +msgstr "Esborra canvi de bandera" + +#: templates/data/flagchange_delete.html:16 +msgid "Are you sure you want to delete this record?" +msgstr "Estau segurs que voleu esborrar aquest registre?" + +#: templates/data/flagchange_delete.html:17 +msgid "Yes, I'm Sure" +msgstr "Sí, estic segur" + +#: templates/data/flagchange_list.html:6 templates/data/flagchange_list.html:9 +msgid "Flag Change List" +msgstr "Llista de canvis de bandera" + +#: templates/data/flagchange_list.html:23 +msgid "No flag changes found" +msgstr "No s'han trobat canvis de bandera" + +#: templates/data/flagchange_update.html:8 +#: templates/data/flagchange_update.html:11 +msgid "Update Flag Change" +msgstr "Actualitza Canvi de Bandera" + +#: templates/data/flagchange_update.html:29 +msgid "Latest flag changes" +msgstr "Darrers canvis de bandera" + #: templates/data/jellyfishobservation_bulkcreate.html:6 #: templates/data/jellyfishobservation_bulkcreate.html:9 msgid "Create Bulk Observations" @@ -539,11 +737,6 @@ msgstr "Llista d'observacions" msgid "Show observation heatmap" msgstr "Mostra mapa de calor" -#: templates/data/jellyfishobservation_list.html:28 -#: templates/data/jellyfishobservation_list.html:31 -msgid "Add" -msgstr "Afegeix" - #: templates/data/jellyfishobservation_list.html:28 #: templates/data/jellyfishobservation_list.html:31 msgid "observation" @@ -563,10 +756,6 @@ msgstr "Mapa de les observacions" msgid "Update Observation" msgstr "Actualitza observació" -#: templates/data/jellyfishobservation_update.html:23 -msgid "Map" -msgstr "Mapa" - #: templates/data/jellyfishobservation_update.html:27 msgid "Picture" msgstr "Fotografia" @@ -581,6 +770,29 @@ msgstr "Llista de platges" msgid "Route List" msgstr "Llista de rutes" +#: templates/data/observationstation_list.html:6 +#: templates/data/observationstation_list.html:9 +msgid "Observation Station List" +msgstr "Llista de punts d'observació" + +#: templates/data/observationstation_list.html:19 +msgid "Show observation station map" +msgstr "Mostra el mapa de punts d'observació" + +#: templates/data/observationstation_list.html:24 +#: templates/data/observationstation_map.html:25 +msgid "No stations found" +msgstr "No s'ha trobat cap punt d'observació" + +#: templates/data/observationstation_map.html:7 +#: templates/data/observationstation_map.html:10 +msgid "Observation Station Map" +msgstr "Mapa de punts d'observació" + +#: templates/data/observationstation_map.html:20 +msgid "Show observation station list" +msgstr "Mostra la llista de punts d'observació" + #: templates/password_reset/recovery_form.html:4 msgid "Password recovery" msgstr "Recupera la contrasenya" @@ -596,8 +808,12 @@ msgstr "Nova contrasenya" #: templates/password_reset/reset.html:8 #, python-format -msgid "Sorry, this password reset link is invalid. You can still request a new one." -msgstr "Aquest enllaç per crear una nova contrasenya és invàlid. torna a sol·licitar la contrasenya." +msgid "" +"Sorry, this password reset link is invalid. You can still request a new one." +msgstr "" +"Aquest enllaç per crear una nova contrasenya és invàlid. torna a sol·licitar la contrasenya." #: templates/password_reset/reset.html:12 #, python-format @@ -614,7 +830,9 @@ msgstr "Benvingut/da a l'aplicació d'observació de grumers" #: templates/registration/login.html:13 msgid "Your username and password did not match. Please try again." -msgstr "L'usuari i contrasenya no són correctes. Prova una altra vegada o contacta l'administrador de l'aplicació" +msgstr "" +"L'usuari i contrasenya no són correctes. Prova una altra vegada o contacta " +"l'administrador de l'aplicació" #: templates/web/home.html:5 msgid "Home" diff --git a/grumers/locale/es/LC_MESSAGES/django.mo b/grumers/locale/es/LC_MESSAGES/django.mo index 5e00d76521dcca629009b9e37fffb1568796b44a..e559e472bef7d1ed11fc00f8793808f6b98175aa 100644 GIT binary patch literal 11789 zcma)>3y>T~dB@vWAalYH>=*-zlfe%xVcqFYNJg9<_UUwb7(Fg0$p#Zl=62`yMw*>j z&+O`ae&OKQ!G@T`7-Q_%vFsQJj0na&g?S!WVCug8&Ghv1`@a6Vd+vv4EqS-$`U3I?$c4`{=Csp{S@i;?8Z-QR#+(mF;99sJ zu7-EOrSMbmMeqyoh45RR$Kf)bpM__@UqY%jOJ3~CErX}?e75Jg@TEL2hpJ~STm{GB z0BpfC;SHX5K-K>qsQiyY_2(l#{TNhxUxw=6*Wt_I51{h@+;iz!F5gR_+CLAT4KIcK znJYZs1ef#Nf)q9HfWHqP@_Y&|;rX8+f9C7_s6WS{`tc(;2%m))!1HKC>0?mkc0g2Q zc0>NmHJ-WW?NBDUA4(sO!{@?}z;XCVC_VoQs=nvaIgMuks@w%o?F~ce?KMz(7>DP; zDM(Q>3svupQ2E~qRqq{8_PQIY+`Uladkm`nqn^j0^z#*{etgeA{}5it^G~4KJBJ_f z5`Hx9F{pA=Q03}S{fYhio1pA?7u2{Og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pwGf64wxmh)P1Yt|zV|@`*MgOcW8<5~~Qk;b#&(go<8Jl@3CG zYW1b4td22q)Yo*LJ1^E=>Frio7h~jj3&#SYj#xkhh(bc;#u(;Yv`dp_+gFm}?a`!W z+d1Jq8%!>;-y}ENmr~Z+hSc=LNNc#m)J9q(J>7O^>cqrwFzDUj^ZUvw+w5nlbH+xN zcZJsU+Qx}X?cs^Tb||gT{+_nkKA*nP&dI2?Pi1u3nVGHj(agH|?vT$5217xcl{Lwp zmsMcvp=-g=ghQ2Ic-&y{y>$#B0&Guf%4Koc_5Imq~6~U>J4{=BOU$) zUU#V4R~{%kvE6Ljl)EgU*6V2P@mjfU_vLP}npV!`PpDUSazbXmX`qB)$uJq%<$n>N*+vl&gzxcEN1HIXK AEdT%j diff --git a/grumers/locale/es/LC_MESSAGES/django.po b/grumers/locale/es/LC_MESSAGES/django.po index 9a9c0d2..34644d9 100644 --- a/grumers/locale/es/LC_MESSAGES/django.po +++ b/grumers/locale/es/LC_MESSAGES/django.po @@ -7,17 +7,17 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-05-30 14:02+0200\n" -"PO-Revision-Date: 2014-05-30 14:09+0100\n" +"POT-Creation-Date: 2015-03-04 14:40+0100\n" +"PO-Revision-Date: 2015-03-04 15:05+0100\n" "Last-Translator: Biel Frontera \n" "Language-Team: LANGUAGE \n" -"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 1.5.4\n" -#: apps/data/forms.py:16 +#: apps/data/forms.py:16 apps/data/forms.py:312 apps/data/forms.py:407 msgid "Update" msgstr "Actualiza" @@ -29,44 +29,43 @@ msgstr "Informa la especie de medusa o deja la cantidad a cero" msgid "Fill quantity or set specie to none" msgstr "Indica la cantidad o deja en blanco la especie" -#: apps/data/forms.py:49 +#: apps/data/forms.py:48 apps/data/forms.py:327 msgid "Sting incidents can not be greater than total incidents" msgstr "El número de picaduras no puede ser mayor que el total de incidencias" -#: apps/data/forms.py:63 +#: apps/data/forms.py:62 #, python-format msgid "%s observation" msgstr "%s observación" -#: apps/data/forms.py:69 +#: apps/data/forms.py:68 #, python-format msgid "%s Create observation and continue with next station" msgstr "%s Guarda y pasa al siguiente punto" -#: apps/data/forms.py:76 -#: apps/data/forms.py:169 +#: apps/data/forms.py:75 apps/data/forms.py:169 apps/data/forms.py:355 +#: apps/data/forms.py:448 msgid "Cancel" msgstr "Cancela" -#: apps/data/forms.py:88 +#: apps/data/forms.py:87 apps/data/forms.py:367 apps/data/forms.py:462 msgid "When / Where" msgstr "Cuándo / Dónde" -#: apps/data/forms.py:93 +#: apps/data/forms.py:92 msgid "Jellyfish observation" msgstr "Observación de medusas" -#: apps/data/forms.py:100 +#: apps/data/forms.py:99 apps/data/forms.py:372 msgid "Incidents during the day" msgstr "Incidencias al largo del día" -#: apps/data/forms.py:118 -#: apps/data/models.py:199 -#: apps/data/models.py:249 +#: apps/data/forms.py:117 apps/data/models.py:215 apps/data/models.py:265 +#: apps/data/models.py:335 msgid "None" msgstr "Ninguna" -#: apps/data/forms.py:147 +#: apps/data/forms.py:147 apps/data/forms.py:400 apps/data/forms.py:502 msgid "Create" msgstr "Crea" @@ -86,11 +85,9 @@ msgstr "especie" msgid "Specie: all" msgstr "Especie: todas" -#: apps/data/forms.py:201 -#: apps/data/models.py:34 -#: apps/data/models.py:111 -#: apps/data/models.py:157 -#: apps/data/models.py:231 +#: apps/data/forms.py:201 apps/data/models.py:35 apps/data/models.py:118 +#: apps/data/models.py:169 apps/data/models.py:247 apps/data/models.py:352 +#: apps/data/models.py:400 msgid "created by" msgstr "creado por" @@ -98,43 +95,97 @@ msgstr "creado por" msgid "User: all" msgstr "Usuario: todos" -#: apps/data/forms.py:206 -#: apps/data/models.py:118 -#: apps/data/models.py:147 +#: apps/data/forms.py:206 apps/data/forms.py:272 apps/data/models.py:125 +#: apps/data/models.py:158 msgid "observation route" msgstr "ruta de observación" -#: apps/data/forms.py:207 +#: apps/data/forms.py:207 apps/data/forms.py:273 msgid "Route: all" msgstr "Ruta: todas" -#: apps/data/forms.py:211 -#: apps/data/models.py:166 -#: apps/data/models.py:209 +#: apps/data/forms.py:210 apps/data/forms.py:276 +msgid "Route type: all" +msgstr "Tipo de ruta: todas" + +#: apps/data/forms.py:211 apps/data/forms.py:277 +msgid "observation route type" +msgstr "tipo de ruta de observación" + +#: apps/data/forms.py:215 apps/data/models.py:178 apps/data/models.py:225 +#: apps/data/models.py:343 apps/data/models.py:386 msgid "observation station" msgstr "punto de observación" -#: apps/data/forms.py:212 +#: apps/data/forms.py:216 msgid "Station: all" msgstr "Puntos: todos" -#: apps/data/forms.py:215 -#: apps/data/models.py:217 +#: apps/data/forms.py:219 apps/data/models.py:233 apps/data/models.py:387 msgid "source" msgstr "fuente" -#: apps/data/forms.py:216 +#: apps/data/forms.py:220 msgid "from date" msgstr "desde fecha" -#: apps/data/forms.py:224 +#: apps/data/forms.py:221 +msgid "to date" +msgstr "hasta fecha" + +#: apps/data/forms.py:229 apps/data/forms.py:286 apps/data/forms.py:535 msgid "Filter" msgstr "Filtra" -#: apps/data/forms.py:230 +#: apps/data/forms.py:235 apps/data/forms.py:292 msgid "Export" msgstr "Exporta" +#: apps/data/forms.py:342 +#, python-format +msgid "%s daily report" +msgstr "%s informe diario" + +#: apps/data/forms.py:348 +#, python-format +msgid "%s Create report and continue with next station" +msgstr "%s Guarda el informe y pasa al siguiente punto" + +#: apps/data/forms.py:425 +#, python-format +msgid "%s flag change" +msgstr "%s cambio de bandera" + +#: apps/data/forms.py:431 +#, python-format +msgid "%s Create flag change and continue" +msgstr "%s Crea el cambio de bandera y continúa" + +#: apps/data/forms.py:467 templates/data/dailyreport_update.html:31 +#: templates/data/flagchange_update.html:31 +msgid "Flag" +msgstr "Bandera" + +#: apps/data/forms.py:511 apps/data/forms.py:525 +msgid "Municipality: all" +msgstr "Municipio: todos" + +#: apps/data/forms.py:516 +msgid "Name" +msgstr "Nombre" + +#: apps/data/forms.py:520 +msgid "Island: all" +msgstr "Isla: todas" + +#: apps/data/forms.py:521 +msgid "Island" +msgstr "Isla" + +#: apps/data/forms.py:526 +msgid "Municipality" +msgstr "Municipio" + #: apps/data/models.py:21 msgid "scientific name" msgstr "nombre científico" @@ -147,13 +198,11 @@ msgstr "nombre común" msgid "slug" msgstr "slug" -#: apps/data/models.py:25 -#: apps/data/models.py:96 +#: apps/data/models.py:25 apps/data/models.py:101 msgid "description" msgstr "descripción" -#: apps/data/models.py:26 -#: apps/data/models.py:214 +#: apps/data/models.py:26 apps/data/models.py:230 msgid "picture" msgstr "fotografía" @@ -161,220 +210,281 @@ msgstr "fotografía" msgid "display order" msgstr "Orden visualización" -#: apps/data/models.py:31 -#: apps/data/models.py:108 -#: apps/data/models.py:154 -#: apps/data/models.py:228 +#: apps/data/models.py:30 apps/data/models.py:113 apps/data/models.py:164 +msgid "disabled" +msgstr "deshabilitado" + +#: apps/data/models.py:32 apps/data/models.py:115 apps/data/models.py:166 +#: apps/data/models.py:244 apps/data/models.py:349 apps/data/models.py:397 msgid "date added" msgstr "fecha alta" -#: apps/data/models.py:35 -#: apps/data/models.py:112 -#: apps/data/models.py:158 -#: apps/data/models.py:232 +#: apps/data/models.py:36 apps/data/models.py:119 apps/data/models.py:170 +#: apps/data/models.py:248 apps/data/models.py:353 apps/data/models.py:401 msgid "date modified" msgstr "fecha modificación" -#: apps/data/models.py:38 -#: apps/data/models.py:115 -#: apps/data/models.py:161 -#: apps/data/models.py:235 +#: apps/data/models.py:39 apps/data/models.py:122 apps/data/models.py:173 +#: apps/data/models.py:251 apps/data/models.py:356 apps/data/models.py:404 msgid "update by" msgstr "actualizado por" -#: apps/data/models.py:41 -#: apps/data/models.py:212 +#: apps/data/models.py:42 apps/data/models.py:228 msgid "jellyfish specie" msgstr "especie de medusa" -#: apps/data/models.py:42 -#: templates/_header_nav.html:38 +#: apps/data/models.py:43 templates/_header_nav.html:38 msgid "jellyfish species" msgstr "especies de medusa" -#: apps/data/models.py:79 +#: apps/data/models.py:84 msgid "Mallorca" -msgstr "" +msgstr "Mallorca" -#: apps/data/models.py:80 +#: apps/data/models.py:85 msgid "Menorca" -msgstr "" +msgstr "Menorca" -#: apps/data/models.py:81 +#: apps/data/models.py:86 msgid "Eivissa" -msgstr "" +msgstr "Eivissa" -#: apps/data/models.py:82 +#: apps/data/models.py:87 msgid "Formentera" -msgstr "" +msgstr "Formentera" -#: apps/data/models.py:88 +#: apps/data/models.py:93 msgid "Marine reserve" msgstr "Reserva marina" -#: apps/data/models.py:89 +#: apps/data/models.py:94 msgid "Cleaning route" msgstr "Ruta de limpieza" -#: apps/data/models.py:90 +#: apps/data/models.py:95 msgid "Beach watching" msgstr "Vigilancia playa" -#: apps/data/models.py:93 -#: apps/data/models.py:145 +#: apps/data/models.py:98 apps/data/models.py:156 msgid "name" msgstr "nombre" -#: apps/data/models.py:94 +#: apps/data/models.py:99 msgid "code" msgstr "código" -#: apps/data/models.py:97 -#: apps/data/models.py:150 +#: apps/data/models.py:102 apps/data/models.py:161 msgid "type" msgstr "tipo" -#: apps/data/models.py:100 +#: apps/data/models.py:105 +msgid "use incident form" +msgstr "utiliza el formulario de incidencias diarias" + +#: apps/data/models.py:106 msgid "island" msgstr "isla" -#: apps/data/models.py:103 +#: apps/data/models.py:109 msgid "municipality" msgstr "municipio" -#: apps/data/models.py:105 -#: apps/web/models.py:17 +#: apps/data/models.py:111 apps/web/models.py:17 msgid "user groups allowed" msgstr "grupos permitidos" -#: apps/data/models.py:119 -#: templates/_header_nav.html:39 +#: apps/data/models.py:126 templates/_header_nav.html:39 msgid "observation routes" msgstr "rutas de observación" -#: apps/data/models.py:139 +#: apps/data/models.py:150 msgid "High sea" msgstr "En el mar" -#: apps/data/models.py:140 +#: apps/data/models.py:151 msgid "Offshore - 200 m" msgstr "Lejos de la costa - 200m" -#: apps/data/models.py:141 +#: apps/data/models.py:152 msgid "Nearshore - 100 m" msgstr "Cerca de la costa - 100m" -#: apps/data/models.py:142 +#: apps/data/models.py:153 msgid "Beach shore" msgstr "Orilla (Playa)" -#: apps/data/models.py:148 +#: apps/data/models.py:159 msgid "order in route" msgstr "orden en la ruta" -#: apps/data/models.py:149 +#: apps/data/models.py:160 msgid "position" msgstr "posición" -#: apps/data/models.py:167 -#: templates/_header_nav.html:40 +#: apps/data/models.py:179 templates/_header_nav.html:40 msgid "observation stations" msgstr "punto de observación" -#: apps/data/models.py:192 +#: apps/data/models.py:208 apps/data/models.py:379 msgid "Web Form" msgstr "Formulario web" -#: apps/data/models.py:193 +#: apps/data/models.py:209 msgid "Web Form (Bulk)" msgstr "Formulario web (masiva)" -#: apps/data/models.py:194 +#: apps/data/models.py:210 apps/data/models.py:380 msgid "API" msgstr "API" -#: apps/data/models.py:195 +#: apps/data/models.py:211 apps/data/models.py:381 msgid "Bulk upload" msgstr "importación masiva" -#: apps/data/models.py:200 +#: apps/data/models.py:216 msgid "One" msgstr "Una" -#: apps/data/models.py:201 +#: apps/data/models.py:217 msgid "2 to 5" msgstr "2 hasta 5" -#: apps/data/models.py:202 +#: apps/data/models.py:218 msgid "6 to 10" msgstr "6 hasta 10" -#: apps/data/models.py:203 +#: apps/data/models.py:219 msgid "11 to 99" msgstr "11 hasta 99" -#: apps/data/models.py:204 +#: apps/data/models.py:220 msgid "100 or more" msgstr "100 o más" -#: apps/data/models.py:207 +#: apps/data/models.py:223 msgid "observation date and time" msgstr "fecha y hora observación" -#: apps/data/models.py:213 +#: apps/data/models.py:229 msgid "quantity observed" msgstr "cantidad observada" -#: apps/data/models.py:220 +#: apps/data/models.py:236 msgid "remarks" msgstr "comentarios" -#: apps/data/models.py:222 +#: apps/data/models.py:238 apps/data/models.py:391 msgid "total sting incidents" msgstr "picaduras totales" -#: apps/data/models.py:225 +#: apps/data/models.py:241 apps/data/models.py:394 msgid "total incidents" msgstr "incidentes totales" -#: apps/data/models.py:238 +#: apps/data/models.py:254 msgid "jellyfish observation" msgstr "observación de medusas" -#: apps/data/models.py:239 +#: apps/data/models.py:255 msgid "jellyfish observations" msgstr "observaciones de medusas" +#: apps/data/models.py:336 +msgid "Red" +msgstr "Roja" + +#: apps/data/models.py:337 +msgid "Yellow" +msgstr "Amarilla" + +#: apps/data/models.py:338 +msgid "Green" +msgstr "Verde" + +#: apps/data/models.py:341 +msgid "date and time" +msgstr "fecha y hora" + +#: apps/data/models.py:344 +msgid "flag status" +msgstr "estado de la bandera" + +#: apps/data/models.py:347 +msgid "jellyfish flag" +msgstr "bandera de medusas" + +#: apps/data/models.py:359 templates/data/dailyreport_update.html:41 +#: templates/data/flagchange_list.html:26 +#: templates/data/flagchange_list.html:28 +msgid "flag change" +msgstr "cambio de bandera" + +#: apps/data/models.py:360 +msgid "flag changes" +msgstr "cambios de bandera" + +#: apps/data/models.py:384 +msgid "date" +msgstr "fecha" + +#: apps/data/models.py:407 apps/data/models.py:408 +#: templates/data/dailyreport_list.html:26 +#: templates/data/dailyreport_list.html:28 +msgid "daily report" +msgstr "informe diario" + #: apps/data/tables.py:132 -#: apps/data/tables.py:165 msgid "create observation" msgstr "Crea observación" #: apps/data/tables.py:140 -#: apps/data/tables.py:173 msgid "create bulk no-observations" msgstr "Crea no-observaciones masivas" +#: apps/data/tables.py:187 +msgid "actions" +msgstr "acciones" + #: apps/data/views.py:101 msgid "Observation created" msgstr "Observación creada" -#: apps/data/views.py:138 +#: apps/data/views.py:139 msgid "Observation updated" msgstr "Observaciçon actualizada" -#: apps/data/views.py:159 +#: apps/data/views.py:160 msgid "Route reference missed" msgstr "Referencia de la ruta no encontrada" -#: apps/data/views.py:205 +#: apps/data/views.py:206 msgid "Observations created" msgstr "Observaciones creadas" -#: apps/data/views.py:230 +#: apps/data/views.py:231 msgid "Observation deleted" msgstr "Observación borrada" +#: apps/data/views.py:598 +msgid "Daily report created" +msgstr "Informe diario creado" + +#: apps/data/views.py:635 +msgid "Daily report updated" +msgstr "Informe diario actualizado" + +#: apps/data/views.py:838 +msgid "Flag change created" +msgstr "Cambio de bandera creado" + +#: apps/data/views.py:867 +msgid "Flag Change updated" +msgstr "Cambio de bandera actualizado" + +#: apps/data/views.py:884 +msgid "Flag change deleted" +msgstr "Cambio de bandera eliminado" + #: apps/web/forms.py:10 msgid "first name" msgstr "nombre" @@ -444,7 +554,7 @@ msgstr "la página es un contenedor" msgid "Page not found" msgstr "Página no encontrada" -#: apps/web/views.py:100 +#: apps/web/views.py:106 msgid "Profile updated" msgstr "Perfil actualizado" @@ -488,8 +598,7 @@ msgstr "Modifica el perfil" msgid "Logout" msgstr "Salir" -#: templates/_header_nav.html:59 -#: templates/registration/login.html:9 +#: templates/_header_nav.html:59 templates/registration/login.html:9 #: templates/registration/login.html:39 msgid "Login" msgstr "Identificación" @@ -498,6 +607,95 @@ msgstr "Identificación" msgid "Change language" msgstr "Cambiar idioma" +#: templates/data/dailyreport_create.html:5 +#: templates/data/dailyreport_create.html:8 +msgid "Create Daily Report" +msgstr "Crea informe diario" + +#: templates/data/dailyreport_list.html:6 +#: templates/data/dailyreport_list.html:9 +msgid "Daily Report List" +msgstr "Lista de informes diarios" + +#: templates/data/dailyreport_list.html:23 +msgid "No reports found" +msgstr "No se ha encontrado ningún informe diario" + +#: templates/data/dailyreport_list.html:26 +#: templates/data/dailyreport_list.html:28 +#: templates/data/dailyreport_update.html:41 +#: templates/data/flagchange_list.html:26 +#: templates/data/flagchange_list.html:28 +#: templates/data/jellyfishobservation_list.html:28 +#: templates/data/jellyfishobservation_list.html:31 +msgid "Add" +msgstr "Nueva" + +#: templates/data/dailyreport_update.html:8 +#: templates/data/dailyreport_update.html:11 +msgid "Update Daily Report" +msgstr "Actualiza el informe diario" + +#: templates/data/dailyreport_update.html:23 +#: templates/data/flagchange_update.html:23 +#: templates/data/jellyfishobservation_update.html:23 +msgid "Map" +msgstr "Mapa" + +#: templates/data/dailyreport_update.html:29 +msgid "Flag changes" +msgstr "Cambios de bandera" + +#: templates/data/dailyreport_update.html:31 +#: templates/data/flagchange_update.html:31 +msgid "Date" +msgstr "Fecha" + +#: templates/data/dailyreport_update.html:31 +#: templates/data/flagchange_update.html:31 +msgid "Station" +msgstr "Punto" + +#: templates/data/dailyreport_update.html:31 +#: templates/data/flagchange_update.html:31 +msgid "Jellyfish flag" +msgstr "Bandera de medusas" + +#: templates/data/flagchange_create.html:5 +#: templates/data/flagchange_create.html:8 +msgid "Create Flag Change" +msgstr "Crea cambio de bandera" + +#: templates/data/flagchange_delete.html:4 +#: templates/data/flagchange_delete.html:7 +msgid "Delete Flag Change" +msgstr "Elimina el cambio de bandera" + +#: templates/data/flagchange_delete.html:16 +msgid "Are you sure you want to delete this record?" +msgstr "¿Está seguro que quiere borrar este registro?" + +#: templates/data/flagchange_delete.html:17 +msgid "Yes, I'm Sure" +msgstr "Sí, lo estoy" + +#: templates/data/flagchange_list.html:6 templates/data/flagchange_list.html:9 +msgid "Flag Change List" +msgstr "Lista de cambios de bandera" + +#: templates/data/flagchange_list.html:23 +msgid "No flag changes found" +msgstr "No se han encontrado cambios de bandera" + +#: templates/data/flagchange_update.html:8 +#: templates/data/flagchange_update.html:11 +msgid "Update Flag Change" +msgstr "Actualiza el cambio de bandera" + +#: templates/data/flagchange_update.html:29 +msgid "Latest flag changes" +msgstr "Últimos cambios de bandera" + #: templates/data/jellyfishobservation_bulkcreate.html:6 #: templates/data/jellyfishobservation_bulkcreate.html:9 msgid "Create Bulk Observations" @@ -539,11 +737,6 @@ msgstr "Lista de observaciones" msgid "Show observation heatmap" msgstr "Muestra el mapa de calor" -#: templates/data/jellyfishobservation_list.html:28 -#: templates/data/jellyfishobservation_list.html:31 -msgid "Add" -msgstr "Nueva" - #: templates/data/jellyfishobservation_list.html:28 #: templates/data/jellyfishobservation_list.html:31 msgid "observation" @@ -563,10 +756,6 @@ msgstr "Mapa de las observaciones" msgid "Update Observation" msgstr "Actualiza" -#: templates/data/jellyfishobservation_update.html:23 -msgid "Map" -msgstr "Mapa" - #: templates/data/jellyfishobservation_update.html:27 msgid "Picture" msgstr "Fotografía" @@ -581,6 +770,29 @@ msgstr "Lista de playas" msgid "Route List" msgstr "Lista de rutas" +#: templates/data/observationstation_list.html:6 +#: templates/data/observationstation_list.html:9 +msgid "Observation Station List" +msgstr "Lista de puntos de observación" + +#: templates/data/observationstation_list.html:19 +msgid "Show observation station map" +msgstr "Muestra el mapa de puntos de observación" + +#: templates/data/observationstation_list.html:24 +#: templates/data/observationstation_map.html:25 +msgid "No stations found" +msgstr "No se ha encontrado ningún punto de observación" + +#: templates/data/observationstation_map.html:7 +#: templates/data/observationstation_map.html:10 +msgid "Observation Station Map" +msgstr "Mapa de puntos de observación" + +#: templates/data/observationstation_map.html:20 +msgid "Show observation station list" +msgstr "Muesta la lista de puntos de observación" + #: templates/password_reset/recovery_form.html:4 msgid "Password recovery" msgstr "Recupera la contraseña" @@ -596,8 +808,12 @@ msgstr "Nueva contraseña" #: templates/password_reset/reset.html:8 #, python-format -msgid "Sorry, this password reset link is invalid. You can still request a new one." -msgstr "El enlace para recuperar la contraseña es inválido. Puedes solicitar un nuevo enlace para recuperar la contraseña." +msgid "" +"Sorry, this password reset link is invalid. You can still request a new one." +msgstr "" +"El enlace para recuperar la contraseña es inválido. Puedes solicitar un nuevo enlace para recuperar la contraseña." #: templates/password_reset/reset.html:12 #, python-format @@ -614,7 +830,9 @@ msgstr "Bienvenido/a a la aplicación de observación de medusas" #: templates/registration/login.html:13 msgid "Your username and password did not match. Please try again." -msgstr "El usuario y contraseña no son correctos. Prueba otra vez o contacta con el administrador de la aplicación" +msgstr "" +"El usuario y contraseña no son correctos. Prueba otra vez o contacta con el " +"administrador de la aplicación" #: templates/web/home.html:5 msgid "Home" diff --git a/grumers/static/css/style.less b/grumers/static/css/style.less index b029398..945fbdd 100644 --- a/grumers/static/css/style.less +++ b/grumers/static/css/style.less @@ -103,4 +103,14 @@ h1 span.route { } .navbar-nav li:first-letter{ text-transform: uppercase; +} + + +.form-control .select2-choice { + height: 32px; + line-height: 32px; +} + +.valign-button-iform{ + padding-top: 24px; } \ No newline at end of file diff --git a/grumers/templates/data/dailyreport_create.html b/grumers/templates/data/dailyreport_create.html new file mode 100644 index 0000000..cda52d0 --- /dev/null +++ b/grumers/templates/data/dailyreport_create.html @@ -0,0 +1,12 @@ +{% extends "data/dailyreport_update.html" %} +{% load i18n %} +{% load crispy_forms_tags %} + +{% block title_head %}{{ block.super }}: {% trans "Create Daily Report" %}{% endblock %} + +{% block title %} +{% trans "Create Daily Report" %} +{% if route %} + {{ route.name }} +{% endif %} +{% endblock %} diff --git a/grumers/templates/data/dailyreport_list.html b/grumers/templates/data/dailyreport_list.html new file mode 100644 index 0000000..2ff7ed9 --- /dev/null +++ b/grumers/templates/data/dailyreport_list.html @@ -0,0 +1,32 @@ +{% extends "data/base.html" %} +{% load i18n %} +{% load render_table from django_tables2 %} +{% load crispy_forms_tags %} + +{% block title_head %}{{ block.super }}: {% trans "Daily Report List" %}{% endblock %} + +{% block title %} +{% trans "Daily Report List" %} +{% if route %} + {{ route.name }} +{% endif %} +{% endblock %} + +{% block content %} +
+
+ {% crispy form %} +
+
+ {% render_table table %} + {% if not table.rows %} +

{% trans "No reports found" %}

+ {% endif %} + {% if route %} + {% trans 'Add' %} {% trans 'daily report' %} + {% else %} + {% trans 'Add' %} {% trans 'daily report' %} + {% endif %} +
+
+{% endblock %} diff --git a/grumers/templates/data/dailyreport_update.html b/grumers/templates/data/dailyreport_update.html new file mode 100644 index 0000000..2dccf5a --- /dev/null +++ b/grumers/templates/data/dailyreport_update.html @@ -0,0 +1,191 @@ +{% extends "data/base.html" %} +{% load i18n %} +{% load crispy_forms_tags %} +{% load staticfiles %} +{% load geojson_tags %} +{% load thumbnail %} + +{% block title_head %}{{ block.super }}: {% trans "Update Daily Report" %}{% endblock %} + +{% block title %} +{% trans "Update Daily Report" %} +{% if route %} + {{ route.name }} +{% endif %} +{% endblock %} + +{% block content %} +
+
+ {% crispy form %} +
+
+

{% trans "Map" %}

+
+
+
+ {% if object.pk %} +
+

{% trans "Flag changes" %}

+ + + {% for flagchange in flagchanges %} + + + + + {% endfor %} +
{% trans "Date" %}{% trans "Station" %}{% trans "Flag" %}{% trans "Jellyfish flag" %}
{{ flagchange.date }}{{ flagchange.observation_station }}{{ flagchange.get_flag_status_display }}{% if flagchange.jellyfish_flag %}{% endif %}
+ + + {% trans 'Add' %} {% trans 'flag change' %} + +
+ {% endif %} + + +
+ +{% endblock %} + +{% block page_js %} + + {{ form.media }} + +{% endblock page_js %} + diff --git a/grumers/templates/data/flagchange_create.html b/grumers/templates/data/flagchange_create.html new file mode 100644 index 0000000..201ce64 --- /dev/null +++ b/grumers/templates/data/flagchange_create.html @@ -0,0 +1,12 @@ +{% extends "data/flagchange_update.html" %} +{% load i18n %} +{% load crispy_forms_tags %} + +{% block title_head %}{{ block.super }}: {% trans "Create Flag Change" %}{% endblock %} + +{% block title %} +{% trans "Create Flag Change" %} +{% if route %} + {{ route.name }} +{% endif %} +{% endblock %} diff --git a/grumers/templates/data/flagchange_delete.html b/grumers/templates/data/flagchange_delete.html new file mode 100644 index 0000000..08f7924 --- /dev/null +++ b/grumers/templates/data/flagchange_delete.html @@ -0,0 +1,19 @@ +{% extends "data/base.html" %} +{% load i18n %} + +{% block title_head %}{{ block.super }}: {% trans "Delete Flag Change" %}{% endblock %} + +{% block title %} +{% trans "Delete Flag Change" %} +{% if route %} + {{ route.name }} +{% endif %} +{% endblock %} + + +{% block content %} +
{% csrf_token %} +

{% trans 'Are you sure you want to delete this record?' %}

+ +
+{% endblock %} \ No newline at end of file diff --git a/grumers/templates/data/flagchange_list.html b/grumers/templates/data/flagchange_list.html new file mode 100644 index 0000000..44cb94d --- /dev/null +++ b/grumers/templates/data/flagchange_list.html @@ -0,0 +1,32 @@ +{% extends "data/base.html" %} +{% load i18n %} +{% load render_table from django_tables2 %} +{% load crispy_forms_tags %} + +{% block title_head %}{{ block.super }}: {% trans "Flag Change List" %}{% endblock %} + +{% block title %} +{% trans "Flag Change List" %} +{% if route %} + {{ route.name }} +{% endif %} +{% endblock %} + +{% block content %} +
+
+ {% crispy form %} +
+
+ {% render_table table %} + {% if not table.rows %} +

{% trans "No flag changes found" %}

+ {% endif %} + {% if route %} + {% trans 'Add' %} {% trans 'flag change' %} + {% else %} + {% trans 'Add' %} {% trans 'flag change' %} + {% endif %} +
+
+{% endblock %} diff --git a/grumers/templates/data/flagchange_update.html b/grumers/templates/data/flagchange_update.html new file mode 100644 index 0000000..21ab3eb --- /dev/null +++ b/grumers/templates/data/flagchange_update.html @@ -0,0 +1,184 @@ +{% extends "data/base.html" %} +{% load i18n %} +{% load crispy_forms_tags %} +{% load staticfiles %} +{% load geojson_tags %} +{% load thumbnail %} + +{% block title_head %}{{ block.super }}: {% trans "Update Flag Change" %}{% endblock %} + +{% block title %} +{% trans "Update Flag Change" %} +{% if route %} + {{ route.name }} +{% endif %} +{% endblock %} + +{% block content %} +
+
+ {% crispy form %} +
+
+

{% trans "Map" %}

+
+
+
+ {% if last_flagchanges %} +
+

{% trans "Latest flag changes" %}

+ + + {% for flagchange in last_flagchanges %} + + + + + {% endfor %} +
{% trans "Date" %}{% trans "Station" %}{% trans "Flag" %}{% trans "Jellyfish flag" %}
{{ flagchange.date }}{{ flagchange.observation_station }}{{ flagchange.get_flag_status_display }}{% if flagchange.jellyfish_flag %}{% endif %}
+
+ {% endif %} +
+{% endblock %} + +{% block page_js %} + + {{ form.media }} + +{% endblock page_js %} + diff --git a/grumers/templates/data/jellyfishobservation_update.html b/grumers/templates/data/jellyfishobservation_update.html index 3e3a620..5ecaaae 100644 --- a/grumers/templates/data/jellyfishobservation_update.html +++ b/grumers/templates/data/jellyfishobservation_update.html @@ -75,7 +75,7 @@

{% trans "Picture" %}

}); map.addLayers([stationsLayer, osmLayer]); var geojsonFormat = new OpenLayers.Format.GeoJSON(); - var collection = geojsonFormat.read({{ station_list|geojsonfeature:"position"|safe }}); + var collection = geojsonFormat.read({{ station_list|geojsonfeature:":position"|safe }}); stationsLayer.addFeatures(collection); var layerSwitcher = new OpenLayers.Control.LayerSwitcher(); diff --git a/grumers/templates/data/observationbeach_list.html b/grumers/templates/data/observationbeach_list.html index b1a9ed6..788065b 100644 --- a/grumers/templates/data/observationbeach_list.html +++ b/grumers/templates/data/observationbeach_list.html @@ -11,7 +11,10 @@ {% block content %}
-
+
+ {% crispy filterform %} +
+
{% render_table table %}
diff --git a/requirements/common.pip b/requirements/common.pip index 9dbe8c0..9b609d2 100644 --- a/requirements/common.pip +++ b/requirements/common.pip @@ -17,7 +17,7 @@ django-compressor django-tables2 django-crispy-forms django-bootstrap3-datetimepicker -django-geojson +django-geojson==2.6.0 django-localeurl django-modeltranslation==0.7.3 django-password-reset