当前位置: 首页>>代码示例>>PHP>>正文


PHP HHtml::link方法代码示例

本文整理汇总了PHP中HHtml::link方法的典型用法代码示例。如果您正苦于以下问题:PHP HHtml::link方法的具体用法?PHP HHtml::link怎么用?PHP HHtml::link使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HHtml的用法示例。


在下文中一共展示了HHtml::link方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: groups

<div class="panel panel-default">
    <div class="panel-heading"><?php 
echo Yii::t('AdminModule.views_group_index', '<strong>Manage</strong> groups');
?>
</div>
    <div class="panel-body">

        <p>
            <?php 
echo Yii::t('AdminModule.views_groups_index', 'You can split users into different groups (for teams, departments etc.) and define standard spaces and admins for them.');
?>
        </p>

        <?php 
echo HHtml::link("Create new group", array('//admin/group/edit'), array('class' => 'btn btn-primary'));
?>
        <br>


        <?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'groups-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'itemsCssClass' => 'table table-hover', 'columns' => array(array('name' => 'name', 'header' => Yii::t('AdminModule.views_group_index', 'Group name'), 'filter' => CHtml::activeTextField($model, 'name', array('placeholder' => Yii::t('AdminModule.views_group_index', 'Search for group name')))), array('name' => 'description', 'header' => Yii::t('AdminModule.views_group_index', 'Description'), 'filter' => CHtml::activeTextField($model, 'description', array('placeholder' => Yii::t('AdminModule.views_group_index', 'Search for description')))), array('class' => 'CButtonColumn', 'template' => '{update}', 'updateButtonUrl' => 'Yii::app()->createUrl("//admin/group/edit", array("id"=>$data->id));', 'buttons' => array('update' => array('label' => '<i class="fa fa-pencil"></i>', 'imageUrl' => false, 'options' => array('class' => 'btn btn-primary btn-xs tt', 'data-toggle' => 'tooltip', 'data-placement' => 'top', 'title' => '', 'data-original-title' => 'Edit group'))))), 'pager' => array('class' => 'CLinkPager', 'maxButtonCount' => 5, 'nextPageLabel' => '<i class="fa fa-step-forward"></i>', 'prevPageLabel' => '<i class="fa fa-step-backward"></i>', 'firstPageLabel' => '<i class="fa fa-fast-backward"></i>', 'lastPageLabel' => '<i class="fa fa-fast-forward"></i>', 'header' => '', 'htmlOptions' => array('class' => 'pagination')), 'pagerCssClass' => 'pagination-container'));
?>

    </div>
</div>
开发者ID:ahdail,项目名称:humhub,代码行数:25,代码来源:index.php

示例2: foreach

        <?php 
    if ($group['label'] != "") {
        ?>
            <div class="panel-heading"><?php 
        echo $group['label'];
        ?>
</div>
        <?php 
    }
    ?>
        <div class="list-group">
            <?php 
    foreach ($items as $item) {
        ?>
                <?php 
        $item['htmlOptions']['class'] .= " list-group-item";
        ?>
                <?php 
        echo HHtml::link($item['icon'] . "<span>" . $item['label'] . "</span>", $item['url'], $item['htmlOptions']);
        ?>
            <?php 
    }
    ?>
        </div>
    <?php 
}
?>

</div>
<!-- end: list-group navi for large devices -->
开发者ID:skapl,项目名称:design,代码行数:30,代码来源:leftNavigation.php

示例3: notifyGroupAdminsForApproval

 /**
  * Notifies groups admins for approval of new user via e-mail.
  * This should be done after a new user is created and approval is required.
  *
  * @todo Create message template, move message into translation
  */
 private function notifyGroupAdminsForApproval()
 {
     // No admin approval required
     if ($this->status != User::STATUS_NEED_APPROVAL || !HSetting::Get('needApproval', 'authentication_internal')) {
         return;
     }
     foreach (GroupAdmin::model()->findAllByAttributes(array('group_id' => $this->group_id)) as $admin) {
         $adminUser = User::model()->findByPk($admin->user_id);
         if ($adminUser !== null) {
             $approvalUrl = Yii::app()->createAbsoluteUrl("//admin/approval");
             $html = "Hello {$adminUser->displayName},<br><br>\n\n" . "a new user {$this->displayName} needs approval.<br><br>\n\n" . "Click here to validate:<br>\n\n" . HHtml::link($approvalUrl, $approvalUrl) . "<br/> <br/>\n";
             $message = new HMailMessage();
             $message->addFrom(HSetting::Get('systemEmailAddress', 'mailing'), HSetting::Get('systemEmailName', 'mailing'));
             $message->addTo($adminUser->email);
             $message->view = "application.views.mail.TextOnly";
             $message->subject = Yii::t('UserModule.models_User', "New user needs approval");
             $message->setBody(array('message' => $html), 'text/html');
             Yii::app()->mail->send($message);
         } else {
             Yii::log("Could not load Group Admin User. Inconsistent Group Admin Record! User Id: " . $admin->user_id, CLogger::LEVEL_ERROR);
         }
     }
     return true;
 }
开发者ID:ahdail,项目名称:humhub,代码行数:30,代码来源:User.php

示例4: 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

示例5: array

        ?>
</td>
	                        <td><?php 
        echo $page->date_end;
        ?>
</td>
	                        <td><?php 
        echo $page->visibility == 1 ? 'Да' : 'Нет';
        ?>
</td>
	                        <td><?php 
        echo HHtml::link(Yii::t('TeachingModule.base', 'Results'), $this->createUrl('results', array('id' => $page->id)), array('class' => 'btn btn-primary btn-xs pull-right'));
        ?>
</td>
	                        <td><?php 
        echo HHtml::link(Yii::t('TeachingModule.base', 'Edit'), $this->createUrl('edit', array('id' => $page->id)), array('class' => 'btn btn-primary btn-xs pull-right'));
        ?>
</td>
	                    </tr>
	                    <?php 
    }
    ?>
                    <?php 
}
?>

            </table>

    </div>
</div>
开发者ID:nilBora,项目名称:MVC_teaching_Yii,代码行数:30,代码来源:index.php

示例6: array

    echo Yii::t('InstallerModule.base', 'Congratulations! Everything is ok and ready to start over!');
    ?>
                </div>
            <?php 
}
?>

            <hr>

        <?php 
echo HHtml::link('<i class="fa fa-repeat"></i> ' . Yii::t('InstallerModule.base', 'Check again'), array('//installer/setup/prerequisites'), array('class' => 'btn btn-info'));
?>

        <?php 
if (!$hasError) {
    ?>
                <?php 
    echo HHtml::link(Yii::t('InstallerModule.base', 'Next') . ' <i class="fa fa-arrow-circle-right"></i>', array('//installer/setup/database'), array('class' => 'btn btn-primary'));
    ?>
            <?php 
}
?>







    </div>
</div>
开发者ID:ahdail,项目名称:humhub,代码行数:31,代码来源:prerequisites.php

示例7: foreach

    echo Yii::t('WikiModule.base', 'Let\'s go!');
    ?>
</a>
                        </p>
                    </div>
                <?php 
}
?>
                <br>
                <ul class="wiki-list">
                    <?php 
foreach ($pages as $page) {
    ?>
                        <li>
                            <h1 class="wiki-page-history-title"><?php 
    echo HHtml::link('<i class="fa fa-file-text-o"></i> ' . CHtml::encode($page->title), $this->createContainerUrl('view', array('title' => $page->title)));
    ?>
</h1>
                        </li>

                    <?php 
}
?>
                </ul>

                <div class="text-center">
                    <?php 
$this->widget('CLinkPager', array('pages' => $pagination, 'maxButtonCount' => 10, 'header' => '', 'nextPageLabel' => '<i class="fa fa-step-forward"></i>', 'prevPageLabel' => '<i class="fa fa-step-backward"></i>', 'firstPageLabel' => '<i class="fa fa-fast-backward"></i>', 'lastPageLabel' => '<i class="fa fa-fast-forward"></i>', 'htmlOptions' => array('class' => 'pagination')));
?>
                </div>
开发者ID:Wikom,项目名称:humhub-modules-wiki,代码行数:30,代码来源:list.php

示例8: 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;"
                     data-toggle="tooltip" data-placement="top" title=""
                     data-original-title="<strong><?php 
    echo CHtml::encode($user->displayName);
    ?>
</strong><br><?php 
    echo CHtml::encode($user->profile->title);
    ?>
">
            </a>
        <?php 
}
?>

        <?php 
if ($showMoreButton) {
    ?>
            <br />
            <br />
            <?php 
    echo HHtml::link(Yii::t('DirectoryModule.widgets_views_newMembers', 'See all'), array('//directory/directory/members'), array('class' => 'btn btn-xl btn-primary'));
    ?>
        <?php 
}
?>

    </div>
</div>
开发者ID:skapl,项目名称:design,代码行数:31,代码来源:newMembers.php

示例9: array

                    </li>
                <?php 
}
?>


            </ul>


        </div>
        <br>


        <div class="well">
            <pre>
                <?php 
echo $migrate;
?>
            </pre>
        </div>
        <hr>

        <?php 
echo HHtml::link(Yii::t('AdminModule.views_setting_selftest', 'Re-Run tests'), array('//admin/setting/selftest'), array('class' => 'btn btn-primary'));
?>

    </div>
</div>

开发者ID:skapl,项目名称:design,代码行数:28,代码来源:selftest.php

示例10: array

<div class="panel panel-default">
    <div class="panel-heading"><?php 
echo Yii::t('AdminModule.views_userprofile_index', '<strong>Manage</strong> profiles fields');
?>
</div>
    <div class="panel-body">

        <?php 
echo HHtml::link(Yii::t('AdminModule.views_userprofile_index', 'Add new category'), $this->createUrl('//admin/userprofile/editCategory'), array('class' => 'btn btn-primary'));
?>

        <?php 
echo HHtml::link(Yii::t('AdminModule.views_userprofile_index', 'Add new field'), $this->createUrl('//admin/userprofile/editField'), array('class' => 'btn btn-primary'));
?>

        <hr>

        <ul>
            <?php 
foreach (ProfileFieldCategory::model()->findAll(array('order' => 'sort_order')) as $category) {
    ?>
            <li>
                <a href="<?php 
    echo $this->createUrl('editCategory', array('id' => $category->id));
    ?>
">Category: <?php 
    echo CHtml::encode($category->title);
    ?>
</a>
                <ul class="admin-userprofiles-fields">
                    <?php 
开发者ID:alefernie,项目名称:intranet,代码行数:31,代码来源:index.php

示例11: enrichText

 /**
  * Converts an given Ascii Text into a HTML Block
  * @param boolean $allowHtml transform user names in links
  * @param boolean $allowEmbed Sets if comitted video links will embedded
  *
  * Tasks:
  *      nl2br
  *      oembed urls
  */
 public static function enrichText($text)
 {
     $maxOembedCount = 3;
     // Maximum OEmbeds
     $oembedCount = 0;
     // OEmbeds used
     $text = preg_replace_callback('/http(.*?)(\\s|$)/i', function ($match) use(&$oembedCount, &$maxOembedCount) {
         // Try use oembed
         if ($maxOembedCount > $oembedCount) {
             $oembed = UrlOembed::GetOembed($match[0]);
             if ($oembed) {
                 $oembedCount++;
                 return $oembed;
             }
         }
         return HHtml::link($match[0], $match[0], array('target' => '_blank'));
     }, $text);
     # breaks links!?
     #$text = nl2br($text);
     $text = str_replace("\n", "<br />\n", $text);
     // get user details from guids
     $text = self::translateUserMentioning($text, true);
     return $text;
 }
开发者ID:ahdail,项目名称:humhub,代码行数:33,代码来源:HHtml.php

示例12: array

        <?php 
$this->beginContent('application.modules_core.wall.views.wallLayout', array('object' => $link));
?>

        <div class="media" style="display:table;">

            <a class="pull-left" href="<?php 
echo $link->href;
?>
" target="_blank" style="font-size: 26px; color: #555 !important;">
                <i class="fa fa-link"></i>
            </a>

            <div class="media-body" style="display:table-cell;vertical-align:middle;">
                <h4 class="media-heading" style="margin:0px 0px 1px"><?php 
echo Yii::t('LibraryModule.base', 'Added a new link %link% to category "%category%".', array('%link%' => '<strong>' . HHtml::link($link->title, $link->href, array('target' => '_blank')) . '</strong>', '%category%' => $link->category->title));
?>
</h4>
            </div>
        </div>

        <div style="margin-top:5px;">
                <?php 
if ($link->description != null || $link->description != "") {
    echo $link->description;
}
?>
        </div>

        <?php 
$this->endContent();
开发者ID:tejrajs,项目名称:humhub-modules-library,代码行数:31,代码来源:linkWallEntry.php

示例13: enrichText

 /**
  * Converts an given Ascii Text into a HTML Block
  * @param boolean $allowHtml transform user names in links
  * @param boolean $allowEmbed Sets if comitted video links will embedded
  *
  * Tasks:
  *      nl2br
  *      oembed urls
  */
 public static function enrichText($text)
 {
     $maxOembedCount = 3;
     // Maximum OEmbeds
     $oembedCount = 0;
     // OEmbeds used
     $text = preg_replace_callback('/(https?:\\/\\/.*?)(\\s|$)/i', function ($match) use(&$oembedCount, &$maxOembedCount) {
         // Try use oembed
         if ($maxOembedCount > $oembedCount) {
             $oembed = UrlOembed::GetOembed($match[0]);
             if ($oembed) {
                 $oembedCount++;
                 return $oembed;
             }
         }
         return HHtml::link($match[1], $match[1], array('target' => '_blank')) . $match[2];
     }, $text);
     // get user and space details from guids
     $text = self::translateMentioning($text, true);
     // create image tag for emojis
     $text = self::translateEmojis($text);
     return nl2br($text);
 }
开发者ID:alefernie,项目名称:intranet,代码行数:32,代码来源:HHtml.php

示例14: elseif

    } elseif ($membership->status == SpaceMembership::STATUS_INVITED) {
        $membershipText = '<a href="' . Yii::app()->createUrl("//space/space/inviteAccept", array('sguid' => $space->guid)) . '" class="btn btn-primary">' . Yii::t('RandomSpaceModule.base', 'Accept Invite') . '</a> ';
        $membershipText .= '<a href="' . Yii::app()->createUrl("//space/space/revokeMembership", array('sguid' => $space->guid)) . '" class="btn btn-primary">' . Yii::t('RandomSpaceModule.base', 'Decline Invite') . '</a> ';
    } elseif ($membership->status == SpaceMembership::STATUS_APPLICANT) {
        $membershipText = '<a href="' . Yii::app()->createUrl("//space/space/revokeMembership", array('sguid' => $space->guid)) . '" class="btn btn-primary" id="membership_button">' . Yii::t('RandomSpaceModule.base', 'Cancel pending membership application') . '</a>';
    }
}
// Follow Handling
if (!$space->isMember()) {
    if ($space->isFollowedByUser()) {
        $followText = HHtml::postLink(Yii::t('RandomSpaceModule.base', "Unfollow"), $space->createUrl('//space/space/unfollow'), array('class' => 'btn btn-danger'));
    } else {
        $followText = HHtml::postLink(Yii::t('RandomSpaceModule.base', "Follow"), $space->createUrl('//space/space/follow'), array('class' => 'btn btn-success'));
    }
    if (Yii::app()->user->isGuest) {
        $followText = HHtml::link(Yii::t('RandomSpaceModule.base', "View"), $space->getUrl(), array('class' => 'btn btn-success'));
    }
}
?>

<div class="panel panel-default">
    <div class="panel-heading">
        <?php 
echo Yii::t('RandomSpaceModule.base', '<strong>Space</strong> of the Moment');
?>
		<span class="member-count pull-right"><?php 
echo Yii::t('RandomSpaceModule.base', 'Members:') . ' ' . number_format(count($members));
?>
</span>
    </div>
	<div id="random-space-widget">
开发者ID:rajeshspurohit,项目名称:humhub-modules-random-space,代码行数:31,代码来源:RandomSpacePanel.php

示例15: array

<div class="container">
    <div class="panel panel-danger">
        <div class="panel-heading">
            <?php 
echo Yii::t('error', "<strong>Login</strong> required");
?>
        </div>
        <div class="panel-body">

            <strong><?php 
echo CHtml::encode($message);
?>
</strong>

            <br />
            <hr>

            <?php 
echo HHtml::link(Yii::t('base', 'Login'), Yii::app()->user->loginUrl, array('class' => 'btn btn-success'));
?>
            <a href="javascript:history.back();" class="btn btn-primary  pull-right"><?php 
echo Yii::t('base', 'Back');
?>
</a>
        </div>
    </div>
</div>
开发者ID:skapl,项目名称:design,代码行数:27,代码来源:401.php


注:本文中的HHtml::link方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。