1[%# This Source Code Form is subject to the terms of the Mozilla Public 2 # License, v. 2.0. If a copy of the MPL was not distributed with this 3 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 # 5 # This Source Code Form is "Incompatible With Secondary Licenses", as 6 # defined by the Mozilla Public License, v. 2.0. 7 #%] 8 9[%# INTERFACE: 10 # queryshare_groups: list of groups the user may share queries with 11 # (id, name). 12 # bless_group_ids: list of group ids the user may bless. 13 #%] 14 15[% IF user.can_bless %] 16 <script type="text/javascript"><!-- 17 function update_checkbox(group) { 18 var bless_groups = [[% bless_group_ids.join(",") FILTER js %]]; 19 var checkbox = document.getElementById(group.name.replace(/share_(\d+)/, "force_$1")); 20 21 if (bz_isValueInArray(bless_groups, group.value)) { 22 YAHOO.util.Dom.removeClass(checkbox.parentNode, "bz_default_hidden"); 23 } else { 24 YAHOO.util.Dom.addClass(checkbox.parentNode, "bz_default_hidden"); 25 checkbox.checked = false; 26 } 27 } //--> 28 </script> 29[% END %] 30 31<p>あなたの保存された検索は以下のとおりです:</p> 32 33 <table id="saved_search_prefs"> 34 <tr class="column_header"> 35 <th>検索名</th> 36 <th>実行</th> 37 <th>編集</th> 38 <th>破棄</th> 39 <th>フッタに表示</th> 40 [% may_share = user.in_group(Param('querysharegroup')) && queryshare_groups.size %] 41 [% IF may_share %] 42 <th>グループ内で共有</th> 43 [% END %] 44 [% Hook.process('saved-header') %] 45 </tr> 46 <tr> 47 <td>わたしの [% terms.Bugs %]</td> 48 <td> 49 [% filtered_username = user.login FILTER uri %] 50 <a href="[% Param('mybugstemplate').replace('%userid%', filtered_username) %]">実行</a> 51 </td> 52 <td></td> 53 <td></td> 54 <td align="center"> 55 <input type="checkbox" name="showmybugslink" value="1" 56 [%+ 'checked="checked"' IF user.showmybugslink %]> 57 </td> 58 [% IF may_share %] 59 <td>—</td> 60 [% END %] 61 [% Hook.process('saved-row') %] 62 </tr> 63 [% FOREACH q = user.queries %] 64 <tr [% 'class="shared_search"' IF q.shared_with_group.id %]> 65 <td>[% q.name FILTER html %]</td> 66 <td> 67 <a href="buglist.cgi?cmdtype=dorem&remaction=run&namedcmd=[% q.name FILTER uri %] 68 [% IF q.shared_with_group.id %]&sharer_id=[% user.id FILTER uri %][% END %]">実行</a> 69 </td> 70 <td> 71 <a href="query.cgi?[% q.edit_link FILTER html %]&known_name= 72 [% q.name FILTER uri %]">編集</a> 73 </td> 74 <td> 75 [% IF q.used_in_whine %] 76 先に <a href="editwhines.cgi">whine</a> からの削除が必要 77 [% ELSE %] 78 <a href="buglist.cgi?cmdtype=dorem&remaction=forget&namedcmd= 79 [% q.name FILTER uri %]&token= 80 [% issue_hash_token([q.id, q.name]) FILTER uri %]">削除</a> 81 [% END %] 82 </td> 83 <td class="center"> 84 <input type="checkbox" 85 name="link_in_footer_[% q.id FILTER html %]" 86 value="1" 87 alt="[% q.name FILTER html %]" 88 [% " checked" IF q.link_in_footer %]> 89 </td> 90 [% IF may_share %] 91 <td> 92 <select name="share_[% q.id FILTER html %]" 93 [% IF user.can_bless %] onchange="update_checkbox(this);"[% END %]> 94 <option value="">非共有</option> 95 [% FOREACH group = queryshare_groups %] 96 <option value="[% group.id %]" 97 [% ' selected="selected"' 98 IF q.shared_with_group.id == group.id %] 99 >[% group.name FILTER html %]</option> 100 [% END %] 101 </select> 102 [% IF q.shared_with_group.id %] 103 (<a href="buglist.cgi?cmdtype=dorem&remaction=run&namedcmd= 104 [% q.name FILTER uri %]&sharer_id= 105 [% user.id FILTER uri %]">リンク</a>) 106 [% END %] 107 [% IF user.can_bless %] 108 <span [% IF !bless_group_ids.grep("^$q.shared_with_group.id\$").0 109 %]class="bz_default_hidden"[% END %]> 110 <input type="checkbox" id="force_[% q.id FILTER html %]" 111 name="force_[% q.id FILTER html %]" value="1"> 112 <label for="force_[% q.id FILTER html %]">フッタに追加</label> 113 </span> 114 [% END %] 115 [% IF q.shared_with_users %] 116 ([% q.shared_with_users FILTER html %] 117 [%+ q.shared_with_users > 1 ? "users" : "user" %] と共有) 118 [% END %] 119 </td> 120 [% END %] 121 [% Hook.process('saved-row') %] 122 </tr> 123 [% END %] 124 </table> 125[% IF user.can_bless %] 126 <p>"フッタに追加" が選択されている全ての保存された検索について、 127 変更を保存したそのときからグループのメンバー全員のフッタに表示されます。</p> 128[% END %] 129 130[% IF user.queries_available.size %] 131 <p>以下のほかのユーザが保存した検索を共有できます:</p> 132 133 <table id="shared_search_prefs"> 134 <tr class="column_header"> 135 <th>検索名</th> 136 <th>共有者</th> 137 <th>共有対象</th> 138 <th>実行</th> 139 <th>編集</th> 140 <th>フッタに表示</th> 141 </tr> 142 [% FOREACH q = user.queries_available %] 143 <tr> 144 <td>[% q.name FILTER html %]</td> 145 <td>[% q.user.identity FILTER html %]</td> 146 <td>[% q.shared_with_group.name FILTER html %]</td> 147 <td> 148 <a href="buglist.cgi?cmdtype=dorem&remaction=run&namedcmd= 149 [% q.name FILTER uri %]&sharer_id= 150 [% q.user.id FILTER uri %]">実行</a> 151 </td> 152 <td> 153 <a href="query.cgi?[% q.edit_link FILTER html %]&known_name= 154 [% q.name FILTER uri %]">編集</a> 155 </td> 156 <td class="center"> 157 <input type="checkbox" 158 name="link_in_footer_[% q.id FILTER html %]" 159 value="1" 160 alt="[% q.name FILTER html %]" 161 [% " checked" IF q.link_in_footer %]> 162 </td> 163 </tr> 164 [% END %] 165 </table> 166[% ELSE %] 167 <p>あなたが利用可能な他のユーザの共有可能な保存された検索はありません。</p> 168[% END %] 169