Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1274 (closed enhancement: wontfix)

Opened 12 years ago

Last modified 12 years ago

[PATCH] resume() built-in function for kid templates.

Reported by: llucax Owned by: anonymous
Priority: normal Milestone: 1.0.2
Component: Kid Version: 1.0.2
Severity: trivial Keywords: resume kid function
Cc:

Description

I usually find myself showing data on a table that can be very large to fit in it and I don't want the table to grow because of it, so I truncate the large field (adding some nice indication telling it's truncated, like '...'), very similar to the preview in gmail ;)

So I wrote a nice 6-lines function to take care of it and I think it could be useful for a lot of people too, so adding it to the built-in tg namespace on KID templates could be a good idea.

I'm putting it in 1.0.2 milestone, even when I guess it should be on 1.1, because is such a small and harmless change.

Attachments

view.resume.patch Download (2.0 KB) - added by llucax 12 years ago.
Patch agains 1.0
view.resume.2.patch Download (2.1 KB) - added by llucax 12 years ago.
New patch against 1.0

Change History

Changed 12 years ago by llucax

Patch agains 1.0

comment:1 Changed 12 years ago by llucax

Excuse me about my bad English, I think 'resume' is not a good name, probably 'summarize' is better. Here is a new patch. Other suggestions are welcome, even for default parameter values.

Changed 12 years ago by llucax

New patch against 1.0

comment:2 Changed 12 years ago by fredlin

In my opinion it could be a good cookbook recipe but not a core function within TurboGears. And 1.0.x is the feature fixed version.

I suggest you to add a simple doc in  http://docs.turbogears.org/1.0/RoughDocs

under 'Solving specific problems' section

comment:3 Changed 12 years ago by alberto

  • Status changed from new to closed
  • Resolution set to wontfix

Fred is right, I'll close this as wontfix.

Nothe that you can add a function to the tg namespace by appending a function that updates it view.variable_providers

Alberto

Note: See TracTickets for help on using tickets.