Member template in organization is now called Contributor Template.
authorLennard de Rijk <ljvderijk@gmail.com>
Sat, 28 Feb 2009 21:12:20 +0000
changeset 1567 b5589e656ed1
parent 1566 5388270fb363
child 1568 cdbe6e86506c
Member template in organization is now called Contributor Template. This matches the Organization Application, this way the information is automatically transferred to the new Organization. Note that the template shows raw HTML, we might change the template tag to use |safe for it's input to show the true layout of the template. I've sent an email to SRabbelier about that. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed
app/soc/models/organization.py
app/soc/templates/soc/organization/public.html
app/soc/views/models/organization.py
--- a/app/soc/models/organization.py	Sat Feb 28 21:08:02 2009 +0000
+++ b/app/soc/models/organization.py	Sat Feb 28 21:12:20 2009 +0000
@@ -39,13 +39,12 @@
   dev_mailing_list.help_text = ugettext(
     'Mailing list email address, URL to sign-up page, etc.')
 
-  member_template = db.ReferenceProperty(
-    reference_class=soc.models.document.Document, required=False,
-    collection_name='org_app_member_template',
-    verbose_name=ugettext('Application template'))
-  member_template.help_text = ugettext(
-    'This template will be presented to potential members when they'
-    ' apply to the organization.')
+  contrib_template = db.TextProperty(required=False, verbose_name=ugettext(
+      'Application template'))
+  contrib_template.help_text = ugettext(
+      'This template can be used by contributors, such as students'
+      ' and other non-member participants, when they apply to contribute'
+      ' to the organization.')
 
   ideas = db.LinkProperty(required=False, verbose_name=ugettext('Idea list'))
   ideas.help_text = ugettext(
--- a/app/soc/templates/soc/organization/public.html	Sat Feb 28 21:08:02 2009 +0000
+++ b/app/soc/templates/soc/organization/public.html	Sat Feb 28 21:12:20 2009 +0000
@@ -17,6 +17,6 @@
 {% block fields %}
   {{ block.super }}
   {% readonly_field_as_table_row entity.fields.dev_mailing_list.label entity.dev_mailing_list %}
-  {% readonly_field_as_table_row entity.fields.member_template.label entity.member_template %}
+  {% readonly_field_as_table_row entity.fields.contrib_template.label entity.contrib_template %}
   {% readonly_field_as_table_row entity.fields.ideas.label entity.ideas %}
 {% endblock %}
--- a/app/soc/views/models/organization.py	Sat Feb 28 21:08:02 2009 +0000
+++ b/app/soc/views/models/organization.py	Sat Feb 28 21:12:20 2009 +0000
@@ -35,6 +35,7 @@
 from soc.logic.models import org_admin as org_admin_logic
 from soc.logic.models import org_app as org_app_logic
 from soc.logic.models import user as user_logic
+from soc.views import helper
 from soc.views.helper import access
 from soc.views.helper import decorators
 from soc.views.helper import dynaform
@@ -115,6 +116,9 @@
     new_params['create_extra_dynaproperties'] = {
         'scope_path': forms.CharField(widget=forms.HiddenInput,
                                    required=True),
+        'contrib_template': forms.fields.CharField(
+            widget=helper.widgets.FullTinyMCE(
+                attrs={'rows': 25, 'cols': 100})),
         'clean_ideas': cleaning.clean_url('ideas'),
         'clean': cleaning.validate_new_group('link_id', 'scope_path',
             soc.logic.models.organization, org_app_logic)