Edgewall Software
Modify

Ticket #2781 (closed enhancement: fixed)

Opened 6 years ago

Last modified 12 months ago

can't see attachments when editing a page

Reported by: amalik@… Owned by: rblank
Priority: low Milestone: 0.12.1
Component: wiki system Version: 0.11
Severity: minor Keywords: editing wiki attachments jquery interface
Cc:
Release Notes:
API Changes:

Description

It would be nice to be able to see what attachments are on the page when editing it. I often have to link to an attachment from with the wiki text but may not know the exact file name (or remember if its attached yet).

Taking it a step further, it would be good to be able to add attachments when editing a page.

Attachments

Change History

comment:1 in reply to: ↑ description Changed 5 years ago by cboos

  • Keywords jquery interface added
  • Milestone set to 2.0

Replying to amalik@opencrowd.com:

It would be nice to be able to see what attachments are on the page when editing it. I often have to link to an attachment from with the wiki text but may not know the exact file name (or remember if its attached yet).

That would probably do no harm. There could even be a smart way to directly insert an attachment link into the textarea, ideally by dragging an attachment link and dropping it into the textarea...

Taking it a step further, it would be good to be able to add attachments when editing a page.

Well, this has the same negative implications with the preview that were discussed for the new ticket.

comment:2 Changed 4 years ago by adnan@…

  • Version changed from 0.9.4 to 0.11

For a quick fix on Trac 0.11 add the following lines:

trac/wiki/web_ui.py:

411a412
>       context = Context.from_request(req, page.resource)
416a418
>           'attachments': AttachmentModule(self.env).attachment_data(context),

trac/wiki/templates/wiki_edit.html:

89a90
>       ${list_of_attachments(attachments, compact=True)}

This will add the list of attachments (same as the one on the view wiki page) to the edit wiki page.

Last edited 20 months ago by cboos (previous) (diff)

comment:3 Changed 22 months ago by cboos

  • Milestone changed from 2.0 to unscheduled

Milestone 2.0 deleted

comment:4 Changed 20 months ago by cboos

  • Milestone changed from triaging to next-major-0.1X
  • Priority changed from normal to low

Could be useful, yes.

comment:5 Changed 19 months ago by rblank

  • Owner changed from jonas to rblank

comment:6 follow-up: Changed 19 months ago by rblank

  • Milestone changed from next-major-0.1X to 0.13
  • Resolution set to fixed
  • Status changed from new to closed

As of [9960], the list of attachments is shown in the wiki page editor.

A drag & drop function would probably not be very practical, especially in the side-by-side view, as the list of attachments will often be too far from the edit location, and browsers don't scroll during a drag operation.

comment:7 in reply to: ↑ 6 ; follow-up: Changed 19 months ago by cboos

Replying to rblank:

As of [9960], the list of attachments is shown in the wiki page editor.

Works fine. Good to have some new features to test ;-)

A drag & drop function would probably not be very practical, especially in the side-by-side view, as the list of attachments will often be too far from the edit location, and browsers don't scroll during a drag operation.

We could eventually replace the download button, which is probably of little use in the context of an edit, with another one that would insert a link to the attachement at the current cursor position?

comment:8 in reply to: ↑ 7 Changed 19 months ago by rblank

  • Resolution fixed deleted
  • Status changed from closed to reopened

Replying to cboos:

We could eventually replace the download button, which is probably of little use in the context of an edit, with another one that would insert a link to the attachement at the current cursor position?

Yeah, I thought about that, too (adding a button per attachment), but was wary of the proliferation of small icons next to links ;) We could indeed replace the raw download icon, but that would make the view less consistent. Also, the same functionality could be added to the milestone and ticket editors (with some subtlety in the latter, as we would have to keep track of the last <textarea> used (description, comment, custom field)).

I'll still experiment a bit with adding a small icon before the link (so the icons are nicely aligned), maybe it's not that bad. The most difficult part will of course be to draw an icon that isn't ugly :)

comment:9 Changed 12 months ago by rblank

  • Milestone changed from 0.13 to 0.12.1
  • Resolution set to fixed
  • Status changed from reopened to closed

The original issue was solved, so let's close this and open a new ticket for the "insert attachment link" enhancement.

comment:10 Changed 12 months ago by cboos

Ok, this smart insert topic is probably something that will come up once we get more familiar with the dynamic completion.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from rblank. Next status will be 'closed'
Author


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

 
Note: See TracTickets for help on using tickets.