# HG changeset patch # User Brian Neal # Date 1319244525 0 # Node ID bdcce55f137eee3cdd1ffb1bcf79f8e4d37afbbc # Parent 3c48a555298d3597f1b9e7e247c1d3775ecb5e8d For #235, some minor news tweaks. The submitted by text is now a link to the author's profile. Only show 1 textarea to the user when submitting a new news story. The admin can paste into the 2nd one if needed. diff -r 3c48a555298d -r bdcce55f137e gpp/news/forms.py --- a/gpp/news/forms.py Sat Oct 22 00:07:50 2011 +0000 +++ b/gpp/news/forms.py Sat Oct 22 00:48:45 2011 +0000 @@ -1,7 +1,7 @@ """ Forms for the news application. + """ - from django import forms from django.conf import settings @@ -12,12 +12,14 @@ class AddNewsForm(forms.ModelForm): """Form for a user to submit a news story to the admins for review.""" title = forms.CharField(widget=forms.TextInput(attrs={'size': 52})) - short_text = forms.CharField(widget=forms.Textarea(attrs={'rows': 20, 'cols': 80})) - long_text = forms.CharField(required=False, widget=forms.Textarea(attrs={'rows': 20, 'cols': 80})) + short_text = forms.CharField( + label="Article text", + widget=forms.Textarea( + attrs={'rows': 60, 'cols': 80, 'style': 'height:500px'})) class Meta: model = PendingStory - fields = ('title', 'category', 'short_text', 'long_text') + fields = ['title', 'category', 'short_text'] class Media: js = settings.GPP_THIRD_PARTY_JS['tiny_mce'] diff -r 3c48a555298d -r bdcce55f137e gpp/templates/news/story.html --- a/gpp/templates/news/story.html Sat Oct 22 00:07:50 2011 +0000 +++ b/gpp/templates/news/story.html Sat Oct 22 00:48:45 2011 +0000 @@ -1,6 +1,7 @@ {% extends 'news/base.html' %} {% load url from future %} {% load tagging_tags %} +{% load bio_tags %} {% load comment_tags %} {% load script_tags %} {% load core_tags %} @@ -22,7 +23,7 @@

{{ story.title }}

- Submitted by {{ story.submitter.username }} on {{ story.date_submitted|date:"F d, Y" }}. + Submitted by {% profile_link story.submitter.username %} on {{ story.date_submitted|date:"F d, Y" }}.

diff -r 3c48a555298d -r bdcce55f137e gpp/templates/news/story_summary.html --- a/gpp/templates/news/story_summary.html Sat Oct 22 00:07:50 2011 +0000 +++ b/gpp/templates/news/story_summary.html Sat Oct 22 00:48:45 2011 +0000 @@ -1,5 +1,6 @@ {% load url from future %} {% load tagging_tags %} +{% load bio_tags %} {% load comment_tags %} {% load core_tags %}
@@ -9,7 +10,7 @@

{{ story.title }}

{% endif %}
- Submitted by {{ story.submitter.username }} on {{ story.date_submitted|date:"F d, Y" }}. + Submitted by {% profile_link story.submitter.username %} on {{ story.date_submitted|date:"F d, Y" }}.