Feature #4416
Link from version details page to edit the wiki.
Status: | Closed | Start date: | 2009-12-16 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | % Done: | 100% | ||
Category: | UI | |||
Target version: | 1.0.3 | |||
Resolution: | Fixed |
Description
Context
From Roadmap > Version X you can see all the details of the version + the content of the associated wiki page.
You can also edit details with the upper-right 'Edit' link.
But -- correct me if I'm wrong -- you can't edit the wiki page directly. You have to go to the wiki section and find the page.
Description
This mini-feature would add a link on the version details leading to the wiki page (read or already edit mode, TBD).
Benefit
This will save some time when editing (I don't know about you, but I do it all the time).
Related issues
Associated revisions
Adds a link to edit the associated wiki page on the version view. #4416
Contributed by Felix Schäfer
History
#1
Updated by Felix Schäfer almost 12 years ago
- File add_link_to_edit_associated_wiki_page_to_version_show.patch
added
- Category set to UI
- Status changed from New to 7
- Assignee set to Felix Schäfer
Here my proposed patch.
#2
Updated by Mischa The Evil almost 12 years ago
Felix Schäfer wrote:
Here my proposed patch.
Great! It's a small but time-saving change which might be targetted to Redmine 1.0.1??
#3
Updated by Felix Schäfer almost 12 years ago
- Assignee changed from Felix Schäfer to Jean-Baptiste Barth
I've updated the patch so it merges correctly (the locales fail to merge, the code works ok though), the commit can be found here: http://github.com/thegcat/redmine/commit/f1a8ca801f728d9ed6ed40467fd0c73ecc768219
@JB: this one's for you :-)
#4
Updated by Jean-Baptiste Barth almost 12 years ago
- Status changed from 7 to Resolved
- Target version set to 1.0.2
- % Done changed from 0 to 100
- Resolution set to Fixed
Thanks, committed in r4101 (I added french translation, I presume Azamat will deal with other locales).
#5
Updated by Mischa The Evil almost 12 years ago
- Status changed from Resolved to 7
- Resolution deleted (
Fixed)
@FS, JBB,
r4101 misses the :id
parameter in the URL. This leads to incorrect links to the designated wiki-pages (in my case it led to an edit-link linking to the correct-page in wrong projects (since it uses the version_id
as the project_id
)).
This can be fixed easily by applying the following patch:
Index: app/views/versions/show.rhtml
===================================================================
--- app/views/versions/show.rhtml (revision 4101)
+++ app/views/versions/show.rhtml (working copy)
@@ -1,6 +1,6 @@
<div class="contextual">
<%= link_to_if_authorized l(:button_edit), {:controller => 'versions', :action => 'edit', :id => @version}, :class => 'icon icon-edit' %>
-<%= link_to_if_authorized(l(:button_edit_associated_wikipage, :page_title => @version.wiki_page_title), {:controller => 'wiki', :action => 'edit', :page => Wiki.titleize(@version.wiki_page_title)}, :class => 'icon icon-edit') unless @version.wiki_page_title.blank? || @project.wiki.nil? %>
+<%= link_to_if_authorized(l(:button_edit_associated_wikipage, :page_title => @version.wiki_page_title), {:controller => 'wiki', :action => 'edit', :id => @project, :page => Wiki.titleize(@version.wiki_page_title)}, :class => 'icon icon-edit') unless @version.wiki_page_title.blank? || @project.wiki.nil? %>
<%= call_hook(:view_versions_show_contextual, { :version => @version, :project => @project }) %>
</div>
#6
Updated by Jean-Baptiste Barth almost 12 years ago
Thanks Mischa, I'll have a look at it.
Is there any reason why links in "Roadmap" section and "Settings" section are not the same ? The first ones are scoped under the project, the second ones not. Maybe it should be unified too.
#7
Updated by Mischa The Evil almost 12 years ago
Jean-Baptiste Barth wrote:
Is there any reason why links in "Roadmap" section and "Settings" section are not the same ? The first ones are scoped under the project, the second ones not. Maybe it should be unified too.
Hmm, not sure but I guess it's mainly due to historical design-choices by JPL which may have been obsoleted/changed in time. Limited by my current skills/time I'm not able to say whether it should/could be unified...
#8
Updated by Eric Davis almost 12 years ago
- Target version deleted (
1.0.2)
Let me know when this is ready for 1.0.2 and I'll merge r4101 along with the fix.
#9
Updated by Mischa The Evil over 11 years ago
JBB,
Could you also take a look at the related issue #6435?
#10
Updated by Eric Davis over 11 years ago
- Target version set to 1.0.3
#11
Updated by Felix Schäfer over 11 years ago
Ok, just adapted Mischa's patch to trunk and used the same link in the project settings > versions. The idea for the later was to only show the title instead of the link to the wiki page if the user doesn't have the permission to view it, but link_to_if_authorized
doesn't seem to get it correctly, I suppose that's a problem with link_to_if_authorized
rather than with the changes here though.
See http://github.com/thegcat/redmine/commit/45dd6cf75fefdae756e82c305231d59814d4260c (also fixes #6435)
#12
Updated by Jean-Baptiste Barth over 11 years ago
- Status changed from 7 to Resolved
- Resolution set to Fixed
#13
Updated by Felix Schäfer over 11 years ago
Jean-Baptiste Barth wrote:
Have you investigated the problem with
link_to_if_authorized
?
No, and I have other more important stuff to tackle before that. Opened #6776 to remember to investigate that.
#14
Updated by Eric Davis over 11 years ago
- Status changed from Resolved to Closed
Merged into 1.0-stable for release in 1.0.3