/** * 項目の移動メニューHTMLを出力する * * @param string $formName フォーム名 * @param int $userAttrSettingId UserAttributeSetting.id * @param int $updWeight 順序 * @param int $updRow ○段目 * @param int $updCol 行 * @param string $disabled disabledのCSS * @param string $class ボタンのCSS * @param string $message メッセージ * @return string HTML */ private function __moveSettingForm($formName, $userAttrSettingId, $updWeight, $updRow, $updCol, $disabled, $class, $message) { $output = ''; $output .= '<li' . $disabled . '>'; if ($disabled) { $output .= '<a href=""> '; } else { $output .= '<a href="" onclick="$(\'form[name=' . $formName . ']\')[0].submit()"> '; } if ($class) { $output .= '<span class="glyphicon ' . $class . '">' . $message . '</span>'; } else { $output .= '<span>' . $message . '</span>'; } $output .= $this->NetCommonsForm->create(null, array('type' => 'put', 'name' => $formName, 'url' => NetCommonsUrl::actionUrlAsArray(array('controller' => 'user_attribute_settings', 'action' => 'move', 'key' => $userAttrSettingId)))); $output .= $this->NetCommonsForm->hidden('UserAttributeSetting.id', array('value' => $userAttrSettingId)); $output .= $this->NetCommonsForm->hidden('UserAttributeSetting.row', array('value' => $updRow)); if ($updCol) { $output .= $this->NetCommonsForm->hidden('UserAttributeSetting.col', array('value' => $updCol)); } if ($updWeight) { $output .= $this->NetCommonsForm->hidden('UserAttributeSetting.weight', array('value' => $updWeight)); } $output .= $this->NetCommonsForm->end(); $output .= '</a></li>'; return $output; }