#2781 closed enhancement (fixed)
can't see attachments when editing a page
Reported by: | Owned by: | Remy Blank | |
---|---|---|---|
Priority: | low | Milestone: | 0.12.1 |
Component: | wiki system | Version: | 0.11 |
Severity: | minor | Keywords: | editing wiki attachments jquery interface |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal 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 (0)
Change History (10)
comment:1 by , 18 years ago
Keywords: | jquery interface added |
---|---|
Milestone: | → 2.0 |
comment:2 by , 16 years ago
Version: | 0.9.4 → 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.
comment:4 by , 14 years ago
Milestone: | triaging → next-major-0.1X |
---|---|
Priority: | normal → low |
Could be useful, yes.
comment:5 by , 14 years ago
Owner: | changed from | to
---|
follow-up: 7 comment:6 by , 14 years ago
Milestone: | next-major-0.1X → 0.13 |
---|---|
Resolution: | → fixed |
Status: | new → 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.
follow-up: 8 comment:7 by , 14 years ago
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 by , 14 years ago
Resolution: | fixed |
---|---|
Status: | closed → 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 by , 14 years ago
Milestone: | 0.13 → 0.12.1 |
---|---|
Resolution: | → fixed |
Status: | reopened → closed |
The original issue was solved, so let's close this and open a new ticket for the "insert attachment link" enhancement.
comment:10 by , 14 years ago
Ok, this smart insert topic is probably something that will come up once we get more familiar with the dynamic completion.
Replying to amalik@opencrowd.com:
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…
Well, this has the same negative implications with the preview that were discussed for the new ticket.