プロジェクト

全般

プロフィール

Vote #65147

完了

remove "main-menu" div when the menu is empty

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

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

100%

予定工数:
category_id:
10
version_id:
18
issue_org_id:
3259
author_id:
1407
assigned_to_id:
1
comments:
6
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
9
ステータス-->[Closed]

説明

On some pages, like Home or My page, the project menu is empty but the div html is still present.

It's a problem when you a background image in CSS, because you see the background image without the menu items (see the screenshot).

Could you remove:

or add a CSS class to identify an empty menu ?

Thank you very much.


journals

Fixed by:

* Saving for the result of render_main_menu into menu_html
* Adding a class "empty" on main_menu if menu_html.nil?

The attached patch should resolve this issue.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
JPLang, pushing this up on your radar. The patch seems ok, though I'm not sure this kind of logic should be in a view, I don't have a better idea at the moment though.
--------------------------------------------------------------------------------
Felix Schäfer wrote:
> The patch seems ok, though I'm not sure this kind of logic should be in a view, I don't have a better idea at the moment though.

I agree. I've committed a different version of it which will not display the main-menu div if it's empty ("commit":http://github.com/edavis10/redmine/commit/7514e12d331bea026155df6cdc2b68df8b77d7b1 r3539)
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,New,13773,remove "main-menu" div when the project menu is empty

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

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

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

いいね!0
いいね!0