本文整理汇总了PHP中HHtml类的典型用法代码示例。如果您正苦于以下问题:PHP HHtml类的具体用法?PHP HHtml怎么用?PHP HHtml使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了HHtml类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: createPageButton
/**
* Creates a page button.
*
* You may override this method to customize the page buttons.
* @param string $label the text label for the button
* @param integer $page the page number
* @param string $class the CSS class for the page button. This could be 'page', 'first', 'last', 'next' or 'previous'.
* @param boolean $hidden whether this page button is visible
* @param boolean $selected whether this page button is selected
*
* @return string the generated button
*/
protected function createPageButton($label, $page, $class, $hidden, $selected)
{
$this->ajaxIdCounter++;
// For Unique Ajax Link IDs
if ($hidden || $selected) {
$class .= ' ' . ($hidden ? self::CSS_HIDDEN_PAGE : self::CSS_SELECTED_PAGE);
}
$ajaxLink = HHtml::ajaxLink($label, $this->createPageUrl($page), array('success' => "function(html) { jQuery('" . $this->ajaxContentTarget . "').replaceWith(html); }"), array('id' => "siPaginatorLink_" . $page . "_" . $this->ajaxIdCounter));
return '<li class="' . $class . '">' . $ajaxLink . '</li>';
}
开发者ID:alefernie,项目名称:intranet,代码行数:22,代码来源:HAjaxLinkPager.php
示例2: init
/**
* Inits the widget
*
*/
public function init()
{
// load resources
$assetPrefix = Yii::app()->assetManager->publish(dirname(__FILE__) . '/resources/at', true, 0, defined('YII_DEBUG'));
Yii::app()->clientScript->registerScriptFile($assetPrefix . '/jquery.caret.min.js');
Yii::app()->clientScript->registerScriptFile($assetPrefix . '/jquery.atwho.min.js');
Yii::app()->clientScript->registerCssFile($assetPrefix . '/jquery.atwho.css');
$this->inputContent = HHtml::translateEmojis($this->inputContent);
$this->inputContent = HHtml::translateMentioning($this->inputContent);
$this->inputContent = nl2br($this->inputContent);
}
开发者ID:alefernie,项目名称:intranet,代码行数:15,代码来源:HEditorWidget.php
示例3: run
/**
* Executes the widget.
*/
public function run()
{
if ($this->item->href != '') {
$this->render('libraryLink', array('item' => $this->item, 'category' => $this->category, 'editable' => $this->editable));
} else {
$files = File::getFilesOfObject($this->item);
$file = array_pop($files);
// If there is no file attached, deliver a dummy object. That's better than completely breaking the rendering.
if (!is_object($file)) {
$file = new File();
}
$mime = HHtml::getMimeIconClassByExtension($file->getExtension());
$this->render('libraryDocument', array('file' => $file, 'mime' => $mime, 'item' => $this->item, 'category' => $this->category, 'editable' => $this->editable));
}
}
开发者ID:tejrajs,项目名称:humhub-modules-library,代码行数:18,代码来源:LibraryItemWidget.php
示例4: renderInput
/**
* Renders the input field.
* The default implementation returns the result of the appropriate CHtml method or the widget.
* @return string the rendering result
*/
public function renderInput()
{
if (isset(self::$coreTypes[$this->type])) {
$method = self::$coreTypes[$this->type];
if (strpos($method, 'List') !== false) {
return HHtml::$method($this->getParent()->getModel(), $this->name, $this->items, $this->attributes);
} elseif ($method == "activeDateTimeField") {
return HHtml::activeDateTimeField($this->getParent()->getModel(), $this->name, $this->attributes, $this->dateTimePickerOptions);
} else {
return HHtml::$method($this->getParent()->getModel(), $this->name, $this->attributes);
}
} else {
$attributes = $this->attributes;
$attributes['model'] = $this->getParent()->getModel();
$attributes['attribute'] = $this->name;
ob_start();
$this->getParent()->getOwner()->widget($this->type, $attributes);
return ob_get_clean();
}
}
开发者ID:alefernie,项目名称:intranet,代码行数:25,代码来源:HFormInputElement.php
示例5: array
echo Yii::t('AdminModule.views_module_listUpdates', 'Installed version:');
?>
<?php
echo Yii::app()->moduleManager->getModule($module['id'])->getVersion();
?>
· <?php
echo Yii::t('AdminModule.views_module_listUpdates', 'Latest compatible Version:');
?>
<?php
echo $module['latestCompatibleVersion'];
?>
· <?php
echo HHtml::postLink(Yii::t('AdminModule.views_module_listUpdates', 'Update'), $this->createUrl('update', array('moduleId' => $module['id'])), array('style' => 'font-weight:bold', 'class' => 'process'));
?>
· <?php
echo HHtml::link(Yii::t('AdminModule.views_module_listOnline', 'More info'), $module['marketplaceUrl'], array('target' => '_blank'));
?>
<?php
}
?>
</div>
</div>
</div>
<?php
}
?>
</div>
</div>
开发者ID:skapl,项目名称:design,代码行数:31,代码来源:listUpdates.php
示例6: array
}
?>
<div class="clearFloats"></div>
<?php
echo CHtml::endForm();
?>
<?php
if ($poll->hasUserVoted()) {
?>
<br>
<?php
$voteUrl = CHtml::normalizeUrl(array('/polls/poll/answerReset', 'sguid' => $space->guid, 'pollId' => $poll->id, 'wallType' => Wall::$currentType));
echo HHtml::ajaxLink(Yii::t('PollsModule.widgets_views_entry', 'Reset my vote'), $voteUrl, array('dataType' => 'json', 'success' => "function(json) { \$('#wallEntry_'+json.wallEntryId).html(parseHtml(json.output)); \$('#wallEntry_'+json.wallEntryId).find(':checkbox, :radio').flatelements(); }"), array('id' => "PollAnswerResetButton_" . $poll->id, 'class' => 'btn btn-danger'));
?>
<br>
<?php
}
?>
<?php
$this->endContent();
?>
</div>
</div>
开发者ID:nilBora,项目名称:MVC_teaching_Yii,代码行数:30,代码来源:entry.php
示例7: array
?>
<div class="alert alert-success">
<?php
echo Yii::t('InstallerModule.views_setup_database', 'Yes, database connection works!');
?>
</div>
<?php
} else {
?>
<div class="alert alert-danger">
<strong><?php
echo Yii::t('InstallerModule.views_setup_database', 'Ohh, something went wrong!');
?>
</strong><br />
<?php
echo HHtml::encode($errorMessage);
?>
</div>
<?php
}
}
?>
<hr>
<?php
echo CHtml::submitButton(Yii::t('InstallerModule.views_setup_database', 'Next'), array('class' => 'btn btn-primary'));
?>
<?php
开发者ID:skapl,项目名称:design,代码行数:31,代码来源:database.php
示例8: array
<?php
}
?>
</small>
</h4>
<div class="content" id="comment_editarea_<?php
echo $comment->id;
?>
">
<span id="comment-message-<?php
echo $comment->id;
?>
"><?php
print HHtml::enrichText($comment->message);
?>
</span>
<?php
$this->widget('application.modules_core.file.widgets.ShowFilesWidget', array('object' => $comment));
?>
</div>
<div class="wall-entry-controls">
<?php
Yii::app()->getController()->widget('application.modules_core.like.widgets.LikeLinkWidget', array('object' => $comment));
?>
</div>
</div>
开发者ID:byronmejia,项目名称:humhub-themes-tq,代码行数:31,代码来源:showComment.php
示例9: array
<?php
echo Yii::t('AdminModule.views_module_setAsDefault', 'Always activated');
?>
</label>
</div>
<br/>
</div>
<?php
}
?>
</div>
</div>
<div class="modal-footer">
<?php
echo HHtml::ajaxSubmitButton(Yii::t('AdminModule.views_module_setAsDefault', 'Save'), array('//admin/module/setAsDefault', 'moduleId' => $module->getId()), array('type' => 'POST', 'beforeSend' => 'function(){ $("#invite-loader").removeClass("hidden"); }', 'success' => 'function(html){ $("#globalModal").html(html); }'), array('class' => 'btn btn-primary', 'id' => 'inviteBtn'));
?>
<button type="button" class="btn btn-primary"
data-dismiss="modal"><?php
echo Yii::t('AdminModule.views_module_setAsDefault', 'Close');
?>
</button>
<div class="col-md-1 modal-loader">
<div id="invite-loader" class="loader loader-small hidden"></div>
</div>
</div>
<?php
$this->endWidget();
?>
开发者ID:ahdail,项目名称:humhub,代码行数:31,代码来源:setAsDefault.php
示例10:
src="<?php
echo $activity->content->space->getProfileImage()->getUrl();
?>
">
<?php
}
?>
<div class="media-body">
<!-- Show content -->
<?php
echo $content;
?>
<br>
<!-- show time -->
<?php
echo HHtml::timeago($activity->content->created_at);
?>
</div>
</div>
<?php
if ($this->wallEntryId != 0) {
?>
</a><?php
}
?>
</li>
开发者ID:byronmejia,项目名称:humhub-themes-tq,代码行数:29,代码来源:activityLayout.php
示例11: array
<div class="contentForm_options">
<p id="post_to_space_message" style="display:none; color:red;">Select a circle to post your message into.</p>
<hr>
<div class="btn_container">
<div id="postform-loader" class="loader loader-postform hidden">
<div class="sk-spinner sk-spinner-three-bounce">
<div class="sk-bounce1"></div>
<div class="sk-bounce2"></div>
<div class="sk-bounce3"></div>
</div>
</div>
<?php
$url = CHtml::normalizeUrl(Yii::app()->createUrl($submitUrl));
echo HHtml::ajaxSubmitButton($submitButtonText, $url, array('type' => 'POST', 'dataType' => 'json', 'beforeSend' => "function() {\n \$('.contentForm').removeClass('error');\n \$('#contentFormError').hide();\n \$('#contentFormError').empty();\n }", 'beforeSend' => 'function(){ $("#contentFormError").hide(); $("#contentFormError li").remove(); $(".contentForm_options .btn").hide(); $("#postform-loader").removeClass("hidden"); }', 'success' => "function(response) {\n if (response.success) {\n\n // application.modules_core.wall function\n currentStream.prependEntry(response.wallEntryId);\n\n // Reset Form (Empty State)\n jQuery('.contentForm_options').hide();\n \$('.contentForm').filter(':text').val('');\n \$('.contentForm').filter('textarea').val('').trigger('autosize.resize');\n \$('.contentForm').attr('checked', false);\n \$('.userInput').remove(); // used by UserPickerWidget\n \$('#notifyUserContainer').addClass('hidden');\n \$('#notifyUserInput').val('');\n \$('.label-public').addClass('hidden');\n \$('#contentFrom_files').val('');\n \$('#public').attr('checked', false);\n \$('#contentForm_message_contenteditable').html('" . CHtml::encode(Yii::t("WallModule.widgets_views_contentForm", "What's on your mind?")) . "');\n \$('#contentForm_message_contenteditable').addClass('atwho-placeholder');\n\n // Notify FileUploadButtonWidget to clear (by providing uploaderId)\n resetUploader('contentFormFiles');\n\n } else {\n\n \$('#contentFormError').show();\n\n \$.each(response.errors, function(fieldName, errorMessage){\n\n // Mark Fields as Error\n fieldId = 'contentForm_'+fieldName;\n \$('#'+fieldId).addClass('error');\n\n \$.each(errorMessage, function(key, msg) {\n \$('#contentFormError').append('<li><i class=\"icon-warning-sign\"></i> '+msg+'</li>');\n });\n\n });\n\n }\n\n \$('.contentForm_options .btn').show(); \$('#postform-loader').addClass('hidden');\n }"), array('id' => "post_submit_button", 'class' => 'btn btn-info'));
?>
<?php
// Creates Uploading Button
$this->widget('application.modules_core.file.widgets.FileUploadButtonWidget', array('uploaderId' => 'contentFormFiles', 'fileListFieldName' => 'fileList'));
?>
<script>
$('#fileUploaderButton_contentFormFiles').bind('fileuploaddone', function (e, data) {
$('.btn_container').show();
});
$('#fileUploaderButton_contentFormFiles').bind('fileuploadprogressall', function (e, data) {
var progress = parseInt(data.loaded / data.total * 100, 10);
if (progress != 100) {
// Fix: remove focus from upload button to hide tooltip
$('#post_submit_button').focus();
开发者ID:byronmejia,项目名称:humhub-themes-tq,代码行数:31,代码来源:contentForm.php
示例12:
?>
<div class="form-group">
<label
class="col-sm-3 control-label"><?php
echo CHtml::encode(Yii::t($field->getTranslationCategory(), $field->title));
?>
</label>
<?php
if (strtolower($field->title) == 'about') {
?>
<div class="col-sm-9">
<p class="form-control-static"><?php
echo HHtml::enrichText($field->getUserValue($user, false));
?>
</p>
</div>
<?php
} else {
?>
<div class="col-sm-9">
<p class="form-control-static"><?php
if ($field['field_type_class'] == 'ProfileFieldTypeTextArea') {
echo nl2br($field->getUserValue($user, false));
} else {
echo $field->getUserValue($user, false);
}
?>
</p>
开发者ID:skapl,项目名称:design,代码行数:31,代码来源:about.php
示例13: elseif
} elseif ($membership->status == SpaceMembership::STATUS_INVITED) {
print '<a href="' . Yii::app()->createUrl("//space/space/inviteAccept", array('sguid' => $space->guid)) . '" class="btn btn-primary">' . Yii::t('SpaceModule.views_space_indexPublic', 'Accept Invite') . '</a> ';
print '<a href="' . Yii::app()->createUrl("//space/space/revokeMembership", array('sguid' => $space->guid)) . '" class="btn btn-primary">' . Yii::t('SpaceModule.views_space_indexPublic', 'Deny Invite') . '</a> ';
} elseif ($membership->status == SpaceMembership::STATUS_APPLICANT) {
print '<a href="' . Yii::app()->createUrl("//space/space/revokeMembership", array('sguid' => $space->guid)) . '" class="btn btn-primary" id="membership_button">' . Yii::t('SpaceModule.views_space_indexPublic', 'Cancel pending membership application') . '</a>';
}
}
?>
<?php
// Follow Handling
if (!$space->isMember()) {
if ($space->isFollowedByUser()) {
print HHtml::postLink(Yii::t('SpaceModule.views_space_indexPublic', "Unfollow"), $space->createUrl('//space/space/unfollow'), array('class' => 'btn btn-danger'));
} else {
print HHtml::postLink(Yii::t('SpaceModule.views_space_indexPublic', "Follow"), $space->createUrl('//space/space/follow'), array('class' => 'btn btn-success'));
}
}
?>
</div>
</div>
</div>
</div>
<?php
$this->widget('application.modules_core.wall.widgets.WallStreamWidget', array('contentContainer' => $space));
?>
</div>
</div>
开发者ID:alefernie,项目名称:intranet,代码行数:28,代码来源:indexPublic.php
示例14: array
<p id="content-message-<?php
echo $reportedContent->id;
?>
" style="display: inline;" class="contentAnchor"><?php
print HHtml::enrichText($reportedContent->getSource()->message);
?>
</p>
<br/>
<small class="media">
<span class="time"><?php
echo Yii::t('ReporterContent.base', 'created by :displayName', array(':displayName' => CHtml::encode($reportedContent->getSource()->content->user->displayName)));
?>
</span>
<?php
echo HHtml::timeago($reportedContent->getSource()->created_at);
?>
</small>
</div>
<script type="text/javascript">
$(document).ready(shortenContentMessages);
function shortenContentMessages(id, data){
$('.contentAnchor').each(function(){
var divh=$(this).parent().height();
var divw=$(this).parent().width();
while ($(this).outerHeight()>divh || $(this).outerWidth()>divw) {
$(this).text(function (index, text) {
开发者ID:ConnectedCommunities,项目名称:humhub-modules-karma,代码行数:30,代码来源:contentGrid.php
示例15: array
echo $user->getProfileImage()->getUrl();
?>
" class="img-rounded tt img_margin"
height="40"
width="40" alt="40x40" data-src="holder.js/40x40" style="width: 40px; height: 40px;"></a>
<?php
$user_count++;
?>
<?php
}
?>
<?php
if ($user_count >= 30) {
?>
<?php
echo HHtml::link(Yii::t('DirectoryModule.views_directory_groups', "show all members"), array('//directory/directory/members', 'keyword' => 'groupId:' . $group->id));
?>
<?php
}
?>
<hr>
<?php
}
?>
<?php
}
?>
</div>
</div>
开发者ID:ahdail,项目名称:humhub,代码行数:30,代码来源:groups.php
示例16: array
<?php
if ($user->isFollowedByUser()) {
print HHtml::postLink(Yii::t("UserModule.widgets_views_followButton", "Unfollow"), $user->createUrl('//user/profile/unfollow'), array('class' => 'btn btn-primary'));
} else {
print HHtml::postLink(Yii::t("UserModule.widgets_views_followButton", "Follow"), $user->createUrl('//user/profile/follow'), array('class' => 'btn btn-success'));
}
开发者ID:skapl,项目名称:design,代码行数:7,代码来源:followButton.php
示例17: formatOutput
/**
* Formatted the activity content before delivery
*
* @param string $text
*/
public static function formatOutput($text)
{
$text = HHtml::translateMentioning($text, false);
$text = HHtml::translateEmojis($text, false);
return $text;
}
开发者ID:alefernie,项目名称:intranet,代码行数:11,代码来源:ActivityModule.php
示例18: array
<div class="pull-right">
<?php
if ($model->status == Space::STATUS_ENABLED) {
?>
<?php
echo HHtml::postLink(Yii::t('SpaceModule.views_admin_edit', 'Archive'), $model->createUrl('//space/admin/archive'), array('class' => 'btn btn-warning'));
?>
<?php
} elseif ($model->status == Space::STATUS_ARCHIVED) {
?>
<?php
echo HHtml::postLink(Yii::t('SpaceModule.views_admin_edit', 'Unarchive'), $model->createUrl('//space/admin/unarchive'), array('class' => 'btn btn-warning'));
?>
<?php
}
?>
<?php
echo HHtml::postLink(Yii::t('SpaceModule.views_admin_edit', 'Delete'), $model->createUrl('//space/admin/delete'), array('class' => 'btn btn-danger'));
?>
</div>
</div>
</div>
<?php
$this->endWidget();
?>
开发者ID:skapl,项目名称:design,代码行数:29,代码来源:edit.php
示例19: array
<td align="left" valign="top">
<strong><?php
echo CHtml::encode($user->displayName);
?>
</strong><br>
<?php
echo CHtml::encode($membership->request_message);
?>
<br>
<hr>
<?php
echo HHtml::postLink('Accept', $this->createUrl('//rooms/admin/membersApproveApplicant', array('sguid' => $room->guid, 'userGuid' => $user->guid, 'approve' => true)), array('class' => 'btn btn-success btn-sm', 'id' => 'user_accept_' . $user->guid));
?>
<?php
echo HHtml::postLink('Decline', $this->createUrl('//rooms/admin/membersRejectApplicant', array('sguid' => $room->guid, 'userGuid' => $user->guid, 'reject' => true)), array('class' => 'btn btn-danger btn-sm', 'id' => 'user_decline_' . $user->guid));
?>
</td>
</tr>
<?php
if ($user_count < count($room->applicants) - 1) {
?>
<hr>
<?php
}
?>
<?php
$user_count++;
}
?>
开发者ID:verdin12345,项目名称:humhub-modules-rooms,代码行数:31,代码来源:roomMembers.php
示例20: strlen
echo $post->id;
?>
').addClass('highlight');
$('#post-content-<?php
echo $post->id;
?>
').delay(200).animate({backgroundColor: 'transparent'}, 1000);
<?php
}
?>
$(document).ready(function () {
// save the count of characters
var _words = '<?php
echo strlen(HHtml::enrichText($post->message));
?>
';
var _postHeight = $('#post-content-<?php
echo $post->id;
?>
').outerHeight();
/* if (_words > 1100) {
// show more-button
$('#more-link-post-
<?php
echo $post->id;
开发者ID:alefernie,项目名称:intranet,代码行数:31,代码来源:post.php
注:本文中的HHtml类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论