Esempio n. 1
0
	<form action="<?php 
echo $this->getUrl($this->getController() . '/update', array($pk => $model_instance->{$pk}));
?>
" class="frm" rel="async" method="post">
		<input type="hidden" name="sample_produce_id" value="<?php 
echo $model_instance->sample_produce_id;
?>
">
		<?php 
foreach ($extra_params as $k => $v) {
    ?>
		<input type="hidden" name="<?php 
    echo h($k);
    ?>
" value="<?php 
    echo h($v);
    ?>
">
		<?php 
}
?>

		<table class="frm-tbl">
			<caption><?php 
echo $model_instance->{$pk} ? '更新' : '新增';
echo $model_instance->getModelDesc();
?>
</caption>
			<tbody>
				<tr>
					<td class="col-label">
Esempio n. 2
0
        echo h($text);
        ?>
</span></dt>
						<dd>
							<?php 
        foreach ($define['options'] as $k => $n) {
            ?>
							<?php 
            if ($n != $text) {
                ?>
							<a href="<?php 
                echo $this->getUrl($this->getController() . '/state', array($pk => $model_instance->{$pk}, 'state' => $k));
                ?>
" rel="async">
								<?php 
                echo h($n);
                ?>
							</a>
							<?php 
            }
        }
        ?>
						</dd>
					</dl>
				</td>
				<?php 
    }
    ?>
			</tr>
			<?php 
}
Esempio n. 3
0
 private static function buildTagsInput($tag, $attributes = array(), $define = array())
 {
     $values = array_clear_empty(array_trim(explode(',', $attributes['text'])));
     $name = $attributes['name'];
     $html = '';
     $html .= '<div class="tags-input">';
     $html .= '<input type="hidden" name="' . $name . '" value="' . h($attributes['text']) . '"/>';
     if ($values) {
         $del = '<span class="del-tag" title="删除">x</span><span>';
         $html .= '<ul class="tags"><li>' . $del . join('</span></li><li>' . $del, $values) . '</span></li></ul>';
     } else {
         $html .= '<ul class="tags"></ul>';
     }
     $html .= '<input type="text" value="" placeholder="回车输入" class="txt"/>';
     $html .= '</div>';
     return $html;
 }
Esempio n. 4
0
                ?>
"
					      data-val="<?php 
                echo h($text);
                ?>
"
					      data-pk="<?php 
                echo $item[$pk];
                ?>
"
					      data-field="<?php 
                echo $field;
                ?>
">
						<?php 
                echo h($text);
                ?>
					</span>
					<?php 
            } else {
                echo $html;
            }
            ?>
				</td>
				<?php 
        } else {
            ?>
				<td style="width:100px">
					<?php 
            echo $this->displayStateSwitcher($item);
            ?>
Esempio n. 5
0
use function Lite\func\h;
if (!in_array(ControllerInterface::OP_QUICK_SEARCH, $operation_list)) {
    return;
}
/** @var ViewBase $this */
$quick_search_defines = $this->getData('quick_search_defines');
?>
<form class="search-frm well" action="<?php 
echo $this->getUrl($this->getController() . '/' . $this->getAction());
?>
" method="get">
	<?php 
if ($search['ref']) {
    ?>
	<input type="hidden" name="ref" value="<?php 
    echo h($search['ref']);
    ?>
">
	<?php 
}
?>

	<?php 
foreach ($quick_search_defines as $field => $def) {
    ?>
	<div class="frm-item">
		<label>
			<?php 
    echo $this->renderSearchFormElement($search[$field], $field, $def, null, array('placeholder' => $def['alias']));
    ?>
		</label>
Esempio n. 6
0
if ($login_user) {
    ?>
	<span class="user">
        <?php 
    echo h($login_user['name']);
    ?>
    </span>
	<div class="user-panel">
		<div class="avatar-wrap">
			<?php 
    echo $this->getImg($login_user['photo'] ?: 'default_avatar.png', array('max-width' => 90, 'max-height' => 90));
    ?>
		</div>
		<div class="user-pannel-ext">
			<p style="min-height:60px"><?php 
    echo h($login_user['name']);
    ?>
</p>
			<p>
				<a href="<?php 
    echo $this->getUrl('user/updatePassword');
    ?>
" rel="popup">修改密码</a>
				<span class="sep">|</span>
				<a href="<?php 
    echo $this->getUrl('index/logout');
    ?>
" rel="async">注销</a>
			</p>
		</div>
	</div>
Esempio n. 7
0
<div id="col-main">
	<div class="operate-bar">
		<a href="<?php 
echo $this->getUrl('SampleProduceOrder/update');
?>
" class="btn" rel="popup">新增样品生产单</a>
	</div>

	<form class="search-frm well" action="<?php 
echo $this->getUrl('SampleProduceOrder/index');
?>
" method="get">
		<div class="frm-item">
			<label>
				<input type="text" name="kw" value="<?php 
echo h($search['kw']);
?>
" class="txt" placeholder="关键字">
			</label>
		</div>
		<div class="frm-item hide">
			<label>
				<select name="produce_type">
					<option value="">全部类型</option>
					<?php 
foreach ($produce_type_options as $k => $n) {
    ?>
						<option value="<?php 
    echo $k;
    ?>
" <?php 
" >
									<?php 
    echo $name;
    ?>
								</option>
							<?php 
}
?>
						</select>
					</td>
				</tr>
				<tr>
					<td class="col-label">流程工艺备注</td>
					<td>
						<textarea name="technic_desc" cols="30" rows="3" class="small-txt txt"><?php 
echo h($data->technic_desc);
?>
</textarea>
					</td>
				</tr>
				<tr>
					<td></td>
					<td class="col-action">
						<input type="submit" value="保存" class="btn" />
					</td>
				</tr>
				</tbody>
			</table>
		</form>
	</div>
<?php 
Esempio n. 9
0
"
					      data-pk="<?php 
                echo $item[$pk];
                ?>
"
					      data-field="<?php 
                echo $field;
                ?>
">
						<?php 
                echo h($text);
                ?>
					</span>
					<?php 
            } else {
                echo $html ?: h($text);
            }
            ?>
				</td>
				<?php 
        } else {
            ?>
				<td style="width:100px">
					<?php 
            echo $this->displayStateSwitcher($item);
            ?>
				</td>
				<?php 
        }
        ?>
				<?php 
Esempio n. 10
0
 /**
  * display $model_instance
  * @param \Lite\CRUD\ModelInterface|Model $model_instance
  * @return string
  * @throws \Lite\Exception\Exception
  */
 public static function displayStateSwitcher(ModelInterface $model_instance)
 {
     $state_key = $model_instance->getStateKey();
     if (!$state_key) {
         throw new Exception('non state key found');
     }
     $define = $model_instance->getPropertiesDefine($state_key);
     $t = self::displayField($state_key, $model_instance);
     $pk = $model_instance->getPrimaryKey();
     $html = '<dl class="drop-list drop-list-left">' . '<dt><span>' . $t . '</span></dt><dd>';
     foreach ($define['options'] as $k => $n) {
         if ($n != $t) {
             $html .= '<a href="' . self::getUrl(self::getController() . '/state', array($pk => $model_instance->{$pk}, 'state' => $k)) . '" rel="async">' . h($n) . '</a>';
         }
     }
     $html .= '</dd></dl>';
     return $html;
 }
Esempio n. 11
0
		<?php 
include $this->resolveTemplate('crud/quick_search.inc.php');
?>

		<table class="data-tbl" data-empty-fill="1">
			<caption><?php 
echo $model_instance->getModelDesc();
?>
列表</caption>
			<thead>
			<tr>
				<?php 
foreach ($display_fields as $field => $alias) {
    ?>
					<th><?php 
    echo h($alias);
    ?>
</th>
				<?php 
}
?>
				<th style="width:50px">操作</th>
			</tr>
			</thead>
			<tbody>
			<?php 
/** @var BusinessOrder $order */
foreach ($data_list ?: array() as $order) {
    ?>
				<tr>
					<?php 
Esempio n. 12
0
				<?php 
    foreach ($flows as $id => list($comment, $name)) {
        ?>
				<tr>
					<th><?php 
        echo $name;
        ?>
</th>
					<td class="tc-state-normal">
						<span class="tc-comment">
							<?php 
        echo $comment ?: '<span style="color:#ccc">空</span>';
        ?>
						</span>
						<input type="text" name="comment" class="txt" value="<?php 
        echo h($comment);
        ?>
" data-single-sample-id="<?php 
        echo $sample->id;
        ?>
" data-flow-id="<?php 
        echo $id;
        ?>
">
						<a href="javascript:void(0);" rel="edit-tc">编辑</a>
						<a href="javascript:void(0);" rel="save-tc">保存</a>
						<a href="javascript:void(0);" rel="cancel-edit-tc">取消</a>
					</td>
				</tr>
				<?php 
    }