Project

General

Profile

Actions

Feature #4416

closed

Link from version details page to edit the wiki.

Added by alten benelux almost 15 years ago. Updated about 14 years ago.

Status:
Closed
Priority:
Normal
Category:
UI
Target version:
Start date:
2009-12-16
Due date:
% Done:

100%

Estimated time:
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).


Files

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

Related issues

Related to Redmine - Defect #6435: Links to wikipages bound to versions do not respect version-sharing in Settings -> VersionsClosedMischa The Evil2010-09-20

Actions
Related to Redmine - Defect #6776: Weird link_to_if_authorized behaviorClosed2010-10-30

Actions
Actions #1

Updated by Felix Schäfer over 14 years ago

Here my proposed patch.

Actions #2

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??

Actions #3

Updated by Felix Schäfer about 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 :-)

Actions #4

Updated by Jean-Baptiste Barth about 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).

Actions #5

Updated by Mischa The Evil about 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>
 
Actions #6

Updated by Jean-Baptiste Barth about 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.

Actions #7

Updated by Mischa The Evil about 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...

Actions #8

Updated by Eric Davis about 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.

Actions #9

Updated by Mischa The Evil about 14 years ago

JBB,

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

Actions #10

Updated by Eric Davis about 14 years ago

  • Target version set to 1.0.3
Actions #11

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)

Actions #12

Updated by Jean-Baptiste Barth about 14 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.

Actions #13

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.

Actions #14

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

Actions

Also available in: Atom PDF