3 * @link https://datagram.co.jp/source/bksj for the canonical source repository
4 * @copyright Copyright (c) 2006-2019 Datagram Ltd. (https://datagram.co.jp)
5 * @license https://datagram.co.jp/source/bksj/license.txt
10 $basic = $ctrl->basic;
11 $cnd = $ctrl->dat['cnd'];
12 $list = $ctrl->dat['list'];
13 $cnt = count($list['rec']);
15 <script type="text/javascript">
29 gotoNext: function(func) {
37 this.func.val('UserSection');
38 this.act.val('create');
43 drop: function(id, name) {
47 if (!confirm("部門 " + name + " を削除しますか?")) {
56 'func': 'UserSection',
63 eval("this.ans = " + data);
66 this.ans = {"sts": "NG", "err": "ajax error"};
69 if (this.ans.sts == 'NG') {
74 this.gotoNext('UserSection', 'remember');
80 this.func.val('UserSection');
89 var curr = this.v_page_curr.val() * 1;
90 var last = this.v_page_last.val() * 1;
94 case -9: next = 1; break;
95 case 9: next = last; break;
96 default: next = curr + dlt; break;
107 this.v_page_curr.val(next);
115 if (this.v_page_curr.val() < 1) {
116 this.v_page_curr.val(1);
119 this.func.val('UserSection');
120 this.act.val('search');
121 this.cnd_name.val(this.v_cnd_name.val());
122 this.page_curr.val(this.v_page_curr.val());
128 this.v_cnd_name.val('');
129 this.v_page_curr.val(1);
134 this.next = $('#next');
135 this.func = $('#func');
136 this.act = $('#act');
138 this.cnd_name = $('#cnd_name');
139 this.page_curr = $('#page_curr');
140 this.v_cnd_name = $('#v_cnd_name');
141 this.v_page_curr = $('#v_page_curr');
142 this.v_page_last = $('#v_page_last');
152 <form method="post" name="next" id="next" action="<?= $base ?>">
153 <input type="hidden" name="func" id="func">
154 <input type="hidden" name="act" id="act">
155 <input type="hidden" name="cnd_name" id="cnd_name">
156 <input type="hidden" name="page_curr" id="page_curr">
157 <input type="hidden" name="id" id="id">
158 <input type="hidden" name="bid" id="bid" value="<?= $bid ?>">
161 <table id="my_header" width="100%">
164 <a onclick="return my.gotoNext('UserMenu');">メニュー</a>
167 <td style="text-align: right;">
168 <button type="button" class="my_magenta" style="width: 120px;" onclick="return my.gotoNext('Login');">ログアウト</button>
172 <td colspan="2" style="text-align: center;">
173 <?= $view->strBasic($basic) ?>
178 <div style="height: 5px;"> </div>
183 <table class="my_table" width="100%">
185 <th class="my_border">部門情報</th>
189 <div style="height: 1px;"> </div><hr>
191 <table class="my_table" width="100%">
193 <th colspan="3" class="my_border">絞込み検索</th>
196 <td class="my_border" style="text-align: center; width: 110px;" rowspan="2">
197 <table class="my_table" cellpadding="0" cellspacing="2">
200 <button type="button" class="my_cyan" style="width: 100px;" onclick="return my.search();">検索</button>
205 <button type="button" class="my_magenta" style="width: 100px;" onclick="return my.reset();">検索リセット</button>
210 <th class="my_border" style="width: 100px;">部門(かな)</th>
211 <td class="my_border">
212 <input id="v_cnd_name" type="text" value="<?= $view->str($cnd['cnd_kana']) ?>" size="40" style="text-align: left;">
216 <th class="my_border">部門</th>
217 <td class="my_border">
218 <input id="v_cnd_name" type="text" value="<?= $view->str($cnd['cnd_name']) ?>" size="40" style="text-align: left;">
223 <div style="height: 1px;"> </div><hr>
225 <table class="my_table" width="100%">
227 <td class="my_border" id="my_create">
228 <button type="button" class="my_cyan" style="width: 150px;" onclick="return my.create();">新規部門作成</button>
233 <div style="height: 2px;"> </div>
237 <td style="text-align: left; width: 20%;">全件数:<?= $list['cnt'] ?>[件]</td>
239 if ($list['cnt'] < 1) {
241 <td style="visibility: hidden;">
245 <td style="text-align: center;">
249 <button type="button" class="my_blue" style="width: 40px;" onclick="return my.move(-9);">|<</button>
250 <button type="button" class="my_blue" style="width: 40px;" onclick="return my.move(-1);"><</button>
251 <input id="v_page_last" type="hidden" value="<?= $list['last'] ?>">
252 <input id="v_page_curr" style="text-align: right;" type="text" size="4" value="<?= $list['page'] ?>">/<?= $list['last'] ?>[ページ]
253 <button type="button" class="my_blue" style="width: 40px;" onclick="return my.move(1);">></button>
254 <button type="button" class="my_blue" style="width: 40px;" onclick="return my.move(9);">>|</button>
256 <td style="text-align: right; left; width: 20%;">
257 表示数:<?= $list['rpp'] ?>[件/ページ]
262 <div style="height: 2px;"> </div>
264 <table class="my_list">
275 if ($list['cnt'] < 1) {
278 <td colspan="5">データなし</td>
282 $i = ($list['page'] - 1) * $list['rpp'];
283 foreach ($list['rec'] as $rec) {
288 $name = $view->str($rec['name']);
298 <td style="text-align: center;">
299 <button type="button" class="my_green" onclick="return my.edit('<?= $id ?>');">編集</button>
304 <td style="text-align: right;"><?= $i ?></td>
305 <td><?= $name ?></td>
314 <button type="button" class="my_magenta" onclick="return my.drop('<?= $id ?>', '<?= $name ?>');">削除</button>