Feature #4416

Link from version details page to edit the wiki.

Added by alten benelux almost 8 years ago. Updated about 7 years ago.

Status:ClosedStart date:2009-12-16
Priority:NormalDue date:
Assignee:Jean-Baptiste Barth% 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).

add_link_to_edit_associated_wiki_page_to_version_show.patch Magnifier - Adds a link to edit the associated wiki page to the show version page (18.7 KB) Felix Schäfer, 2010-07-12 21:40


Related issues

Related to Redmine - Defect #6435: Links to wikipages bound to versions do not respect versi... Closed 2010-09-20
Related to Redmine - Defect #6776: Weird link_to_if_authorized behavior Closed 2010-10-30

Associated revisions

Revision 4101
Added by Jean-Baptiste Barth about 7 years ago

Adds a link to edit the associated wiki page on the version view. #4416

Contributed by Felix Schäfer

Revision 4307
Added by Jean-Baptiste Barth about 7 years ago

Fix wikilinks in project > settings > versions and version view. #6435 #4416

Contributed by Mischa The Evil and Felix Schäfer.

History

#1 Updated by Felix Schäfer over 7 years ago

Here my proposed patch.

#2 Updated by Mischa The Evil over 7 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 about 7 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 about 7 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 about 7 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 about 7 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 about 7 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 about 7 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 about 7 years ago

JBB,

Could you also take a look at the related issue #6435?

#10 Updated by Eric Davis about 7 years ago

  • Target version set to 1.0.3

#11 Updated by Felix Schäfer about 7 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 about 7 years ago

  • Status changed from 7 to Resolved
  • Resolution set to Fixed

Have you investigated the problem with link_to_if_authorized ? Anyway, I applied the patch in r4307 for 1.0.3 release (Eric: don't forget to merge r4101 too), hoping we could simplify those statements soon.

#13 Updated by Felix Schäfer about 7 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 about 7 years ago

  • Status changed from Resolved to Closed

Merged into 1.0-stable for release in 1.0.3

Also available in: Atom PDF