Changes between Version 2 and Version 3 of TracNavigation


Ignore:
Timestamp:
Dec 30, 2016, 2:54:47 AM (7 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracNavigation

    v2 v3  
    1 = ナビゲーション = #TracNavigation
     1= Trac Navigation
    22
    3 Trac 0.11 以降では、メインナビゲーションとメタナビゲーションのエントリを簡単な方法でカスタマイズできるようになりました。
    4 
    5 新しく追加されたコンフィグのセクション `[mainnav]` と `[metanav]` を使用すると、ナビゲーション項目に使用されるテキストとリンクをカスタマイズしたり、無効化することができます。コンフィグのセクション `[trac]` に `mainnav` と `metanav` をオプションとして使用すると、並び順を変更することができます。
     3The main and meta navigation entries can be customized in some basic ways. The `[mainnav]` and `[metanav]` configuration sections can be used to customize the navigation item text and link, change the ordering of the navigation items, or even disable them.
    64
    75=== `[mainnav]` #mainnav-bar
    8 `[mainnav]` は '''メインナビゲーションバー (main navigation bar)''' に対応しています。メインナビゲーションは ''Wiki'', ''タイムライン'' (英語版では ''Timeline''), ''ロードマップ'' (英語版では ''Roadmap''), ''リポジトリブラウザ'' (英語版では ''Browse Source'') のようなエントリを含むバーです。このナビゲーションバーは 現在のユーザがアクセス可能な Trac で有効な各メインモジュールのデフォルトページにアクセスします。
     6`[mainnav]` corresponds to the '''main navigation bar''', the one containing entries such as ''Wiki'', ''Timeline'', ''Roadmap'', ''Browse Source'' and so on. This navigation bar is meant to access the default page of the main modules enabled in Trac that are accessible for the current user.
    97
    108
    11 ** [=#Example 例] **
     9** [=#Example Example] **
    1210
    13 以下の例では、 Wiki のスタートページへのリンク名を "Home" に変更して、"チケットを見る" (英語版では "View Tickets") エントリを特定のレポートにリンクさせます。2 つめの例では、"ヘルプ/ガイド" (英語版では "!Help/Guide") を非表示にします。
    14 
    15 TracIni からの引用:
    16 {{{
     11In the following example we rename the link to WikiStart //Home//, and make the //View Tickets// entry link to a specific report.
     12{{{#!ini
    1713[mainnav]
    1814wiki.label = Home
     
    2117
    2218=== `[metanav]` #metanav-bar
    23 `[metanav]` は '''メタナビゲーションバー (meta navigation bar)''' に対応しています。メタナビゲーションは通常、メインナビゲーションバーの上、 ''検索'' (英語版では ''Search'') ボックスの下に配置されています。 ''ログイン'' (英語版では ''Log in''), ''ログアウト'' (英語版では ''Logout''), ''ヘルプ/ガイド'' (英語版では ''!Help/Guide'') などのエントリが含まれています。このナビゲーションバーは Trac プロジェクト全体の情報や、現在のユーザの情報にアクセスします。
     19`[metanav]` corresponds to the '''meta navigation bar''', by default positioned above the main navigation bar and below the ''Search'' box. It contains the ''Login'', ''Logout'', ''!Help/Guide'' etc. entries. This navigation bar is meant to access some global information about the Trac project and the current user.
    2420
    25 `[metanav]` セクションには特別なエントリを記述できます: `logout.redirect` を設定することで、ログアウト後に表示するページを指定できます。
    26 [[comment([trac:#3808 #Trac3808] を参照してください)]]
     21There is one special entry in the  `[metanav]` section: `logout.redirect` is the page the user sees after hitting the logout button.  The ''!Help/Guide'' link is also hidden in the following example.
     22[[comment(see also #Trac3808)]]
    2723
    28 ** 例 **
     24** Example **
    2925
    30 {{{
     26{{{#!ini
    3127[metanav]
    3228help = disabled
     
    3531
    3632
    37 === Notes === #Notes
    38 記述可能な URL のフォーマット (for `.href` or `.redirect`):
    39 || '''設定内容''' || '''リダイレクト先''' ||
     33=== URL Formats
     34Possible URL formats for `.href` or `.redirect`:
     35|| '''config''' || '''redirect to''' ||
    4036|| `wiki/Logout` || `/projects/env/wiki/Logout` ||
    4137|| `http://hostname/` || `http://hostname/` ||
     
    4339
    4440
    45 === `[trac]` #nav-order
    46 コンフィグのセクション `[trac]` に `mainnav` と `metanav` をオプションとして使用すると、ナビゲーション項目の表示順を変更することができます。プラグインをインストールしナビゲーション項目が追加されても有効です。
     41=== Ordering #nav-order
     42The `order` attribute specifies the order in which the navigation items are displayed. This can be particularly useful for plugins that add navigation items.
    4743
    48 ** 例 **
     44Non-negative floating point values may be used for the `order` attribute. The navigation items will be arranged from left to right in increasing order. Navigation items without an `order` attribute are sorted alphabetically by name.
    4945
    50 以下の例では、チケットに関連する項目を優先し、左側に移動させています。
     46The default values are:
     47{{{#!ini
     48[mainnav]
     49browser.order = 4
     50newticket.order = 6
     51roadmap.order = 3
     52search.order = 7
     53tickets.order = 5
     54timeline.order = 2
     55wiki.order = 1
    5156
    52 TracIni からの引用:
    53 {{{
    54 [trac]
    55 mainnav = wiki,tickets,newticket,timeline,roadmap,browser,search,admin
     57[metanav]
     58about.order = 5
     59help.order = 4
     60login.order = 1
     61logout.order = 2
     62prefs.order = 3
    5663}}}
    5764
    58 並び順と項目名の初期値はソースの中に記されています。その記述は [source:trunk/trac/web/chrome.py@10883:397,402-403#L396 ここ] です。
     65=== Context Navigation #ctxtnav-bar
    5966
    60 === コンテキストナビゲーション === #ctxtnav-bar
    61 
    62 今のところ、 '''コンテキストナビゲーションバー (contextual navigation bar)''' をカスタマイズすることはできません。コンテキストナビゲーションはメインナビゲーションの下に位置するバーです。
    63 
     67Note that it is still not possible to customize the '''contextual navigation bar''', ie the one usually placed below the main navigation bar.
    6468
    6569----
    66 See also: TracInterfaceCustomization, [http://trac-hacks.org/wiki/NavAddPlugin TracHacks:NavAddPlugin] または [http://trac-hacks.org/wiki/MenusPlugin TracHacks:MenusPlugin] (エントリを追加する際に必要になります)
     70See also: TracInterfaceCustomization, and the [http://trac-hacks.org/wiki/NavAddPlugin TracHacks:NavAddPlugin] or [http://trac-hacks.org/wiki/MenusPlugin TracHacks:MenusPlugin] (still needed for adding entries)