Feature #4416
closedLink from version details page to edit the wiki.
100%
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).
Files
Related issues
Updated by Felix Schäfer over 14 years ago
- File add_link_to_edit_associated_wiki_page_to_version_show.patch 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.
Updated by Mischa The Evil over 14 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??
Updated by Felix Schäfer over 14 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 grenot: this one's for you :-)
Updated by Jean-Baptiste Barth over 14 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).
Updated by Mischa The Evil over 14 years ago
- Status changed from Resolved to 7
- Resolution deleted (
Fixed)
Артем Малахов, 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>
Updated by Jean-Baptiste Barth over 14 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.
Updated by Mischa The Evil over 14 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...
Updated by Eric Davis over 14 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.
Updated by Mischa The Evil about 14 years ago
JBB,
Could you also take a look at the related issue #6435?
Updated by Felix Schäfer about 14 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)
Updated by Jean-Baptiste Barth about 14 years ago
- Status changed from 7 to Resolved
- Resolution set to Fixed
Updated by Felix Schäfer about 14 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.
Updated by Eric Davis about 14 years ago
- Status changed from Resolved to Closed
Merged into 1.0-stable for release in 1.0.3