プロジェクト

全般

プロフィール

Vote #66188

完了

Link from version details page to edit the wiki.

Admin Redmine さんがほぼ2年前に追加. ほぼ2年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
UI_10
対象バージョン:
開始日:
2009/12/16
期日:
進捗率:

100%

予定工数:
category_id:
10
version_id:
25
issue_org_id:
4416
author_id:
8893
assigned_to_id:
1188
comments:
14
status_id:
5
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

+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).


journals

Here my proposed patch.
--------------------------------------------------------------------------------
Felix Schäfer wrote:
> Here my proposed patch.

Great! It's a small but time-saving change which might be targetted to Redmine version#21??
--------------------------------------------------------------------------------
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 :-)
--------------------------------------------------------------------------------
Thanks, committed in r4101 (I added french translation, I presume Azamat will deal with other locales).
--------------------------------------------------------------------------------
@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:

<pre><code class="diff">
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>
</code></pre>
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
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...
--------------------------------------------------------------------------------
Let me know when this is ready for 1.0.2 and I'll merge r4101 along with the fix.
--------------------------------------------------------------------------------
JBB,

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

--------------------------------------------------------------------------------
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)
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
Merged into 1.0-stable for release in 1.0.3
--------------------------------------------------------------------------------


related_issues

relates,Closed,6435,Links to wikipages bound to versions do not respect version-sharing in Settings -> Versions
relates,Closed,6776,Weird link_to_if_authorized behavior

Admin Redmine さんがほぼ2年前に更新

  • カテゴリUI_10 にセット
  • 対象バージョン1.0.3_25 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0