Modify

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#3053 closed enhancement (wontfix)

Apply a template to included regions

Reported by: Dan Sheridan Owned by: Noah Kantrowitz
Priority: normal Component: IncludeMacro
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

The attached patch applies a ClearSilver template to the result of IncludeMacro to make it easier to add things like a direct "edit" link for included wiki pages. I've included a .cs file which does this when the current user has WIKI_MODIFY, and a .js file which highlights the region that will be edited (credit to cjfn@… for the JavaScript, used with permission).

Attachments (1)

includemacro.diff (4.9 KB) - added by Dan Sheridan 17 years ago.

Download all attachments as: .zip

Change History (4)

Changed 17 years ago by Dan Sheridan

Attachment: includemacro.diff added

comment:1 Changed 17 years ago by Noah Kantrowitz

Resolution: wontfix
Status: newclosed

This is far too specific to ever be included in the macro. I already use the modular mimeview API, so you could rework this as an IHTMLPreviewRenderer.

comment:2 Changed 17 years ago by Dan Sheridan

I thought I had done this is a particularly generic way, so I'm surprised that you think it is too specific. Would you consider a simpler version with similar code changes but no javascript and a very basic template (e.g., just <? var:include.page_html ?>). Behaviour would be unchanged from the existing macro, but it would make it possible for users to override the template on a per-project basis to add things like the edit links.

comment:3 Changed 17 years ago by Noah Kantrowitz

For starters, ClearSilver is not used in 0.11 (where any new features would be added). Second, this only makes sense on the wiki include format, thus making it not generalized. Third, this would be pretty trivial to make into its own plugin, so I see no reason to add it.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Noah Kantrowitz.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.