bugSamizdat - Bugs: bug #21242, frontpage_leftcol-0.1 - allow...

 
 

bug #21242: frontpage_leftcol-0.1 - allow adding further content to left column from config.yaml file alone

Submitter:  Boud Roukema <boud>
Submitted:  Wed 03 Oct 2007 11:28:44 PM UTC
   
 
Category:  None Severity:  2 - Minor
Status:  Fixed Privacy:  Public
Assigned to:  None Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 21 Feb 2008 09:20:13 PM UTC, comment #3: 

Regarding the 'left_column' patch, do you mean a rather major
rewrite of frontpage_controller in to separate out the "View"
part from the "Controller" part? And possibly a "Model" part,
though i'm not sure what would be the model part?

In any case, this thread should go over to

patch #6278: more_links-0.1 - include rendered content of a message in the frontpage left column
https://savannah.nongnu.org/patch/?6278


Boud Roukema <boud>
Group Member
Thu 21 Feb 2008 06:23:02 PM UTC, comment #2: 

Fixed in CVS since the Bonfire Night (2007-11-04) snapshot.

I won't include the 'left_column' patch: now that we have MVC architecture and templates, the right way to add this feature is to create an overridable template for the front page controller (see Controller class for hints).

Dmitry Borodaenko <angdraug>
Group administrator
Wed 03 Oct 2007 11:35:14 PM UTC, comment #1: 

Just to make it clear: the "bug" part of this is that there's
an error if header: or footer: is missing in the config.

i put severity = minor.

Boud Roukema <boud>
Group Member
Wed 03 Oct 2007 11:28:44 PM UTC, original submission:  

This patch adds one line and adds stuff to two lines in frontpage_controller.rb.

IMHO the third one-line change


-    text = config['site'][name]
+    text = (config['site'][name] or '')


probably counts as a bug fix, since it
prevents an error in the case that someone forgets to put one
of the static things like header, footer etc. in the config
file, making them optional. This way new static things
like 'left_column'  (really left_column_additional_stuff but
that sounds a bit too long) can be added as options without
making them obligatory. A page might be less useful without
a footer or header, but it shouldn't be a fatal error.

With this third change, the .to_s probably becomes unnecessary
in the first one-line change:

+    render_left_column = static_text('left_column').to_s


BTW, for someone too lazy to download the file, here's the second
one-line change:

-    render_feeds << '
+    render_feeds << render_left_column << '


cheers
boud

Boud Roukema <boud>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #14075:  frontpage_leftcol-0.1.patch added by boud (1KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by angdraug (Posted a comment)
  • -email is unavailable- added by boud (Submitted the item)
  •  

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-02-21 angdraug StatusWorks For Me Fixed
        Open/ClosedOpen Closed
    2007-10-03 boud Severity3 - Normal 2 - Minor
        StatusNone Works For Me
    2007-10-03 boud Attached File- Added frontpage_leftcol-0.1.patch, #14075

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code