projects
/
matthijs
/
projects
/
xerxes.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
151e824
)
Add a Influences.type field (Influence / Notification).
author
Matthijs Kooijman
<matthijs@stdin.nl>
Sat, 13 Feb 2010 12:02:44 +0000
(13:02 +0100)
committer
Matthijs Kooijman
<matthijs@stdin.nl>
Sat, 13 Feb 2010 12:02:44 +0000
(13:02 +0100)
influences/admin.py
patch
|
blob
|
history
influences/forms.py
patch
|
blob
|
history
influences/models.py
patch
|
blob
|
history
locale/nl/LC_MESSAGES/django.po
patch
|
blob
|
history
templates/influences/influence_detail.html
patch
|
blob
|
history
templates/influences/influence_list_block.html
patch
|
blob
|
history
diff --git
a/influences/admin.py
b/influences/admin.py
index 4e3b966d1c12046e9e275d504c4e06d47db9fbab..ed4806b678abb8ec45f4c9e0a1215db026bf5650 100644
(file)
--- a/
influences/admin.py
+++ b/
influences/admin.py
@@
-18,9
+18,9
@@
class CharacterAdmin(admin.ModelAdmin):
admin.site.register(Character, CharacterAdmin)
class InfluenceAdmin(admin.ModelAdmin):
admin.site.register(Character, CharacterAdmin)
class InfluenceAdmin(admin.ModelAdmin):
- list_filter=('status', 'longterm', 'todo', 'character')
+ list_filter=('
type', '
status', 'longterm', 'todo', 'character')
search_fields=('character', 'summary', 'description', 'contact')
search_fields=('character', 'summary', 'description', 'contact')
- list_display=('character', 'contact', 'summary', 'longterm', 'status')
+ list_display=('character', 'contact', 'summary', 'longterm', 'status'
, 'type'
)
class Media:
js = ('base/js/yahoo-dom-event.js', 'base/js/logger-debug.js')
class Media:
js = ('base/js/yahoo-dom-event.js', 'base/js/logger-debug.js')
diff --git
a/influences/forms.py
b/influences/forms.py
index a060368380e41b1eb1fd3cfed39c965b7d2108c9..754a2192a85927944091734d7e9433c151ec22bc 100644
(file)
--- a/
influences/forms.py
+++ b/
influences/forms.py
@@
-68,7
+68,7
@@
def _get_influence_comment_form(allow_markup, allow_public, allow_private):
class InfluenceForm(ContextModelForm):
class Meta:
model = Influence
class InfluenceForm(ContextModelForm):
class Meta:
model = Influence
- fields = ('character', 'contact', 'summary', 'description')
+ fields = ('
type', '
character', 'contact', 'summary', 'description')
class CharacterForm(ContextModelForm):
class Meta:
class CharacterForm(ContextModelForm):
class Meta:
diff --git
a/influences/models.py
b/influences/models.py
index 6464e683deb20a1277c4cdf2537a4be5661640b8..10470b55aaff1a375bda1f837308e16560a7ec27 100644
(file)
--- a/
influences/models.py
+++ b/
influences/models.py
@@
-35,9
+35,14
@@
class Influence(models.Model):
('P', _('Processing')),
('D', _('Done')),
)
('P', _('Processing')),
('D', _('Done')),
)
+ TYPE_CHOICES = (
+ ('I', _('Influence')),
+ ('N', _('Notifcation')),
+ )
created = models.DateField(auto_now_add=1, verbose_name = _("Creation time"))
modified = models.DateField(auto_now=1, verbose_name = _("Modification time"))
created = models.DateField(auto_now_add=1, verbose_name = _("Creation time"))
modified = models.DateField(auto_now=1, verbose_name = _("Modification time"))
+ type = models.CharField(max_length=1, choices=TYPE_CHOICES, default='I', verbose_name = _("Type"))
character = models.ForeignKey(Character, verbose_name = _("Character"))
contact = models.CharField(max_length=255, verbose_name = _("Contact Name"))
summary = models.CharField(max_length=255, verbose_name = _("Summary"))
character = models.ForeignKey(Character, verbose_name = _("Character"))
contact = models.CharField(max_length=255, verbose_name = _("Contact Name"))
summary = models.CharField(max_length=255, verbose_name = _("Summary"))
diff --git
a/locale/nl/LC_MESSAGES/django.po
b/locale/nl/LC_MESSAGES/django.po
index 1e4cf13dd3ad765af5e76feaa9fabba6f91b820a..4bdc2f8772c1e2da41e44780b3f8383c1fc76153 100644
(file)
--- a/
locale/nl/LC_MESSAGES/django.po
+++ b/
locale/nl/LC_MESSAGES/django.po
@@
-6,7
+6,7
@@
msgid ""
msgstr ""
"Project-Id-Version: 1\n"
"Report-Msgid-Bugs-To: \n"
msgstr ""
"Project-Id-Version: 1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-0
1-13 12:23
+0100\n"
+"POT-Creation-Date: 2010-0
2-13 13:01
+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Matthijs Kooijman <matthijs@stdin.nl>\n"
"Language-Team: N/A\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Matthijs Kooijman <matthijs@stdin.nl>\n"
"Language-Team: N/A\n"
@@
-83,11
+83,11
@@
msgstr "Nieuw"
msgid "Approved"
msgstr "Goedgekeurd"
msgid "Approved"
msgstr "Goedgekeurd"
-#: influences/models.py:15 influences/models.py:
38
+#: influences/models.py:15 influences/models.py:
42
msgid "Creation time"
msgstr "Aangemaakt op"
msgid "Creation time"
msgstr "Aangemaakt op"
-#: influences/models.py:16 influences/models.py:
39
+#: influences/models.py:16 influences/models.py:
43
msgid "Modification time"
msgstr "Gewijzigd op"
msgid "Modification time"
msgstr "Gewijzigd op"
@@
-95,7
+95,7
@@
msgstr "Gewijzigd op"
msgid "Name"
msgstr "Naam"
msgid "Name"
msgstr "Naam"
-#: influences/models.py:18 influences/models.py:
46
+#: influences/models.py:18 influences/models.py:
51
#: templates/influences/email/character_changed.html:30
#: templates/influences/email/influence_changed.html:30
msgid "Status"
#: templates/influences/email/character_changed.html:30
#: templates/influences/email/influence_changed.html:30
msgid "Status"
@@
-105,7
+105,7
@@
msgstr "Status"
msgid "Player"
msgstr "Speler"
msgid "Player"
msgstr "Speler"
-#: influences/models.py:28 influences/models.py:4
1
+#: influences/models.py:28 influences/models.py:4
6
#: templates/influences/influence_detail.html:8
#: templates/influences/email/influence_changed.html:27
msgid "Character"
#: templates/influences/influence_detail.html:8
#: templates/influences/email/influence_changed.html:27
msgid "Character"
@@
-127,39
+127,47
@@
msgstr "In behandeling"
msgid "Done"
msgstr "Afgehandeld"
msgid "Done"
msgstr "Afgehandeld"
-#: influences/models.py:42
+#: influences/models.py:39 influences/models.py:94
+msgid "Influence"
+msgstr "Invloed"
+
+#: influences/models.py:40
+msgid "Notifcation"
+msgstr "Kennisgeving"
+
+#: influences/models.py:45
+msgid "Type"
+msgstr "Type"
+
+#: influences/models.py:47
msgid "Contact Name"
msgstr "Naam contactpersoon"
msgid "Contact Name"
msgstr "Naam contactpersoon"
-#: influences/models.py:4
3
+#: influences/models.py:4
8
#: templates/influences/email/influence_changed.html:29
msgid "Summary"
msgstr "Samenvatting"
#: templates/influences/email/influence_changed.html:29
msgid "Summary"
msgstr "Samenvatting"
-#: influences/models.py:4
4
+#: influences/models.py:4
9
#: templates/influences/email/influence_changed.html:34
msgid "Description"
msgstr "Omschrijving"
#: templates/influences/email/influence_changed.html:34
msgid "Description"
msgstr "Omschrijving"
-#: influences/models.py:
45
+#: influences/models.py:
50
msgid "Todo"
msgstr "Todo"
msgid "Todo"
msgstr "Todo"
-#: influences/models.py:
47
templates/influences/influence_detail.html:10
+#: influences/models.py:
52
templates/influences/influence_detail.html:10
#: templates/influences/email/influence_changed.html:32
msgid "Long term"
msgstr "Lange termijn"
#: templates/influences/email/influence_changed.html:32
msgid "Long term"
msgstr "Lange termijn"
-#: influences/models.py:
49
templates/influences/influence_detail.html:15
+#: influences/models.py:
54
templates/influences/influence_detail.html:15
#: templates/influences/email/influence_changed.html:39
msgid "Result"
msgstr "Resultaat"
#: templates/influences/email/influence_changed.html:39
msgid "Result"
msgstr "Resultaat"
-#: influences/models.py:89
-msgid "Influence"
-msgstr "Invloed"
-
-#: influences/models.py:90
+#: influences/models.py:95
msgid "Influences"
msgstr "Invloeden"
msgid "Influences"
msgstr "Invloeden"
@@
-270,7
+278,7
@@
msgstr "Toevoegen"
#: templates/influences/add_influence.html:6
#: templates/influences/character_detail_block.html:15
#: templates/influences/add_influence.html:6
#: templates/influences/character_detail_block.html:15
-#: templates/influences/influence_list_block.html:1
4
+#: templates/influences/influence_list_block.html:1
5
msgid "Submit influence"
msgstr "Invloed indienen"
msgid "Submit influence"
msgstr "Invloed indienen"
@@
-439,7
+447,7
@@
msgstr "Contact"
msgid "Your influences"
msgstr "Jouw invloeden"
msgid "Your influences"
msgstr "Jouw invloeden"
-#: templates/influences/influence_list_block.html:1
1
+#: templates/influences/influence_list_block.html:1
2
msgid "No influences yet."
msgstr "Nog geen invloeden."
msgid "No influences yet."
msgstr "Nog geen invloeden."
diff --git
a/templates/influences/influence_detail.html
b/templates/influences/influence_detail.html
index 8bddb9cd16b4a7b6972542b0b26a2ca80770edc1..398b051cdd0b3722c9b2747acedc137ad8b1440b 100644
(file)
--- a/
templates/influences/influence_detail.html
+++ b/
templates/influences/influence_detail.html
@@
-2,7
+2,7
@@
{% load i18n %}
{% block content %}
{% load i18n %}
{% block content %}
-<h1>{{ object.summary }}</h1>
+<h1>{{ object.
get_type_display }}: {{ object.
summary }}</h1>
<table>
<tr><td>{% trans "Contact" %}:</td><td>{{ object.contact }}</td></tr>
<tr><td>{% trans "Character" %}:</td><td><a href="{% url influences_character_detail object.character.id %}">{{ object.character }}</a></td></tr>
<table>
<tr><td>{% trans "Contact" %}:</td><td>{{ object.contact }}</td></tr>
<tr><td>{% trans "Character" %}:</td><td><a href="{% url influences_character_detail object.character.id %}">{{ object.character }}</a></td></tr>
diff --git
a/templates/influences/influence_list_block.html
b/templates/influences/influence_list_block.html
index e59216f65f9d848a014e234e2de6352ffece8be8..2f9b445666bb6245f2c04842f617a66510071530 100644
(file)
--- a/
templates/influences/influence_list_block.html
+++ b/
templates/influences/influence_list_block.html
@@
-4,7
+4,8
@@
{% if object_list %}
<ul>
{% for influence in object_list %}
{% if object_list %}
<ul>
{% for influence in object_list %}
- <li><a href="{% url influences_influence_detail influence.id %}">{{influence.contact }} -- {{ influence.summary }}</a></li>
+ <li><a href="{% url influences_influence_detail influence.id
+ %}">{{influence.get_type_display}}: {{influence.contact }} -- {{ influence.summary }}</a></li>
{% endfor %}
</ul>
{% else %}
{% endfor %}
</ul>
{% else %}