Skip to content
Snippets Groups Projects
Commit 98a42c30 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Adding ordering attribute to information elements

parent 91eb0825
Branches
No related tags found
No related merge requests found
Showing
with 141 additions and 30 deletions
No preview for this file type
...@@ -8,7 +8,7 @@ msgid "" ...@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-03-08 15:03+0100\n" "POT-Creation-Date: 2016-07-12 10:23+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
...@@ -26,27 +26,31 @@ msgstr "" ...@@ -26,27 +26,31 @@ msgstr ""
msgid "Main illustration" msgid "Main illustration"
msgstr "" msgstr ""
#: models.py:18 #: models.py:15
msgid "Ordering"
msgstr ""
#: models.py:19
msgid "Illustration" msgid "Illustration"
msgstr "" msgstr ""
#: models.py:22 #: models.py:23
msgid "Attachment" msgid "Attachment"
msgstr "" msgstr ""
#: models.py:26 #: models.py:27
msgid "Headline" msgid "Headline"
msgstr "" msgstr ""
#: models.py:27 #: models.py:28
msgid "Lead paragraph" msgid "Lead paragraph"
msgstr "" msgstr ""
#: models.py:28 #: models.py:29
msgid "Body text" msgid "Body text"
msgstr "" msgstr ""
#: models.py:29 #: models.py:30
msgid "Language code" msgid "Language code"
msgstr "" msgstr ""
......
No preview for this file type
...@@ -7,7 +7,7 @@ msgid "" ...@@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-03-08 15:03+0100\n" "POT-Creation-Date: 2016-07-12 10:23+0200\n"
"PO-Revision-Date: 2015-02-13 11:13+0100\n" "PO-Revision-Date: 2015-02-13 11:13+0100\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
...@@ -29,29 +29,33 @@ msgstr "Informacija" ...@@ -29,29 +29,33 @@ msgstr "Informacija"
msgid "Main illustration" msgid "Main illustration"
msgstr "" msgstr ""
#: models.py:18 #: models.py:15
msgid "Ordering"
msgstr ""
#: models.py:19
#, fuzzy #, fuzzy
#| msgid "Information" #| msgid "Information"
msgid "Illustration" msgid "Illustration"
msgstr "Informacija" msgstr "Informacija"
#: models.py:22 #: models.py:23
msgid "Attachment" msgid "Attachment"
msgstr "" msgstr ""
#: models.py:26 #: models.py:27
msgid "Headline" msgid "Headline"
msgstr "" msgstr ""
#: models.py:27 #: models.py:28
msgid "Lead paragraph" msgid "Lead paragraph"
msgstr "" msgstr ""
#: models.py:28 #: models.py:29
msgid "Body text" msgid "Body text"
msgstr "" msgstr ""
#: models.py:29 #: models.py:30
msgid "Language code" msgid "Language code"
msgstr "" msgstr ""
......
No preview for this file type
...@@ -8,7 +8,7 @@ msgid "" ...@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-03-08 15:03+0100\n" "POT-Creation-Date: 2016-07-12 10:23+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
...@@ -26,27 +26,31 @@ msgstr "Informasjon" ...@@ -26,27 +26,31 @@ msgstr "Informasjon"
msgid "Main illustration" msgid "Main illustration"
msgstr "Hovedillustrasjon" msgstr "Hovedillustrasjon"
#: models.py:18 #: models.py:15
msgid "Ordering"
msgstr "Sortering"
#: models.py:19
msgid "Illustration" msgid "Illustration"
msgstr "Illustrasjon" msgstr "Illustrasjon"
#: models.py:22 #: models.py:23
msgid "Attachment" msgid "Attachment"
msgstr "Vedlegg" msgstr "Vedlegg"
#: models.py:26 #: models.py:27
msgid "Headline" msgid "Headline"
msgstr "Overskrift" msgstr "Overskrift"
#: models.py:27 #: models.py:28
msgid "Lead paragraph" msgid "Lead paragraph"
msgstr "Ingress" msgstr "Ingress"
#: models.py:28 #: models.py:29
msgid "Body text" msgid "Body text"
msgstr "Brødtekst" msgstr "Brødtekst"
#: models.py:29 #: models.py:30
msgid "Language code" msgid "Language code"
msgstr "Språkkode" msgstr "Språkkode"
......
No preview for this file type
...@@ -7,14 +7,14 @@ msgid "" ...@@ -7,14 +7,14 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-27 13:40+0200\n" "POT-Creation-Date: 2016-07-12 10:23+0200\n"
"PO-Revision-Date: 2016-06-01 11:45+0200\n" "PO-Revision-Date: 2016-06-01 11:45+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: zh_CN\n" "Language: zh_CN\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Last-Translator: \n"
"Language-Team: \n"
"X-Generator: Poedit 1.8.7\n" "X-Generator: Poedit 1.8.7\n"
#: models.py:13 #: models.py:13
...@@ -25,27 +25,31 @@ msgstr "父信息" ...@@ -25,27 +25,31 @@ msgstr "父信息"
msgid "Main illustration" msgid "Main illustration"
msgstr "主图" msgstr "主图"
#: models.py:18 #: models.py:15
msgid "Ordering"
msgstr ""
#: models.py:19
msgid "Illustration" msgid "Illustration"
msgstr "图" msgstr "图"
#: models.py:22 #: models.py:23
msgid "Attachment" msgid "Attachment"
msgstr "附件" msgstr "附件"
#: models.py:26 #: models.py:27
msgid "Headline" msgid "Headline"
msgstr "标题" msgstr "标题"
#: models.py:27 #: models.py:28
msgid "Lead paragraph" msgid "Lead paragraph"
msgstr "导向段落" msgstr "导向段落"
#: models.py:28 #: models.py:29
msgid "Body text" msgid "Body text"
msgstr "正文" msgstr "正文"
#: models.py:29 #: models.py:30
msgid "Language code" msgid "Language code"
msgstr "语言代码" msgstr "语言代码"
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import tinymce.models
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Information',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('main_illustration', models.ImageField(upload_to=b'images/information', verbose_name='Hovedillustrasjon', blank=True)),
('parent_information', models.ForeignKey(related_name='children', verbose_name='Informasjon', blank=True, to='information.Information', null=True)),
],
),
migrations.CreateModel(
name='InformationAttachment',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('attachment', models.FileField(upload_to=b'attachments/information', verbose_name='Vedlegg', blank=True)),
('information', models.ForeignKey(to='information.Information')),
],
),
migrations.CreateModel(
name='InformationIllustration',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('illustration', models.ImageField(upload_to=b'images/information', verbose_name='Illustrasjon', blank=True)),
('information', models.ForeignKey(to='information.Information')),
],
),
migrations.CreateModel(
name='InformationLocale',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('headline', models.CharField(max_length=200, verbose_name='Overskrift')),
('lead_paragraph', models.TextField(verbose_name='Ingress')),
('body', tinymce.models.HTMLField(verbose_name='Br\xf8dtekst')),
('language_code', models.CharField(max_length=2, verbose_name='Spr\xe5kkode')),
('information', models.ForeignKey(to='information.Information')),
],
),
]
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('information', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='information',
name='ordering',
field=models.IntegerField(default=0),
),
]
...@@ -12,6 +12,9 @@ class Information(models.Model): ...@@ -12,6 +12,9 @@ class Information(models.Model):
return InformationLocale.get_heading_with_fallback(self.id) return InformationLocale.get_heading_with_fallback(self.id)
parent_information = models.ForeignKey('self', blank=True, null=True, related_name='children', verbose_name=_("Parent information")) parent_information = models.ForeignKey('self', blank=True, null=True, related_name='children', verbose_name=_("Parent information"))
main_illustration = models.ImageField(upload_to='images/information', blank=True, verbose_name=_("Main illustration") ) main_illustration = models.ImageField(upload_to='images/information', blank=True, verbose_name=_("Main illustration") )
ordering = models.IntegerField(default=0, verbose_name=_("Ordering"))
class Meta:
ordering = ["ordering"]
class InformationIllustration(models.Model): class InformationIllustration(models.Model):
information = models.ForeignKey(Information) information = models.ForeignKey(Information)
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('vips_messages', '0003_auto_20160331_1121'),
]
operations = [
migrations.AlterField(
model_name='advertisement',
name='exp_date',
field=models.DateField(verbose_name='Dato utl\xf8pt'),
),
migrations.AlterField(
model_name='advertisement',
name='pub_date',
field=models.DateField(verbose_name='Dato publisert'),
),
]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment