コード例 #1
0
 /**
  * @inheritdoc
  */
 protected function renderButton($id, $button, $row, $data)
 {
     if (!empty($button['icon'])) {
         if (!isset($button['options']['title'])) {
             $button['options']['title'] = isset($button['label']) ? $button['label'] : $id;
         }
         $button['label'] = Html::icon($button['icon']);
         $button['imageUrl'] = null;
     }
     if ($this->enableTooltips) {
         $button['options']['data-toggle'] = 'tooltip';
     }
     parent::renderButton($id, $button, $row, $data);
 }
コード例 #2
0
ファイル: insert.php プロジェクト: cebe/chive
?>

<div class="buttons">
	<input type="hidden" name="insertAndReturn" value="0" id="insertAndReturn" />
	<a href="javascript:void(0);" onclick="$('form').submit();" class="icon button primary">
		<?php 
echo Html::icon('add', 16, false, 'core.insert');
?>
		<span><?php 
echo Yii::t('core', 'insert');
?>
</span>
	</a>
	<a href="javascript:void(0);" onclick="$('#insertAndReturn').attr('value', 1); $('form').submit();" class="icon button">
		<?php 
echo Html::icon('arrow_turn_090', 16, false, 'core.insertAndReturnToThisPage');
?>
		<span><?php 
echo Yii::t('core', 'insertAndReturnToThisPage');
?>
</span>
	</a>
</div>

<script type="text/javascript">
	$('form').ajaxForm({
		success: function(response) {
			AjaxResponse.handle(response);
		}
	});
</script>
コード例 #3
0
ファイル: list.php プロジェクト: cebe/chive
    ?>
				<a href="javascript:void(0)" onclick="schemaList.addSchema()" class="icon button">
					<?php 
    echo Html::icon('add');
    ?>
					<span><?php 
    echo Yii::t('core', 'addSchema');
    ?>
</span>
				</a>
			<?php 
} else {
    ?>
				<span class="icon button">
					<?php 
    echo Html::icon('add', 16, true);
    ?>
					<span><?php 
    echo Yii::t('core', 'addSchema');
    ?>
</span>
				</span>
			<?php 
}
?>
		</div>
	</div>

	<div class="clear"></div>

	<?php 
コード例 #4
0
            break;
        }
        ?>
				<tr class="noSwitch">
					<td><?php 
        echo (string) $formatter->formatDateTime(strtotime($entry->published));
        ?>
</td>
					<td><?php 
        echo (string) $entry->title;
        ?>
</td>
					<td>
						<a href="javascript:void(0);" onclick="$(this).parent().parent().next().toggle();">
							<?php 
        echo Html::icon('search', 16, false, 'core.showDetails');
        ?>
						</a>
					</td>
				</tr>
				<tr style="display: none;">
					<td colspan="3">
						<?php 
        echo $entry->content;
        ?>
					</td>
				</tr>
				<?php 
        $i++;
        ?>
			<?php 
コード例 #5
0
			<a href="javascript:void(0)" onclick="schemaTables.runTableOperation('REPAIR')" class="icon button">
					<?php 
echo Html::icon('operation', 16);
?>
				<span><?php 
echo Yii::t('core', 'repair');
?>
</span>
			</a>

		</div>
		<div class="right">
			<a href="javascript:void(0)" class="icon button" onclick="schemaTables.addTable()">
				<?php 
echo Html::icon('add');
?>
				<span><?php 
echo Yii::t('core', 'addTable');
?>
</span>
			</a>
		</div>
	</div>

</div>

<script type="text/javascript">
setTimeout(function() {
	schemaTables.setupDialogs();
}, 500);
コード例 #6
0
<ul class="tabMenu">
	<?php 
foreach ($items as $item) {
    ?>

		<?php 
    echo CHtml::openTag('li', $item['htmlOptions']);
    ?>
			<?php 
    echo Html::ajaxLink($item['a']['href'], $item['a']['htmlOptions']);
    ?>
				<?php 
    if ($item['icon']) {
        ?>
					<?php 
        echo Html::icon($item['icon']);
        ?>
				<?php 
    }
    ?>
				<span><?php 
    echo $item['label'];
    ?>
</span>
			<?php 
    echo CHtml::closeTag('a');
    ?>
		<?php 
    echo CHtml::closeTag('li');
    ?>
コード例 #7
0
ファイル: schemaPrivilegeForm.php プロジェクト: cebe/chive
}
?>
		</fieldset>
	</div>
	<div class="buttonContainer">
		<a href="javascript:void(0)" onclick="$('#<?php 
echo CHtml::$idPrefix;
?>
').submit()" class="icon button">
			<?php 
echo Html::icon('save');
?>
			<span><?php 
echo Yii::t('core', 'save');
?>
</span>
		</a>
		<a href="javascript:void(0)" onclick="$('#<?php 
echo CHtml::$idPrefix;
?>
').slideUp(500, function() { $(this).parents('tr').remove(); })" class="icon button">
			<?php 
echo Html::icon('delete');
?>
			<span><?php 
echo Yii::t('core', 'cancel');
?>
</span>
		</a>
	</div>
</form>
コード例 #8
0
ファイル: input.php プロジェクト: cebe/chive
echo Yii::t('core', 'cancel');
?>
</span>
		</a>
		<?php 
if ($column->allowNull) {
    ?>
			<?php 
    echo Yii::t('core', 'or');
    ?>
			<a href="javascript:void(0);" onclick="$('#isNull').val(1); $('#form_<?php 
    echo $id;
    ?>
').submit();" class="icon button">
				<?php 
    echo Html::icon('null', 16, false, 'core.null');
    ?>
				<span><?php 
    echo Yii::t('core', 'setNull');
    ?>
</span>
			</a>
		<?php 
}
?>
	</div>

</div>

<?php 
echo CHtml::endForm();
コード例 #9
0
    if ($params->get('show_email_icon')) {
        ?>
		<li class="email-icon">
			<?php 
        echo Html::icon('email', $this->item, $params);
        ?>
		</li>
		<?php 
    }
    ?>
		<?php 
    if ($canEdit) {
        ?>
		<li class="edit-icon">
			<?php 
        echo Html::icon('edit', $this->item, $params);
        ?>
		</li>
		<?php 
    }
    ?>
	</ul>
<?php 
}
?>

<?php 
if (!$params->get('show_intro')) {
    ?>
	<?php 
    echo $this->item->event->afterDisplayTitle;
コード例 #10
0
ファイル: Html.php プロジェクト: cebe/chive
 /**
  * Returns the form icon buttons submit and cancel.
  *
  * @param	bool						include container
  * @param	bool						include submit button
  * @param	bool						include cancel button
  * @return	string
  */
 public static function submitFormArea($container = true, $submit = true, $cancel = true)
 {
     if ($submit) {
         $submitButton = '<a href="javascript:void(0)" onclick="$(\'#' . CHtml::$idPrefix . '\').submit()" class="icon button primary">' . Html::icon('save') . '<span>' . Yii::t('core', 'save') . '</span>' . '</a>' . CHtml::submitButton(Yii::t('core', 'save'), array('style' => 'display: none'));
     } else {
         $submitButton = '';
     }
     if ($cancel) {
         $cancelButton = '<a href="javascript:void(0)" onclick="$(\'#' . CHtml::$idPrefix . '\').slideUp(500, function() { $(this).parents(\'tr\').remove(); })" class="icon button">' . Html::icon('delete') . '<span>' . Yii::t('core', 'cancel') . '</span>' . '</a>';
     } else {
         $cancelButton = '';
     }
     if ($container) {
         return '<div class="buttonContainer">' . $submitButton . $cancelButton . '</div>';
     } else {
         return $submitButton . $cancelButton;
     }
 }
コード例 #11
0
?>
				<?php 
echo Html::icon('process');
?>
				<span><?php 
echo Yii::t('core', 'processes');
?>
</span>
			</a>
		</li>
		<li class="nowrap">
			<?php 
echo Html::ajaxLink('information/about', array('class' => 'icon'));
?>
				<?php 
echo Html::icon('info');
?>
				<span><?php 
echo Yii::t('core', 'about');
?>
</span>
			</a>
		</li>
	</ul>
</div>

</div>
</div>
<div class="ui-layout-center" id="content"><?php 
echo $content;
?>
コード例 #12
0
ファイル: insert.php プロジェクト: cebe/chive
				<td class="center">
					<?php 
    echo $column->allowNull ? CHtml::checkBox($columnName . '[null]', true) : '';
    ?>
				</td>
				<td>
					<?php 
    $this->widget('InputField', array('row' => $row, 'column' => $column, 'htmlOptions' => array('onfocus' => '$("#' . $columnName . '_null").attr("checked", "").change();')));
    ?>
				</td>
			</tr>
		<?php 
}
?>
	</tbody>
</table>

<div class="buttons">
	<a href="javascript:void(0);" onclick="$('form').submit();" class="icon button">
		<?php 
echo Html::icon('add', 16, false, 'core.insert');
?>
		<span><?php 
echo Yii::t('core', 'insert');
?>
</span>
	</a>
</div>

<?php 
echo CHtml::endForm();
コード例 #13
0
ファイル: default.php プロジェクト: kevinwojo/hubzero-cms
        ?>

		<?php 
        /*if ($canEdit) : ?>
        			<li class="edit-icon">
        			<?php echo Html::icon('edit', $this->item, $params); ?>
        			</li>
        		<?php endif;*/
        ?>

	<?php 
    } else {
        ?>
		<li>
		<?php 
        echo Html::icon('print_screen', $this->item, $params);
        ?>
		</li>
	<?php 
    }
    ?>
	</ul>
<?php 
}
?>

<?php 
if (!$params->get('show_intro')) {
    echo $this->item->event->afterDisplayTitle;
}
?>
コード例 #14
0
ファイル: SiteController.php プロジェクト: cebe/chive
 public function actionSearch()
 {
     $cmdBuilder = new CDbCommandBuilder(Yii::app()->db->getSchema());
     $criteria = new CDbCriteria();
     $criteria->condition = "TABLE_NAME LIKE :table OR TABLE_SCHEMA LIKE :schema";
     $criteria->params = array(":table" => "%" . Yii::app()->getRequest()->getParam('q') . "%", ":schema" => "%" . Yii::app()->getRequest()->getParam('q') . "%");
     $criteria->order = 'TABLE_SCHEMA, TABLE_NAME';
     $items = array();
     $lastSchemaName = '';
     foreach (Table::model()->findAll($criteria) as $table) {
         if ($table->TABLE_SCHEMA != $lastSchemaName) {
             $items[] = CJSON::encode(array('text' => '<span class="icon schema">' . Html::icon('database') . '<span>' . StringUtil::cutText($table->TABLE_SCHEMA, 30) . '</span></span>', 'target' => Yii::app()->createUrl('schema/' . $table->TABLE_SCHEMA), 'plain' => $table->TABLE_SCHEMA));
         }
         $lastSchemaName = $table->TABLE_SCHEMA;
         $items[] = CJSON::encode(array('text' => '<span class="icon table">' . Html::icon('table') . '<span>' . StringUtil::cutText($table->TABLE_NAME, 30) . '</span></span>', 'target' => Yii::app()->createUrl('schema/' . $table->TABLE_SCHEMA) . '#tables/' . $table->TABLE_NAME . '/browse', 'plain' => $table->TABLE_NAME));
     }
     Yii::app()->end(implode("\n", $items));
 }
コード例 #15
0
ファイル: form.php プロジェクト: cebe/chive
    ?>
									</td>
									<td>
										<a href="javascript:void(0)" class="icon">
											<?php 
    echo Html::icon('arrow_move', 16, false, 'core.move');
    ?>
										</a>
									</td>
									<td>
										<a href="javascript:void(0)" onclick="indexForm.removeColumn('<?php 
    echo CHtml::$idPrefix;
    ?>
', this)" class="icon">
											<?php 
    echo Html::icon('delete', 16, false, 'core.remove');
    ?>
										</a>
									</td>
								</tr>
							<?php 
}
?>
						</tbody>
						<tfoot>
							<tr>
								<th colspan="3">
									<?php 
echo CHtml::dropDownList('addColumn', null, $addColumnData);
?>
								</th>
コード例 #16
0
				</tr>
		<?php 
    }
    ?>
		</tbody>
	</table>
<?php 
}
?>

<?php 
// Code to add a link to submit an article.
if ($this->category->getParams()->get('access-create')) {
    ?>
	<?php 
    echo Html::icon('create', $this->category, $this->category->params);
}
?>

<?php 
// Add pagination links
if (!empty($this->items)) {
    ?>
	<?php 
    if (($this->params->def('show_pagination', 2) == 1 || $this->params->get('show_pagination') == 2) && $this->pagination->get('pages.total') > 1) {
        ?>
	<div class="pagination">

		<?php 
        if ($this->params->def('show_pagination_results', 1)) {
            ?>
コード例 #17
0
        echo $this->schema;
        ?>
', '<?php 
        echo $bookmark['id'];
        ?>
');">
									<?php 
        echo Html::icon('execute', 16, false, 'core.execute');
        ?>
								</a>
							</div>
							<?php 
        echo Html::ajaxLink('bookmark/show/' . $bookmark['id'], array('class' => 'icon', 'title' => $bookmark['query']));
        ?>
								<?php 
        echo Html::icon('bookmark');
        ?>
								<span><?php 
        echo $bookmark['name'];
        ?>
</span>
							</a>
						</li>
					<?php 
    }
    ?>
				<?php 
}
?>
			</ul>
			<?php 
コード例 #18
0
ファイル: about.php プロジェクト: cebe/chive
			<td>
				<a href="http://www.texotela.co.uk/code/jquery/select/" class="icon">
					<?php 
echo Html::icon('globe');
?>
					<span>jQuery Select 2.2.4</span>
				</a>
			</td>
			<td>Select box manipulation plugin for jQuery.</td>
			<td>MIT, GPL</td>
		</tr>
		<tr class="even">
			<td>
				<a href="http://www.phpmyadmin.net" class="icon">
					<?php 
echo Html::icon('globe');
?>
					<span>PMA Query Parser</span>
				</a>
			</td>
			<td>Chive uses the query parsing algorithm of phpMyAdmin to analyze user-defined sql statements.</td>
			<td>GPL</td>
		</tr>
	</tbody>
</table>

<script type="text/javascript">
	informationGeneral.setup();
	breadCrumb.set([
		{
			icon: 'info',
コード例 #19
0
ファイル: browse.php プロジェクト: cebe/chive
        echo Yii::t('core', 'withSelected');
        ?>
</span>
				</span>
				<a class="icon button" href="javascript:void(0)" onclick="globalBrowse.deleteRows()">
					<?php 
        echo Html::icon('delete', 16, false, 'core.delete');
        ?>
					<span><?php 
        echo Yii::t('core', 'delete');
        ?>
</span>
				</a>
				<a class="icon button" href="javascript:void(0)" onclick="globalBrowse.exportRows()">
					<?php 
        echo Html::icon('save', 16, false, 'core.export');
        ?>
					<span><?php 
        echo Yii::t('core', 'export');
        ?>
</span>
				</a>
			</div>
			<?php 
        $keyData = $model->getKeyData();
        if (count($keyData) > 0) {
            ?>
				<script type="text/javascript">
					var keyData = <?php 
            echo CJSON::encode($keyData);
            ?>
コード例 #20
0
ファイル: sql.php プロジェクト: cebe/chive
		<tbody>
			<?php 
    foreach ($data as $row) {
        ?>
				<tr>
					<td>
						<a href="" class="icon">
							<?php 
        echo Html::icon('edit', 16, false, 'core.edit');
        ?>
						</a>
					</td>
					<td>
						<a href="" class="icon">
							<?php 
        echo Html::icon('delete', 16, false, 'core.edit');
        ?>
						</a>
					</td>
					<?php 
        foreach ($row as $key => $value) {
            ?>
						<td>
							<?php 
            echo is_null($value) ? '<i>NULL</i>' : substr(str_replace(array('<', '>'), array('&lt;', '&gt;'), $value), 0, 100);
            ?>
						</td>
					<?php 
        }
        ?>
				</tr>
コード例 #21
0
ファイル: import.php プロジェクト: cebe/chive
				<th colspan="3"><?php 
    echo Yii::t('core', 'information');
    ?>
</th>
			</tr>
		</thead>
		<tbody id="messagesContent">
		</tbody>
	</table>
	
	<br/>
	
	<div id="buttonContainer" class="buttons" style="display: none">
		<a href="javascript:void(0);" onclick="AjaxResponse.handle(lastResponse);" class="icon button primary">
			<?php 
    echo Html::icon('success', 16, false, 'core.ok');
    ?>
			<span><?php 
    echo Yii::t('core', 'ok');
    ?>
</span>
		</a>
	</div>
	
	<script type="text/javascript">

			var errorCount = 0;
			var lastResponse = "";

			$("#progressbar").progressbar({
				value: 1
コード例 #22
0
        ?>
					<a href="javascript:void(0)" onclick="globalExport.save('gzip')" class="icon button">
						<?php 
        echo Html::icon('save', 16, false, 'export.download');
        ?>
						<span>Gzip</span>
					</a>
				<?php 
    }
    ?>
				<?php 
    if (function_exists('bzcompress')) {
        ?>
					<a href="javascript:void(0)" onclick="globalExport.save('bzip2')" class="icon button">
						<?php 
        echo Html::icon('save', 16, false, 'export.download');
        ?>
						<span>Bzip2</span>
					</a>
				<?php 
    }
    ?>

				<?php 
    echo CHtml::hiddenField('Export[action]', '');
    ?>
				<?php 
    echo CHtml::hiddenField('Export[compression]', '');
    ?>
				<?php 
    echo CHtml::hiddenField('Export[rows]', CJSON::encode($model->getRows()));
コード例 #23
0
    echo CHtml::activeLabel($form, 'password');
    ?>
						</span>
					</div>
					<div class="right">
						<?php 
    echo CHtml::activePasswordField($form, 'password', array('class' => 'text', 'value' => '', 'name' => 'password', 'autocomplete' => "off"));
    ?>
					</div>
				</div>
			</div>

			<div class="buttons">
				<a class="icon button primary" href="javascript:void(0);" onclick="$('form').submit()">
					<?php 
    echo Html::icon('login', 16, false, 'core.login');
    ?>
					<span><?php 
    echo Yii::t('core', 'login');
    ?>
</span>
				</a>
				<?php 
    echo CHtml::submitButton(Yii::t('core', 'login'), array("style" => "width: 0px; height: 0px; opacity: 0"));
    ?>
			</div>

			<?php 
    echo CHtml::closeTag('form');
    ?>
		</div>
コード例 #24
0
ファイル: search.php プロジェクト: cebe/chive
    ?>
				</td>
			</tr>
			<?php 
    $tabIndex++;
    ?>
		<?php 
}
?>
	</tbody>
</table>

<div class="buttons">
	<a href="javascript:void(0);" onclick="$('form').submit();" class="icon button">
		<?php 
echo Html::icon('search', 16, false, 'core.insert');
?>
		<span><?php 
echo Yii::t('core', 'search');
?>
</span>
	</a>
</div>

<script type="text/javascript">
$('#searchForm').ajaxForm({
	success: function(responseText, statusText) {
		AjaxResponse.handle(responseText);
		$('div.ui-layout-center').html(responseText);
		init();
	}