本文整理汇总了PHP中HTML::info方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML::info方法的具体用法?PHP HTML::info怎么用?PHP HTML::info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTML
的用法示例。
在下文中一共展示了HTML::info方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getFieldsetBlock
/**
* Get fieldset block
* @return string
*/
private function getFieldsetBlock()
{
$String = '';
foreach ($this->TrainingObjects as $i => $TrainingObject) {
$activityIDs[] = $TrainingObject->getActivityId();
}
$duplicates = (new DuplicateFinder(DB::getInstance(), SessionAccountHandler::getId()))->checkForDuplicates($activityIDs);
$countDuplicates = count(array_filter($duplicates));
$String .= HTML::info(sprintf(__('Found %s activities.'), count($this->TrainingObjects)));
if ($countDuplicates > 0) {
$String .= HTML::warning(_n('Found <strong>one</strong> duplicate activity.', 'Found duplicate activities.', $countDuplicates));
}
$String .= '<table class="fullwidth multi-import-table zebra-style c" id="multi-import-table">';
$String .= '<thead><tr><th>' . __('Import') . '</th><th>' . __('Date') . '</th><th>' . __('Duration') . '</th><th>' . __('Distance') . '</th><th colspan="4"></th></tr></thead>';
$String .= '<tbody>';
foreach ($this->TrainingObjects as $i => $TrainingObject) {
$String .= '<tr>' . $this->getTableRowFor($TrainingObject, $i, $duplicates[$TrainingObject->getActivityId()]) . '</tr>';
}
$String .= '</tbody>';
$String .= '</table>';
$String .= Ajax::wrapJSforDocumentReady('
$("#multi-import-table td").click(function(e){
if ($(e.target).closest(\'input[type="checkbox"]\').length == 0)
$(this).parent().find(\'input:checkbox\').attr(\'checked\', !$(this).parent().find(\'input:checkbox\').attr(\'checked\'));
});
');
return $String;
}
示例2: displayLongDescription
/**
* Display long description
*/
protected function displayLongDescription()
{
echo HTML::p(__('This plugin lists all your races. It shows you a summary of all your races and ' . 'your personal bests (over all distances with at least two results).'));
echo HTML::p(__('In addition, it plots the trend of your results over a specific distance.' . 'If you run a race just for fun, you can mark it as a \'fun race\' to ignore it in the plot.'));
echo HTML::info(__('You can define the activity type for races in your configuration.'));
echo HTML::warning(__('Make sure that your activities hold the correct distance.' . 'Only races with exactly 10.00 km will be considered as a race over 10 kilometers.'));
}
示例3: addInfoLink
/**
* Add info link
*/
protected function addInfoLink()
{
if (!Request::isOnSharedPage()) {
$Linker = new Linker($this->Context->activity());
$InfoLink = Ajax::window('<a href="' . $Linker->urlToRoundsInfo() . '">' . __('More details about your laps') . '</a>', 'normal');
$this->Header = HTML::info($InfoLink);
}
}
示例4: display
/**
* Display
*/
public function display()
{
$url = 'https://twitter.com/share?url=' . $this->getPublicURL() . '&text=' . $this->getText() . '&via=RunalyzeDE';
$Linklist = new BlocklinkList();
$Linklist->addCompleteLink($this->externalLink($url, __('Tweet!')));
$Linklist->display();
echo HTML::info(__('You will be forwared to Twitter, where you can define which text shall be displayed.'));
}
示例5: addInfoLink
/**
* Add info link
*/
protected function addInfoLink()
{
if ($this->Context->dataview()->vdot()->value() > 0 || $this->Context->activity()->jdIntensity() > 0) {
if (!Request::isOnSharedPage()) {
$Linker = new Activity\Linker($this->Context->activity());
$InfoLink = Ajax::window('<a href="' . $Linker->urlToVDOTInfo() . '">' . __('More about VDOT calculation') . '</a>', 'small');
$this->Footer = HTML::info($InfoLink);
}
}
}
示例6: addInfoLink
/**
* Add info link
*/
protected function addInfoLink()
{
if ($this->Context->trackdata()->has(Trackdata\Entity::DISTANCE) && $this->Context->trackdata()->has(Trackdata\Entity::TIME)) {
if (!Request::isOnSharedPage()) {
$Linker = new Linker($this->Context->activity());
$InfoLink = Ajax::window('<a href="' . $Linker->urlToRoundsInfo() . '">' . __('More details about your laps') . '</a>', 'big');
$this->Header = HTML::info($InfoLink);
}
}
}
示例7: setRightContent
/**
* Set plot
*/
protected function setRightContent()
{
$this->addRightContent('plot', __('Heartrate plot'), new Activity\Plot\Heartrate($this->Context));
if ($this->Context->trackdata()->has(\Runalyze\Model\Trackdata\Entity::HEARTRATE) && $this->Context->trackdata()->has(\Runalyze\Model\Trackdata\Entity::TIME)) {
$Table = new TableZonesHeartrate($this->Context);
$Code = $Table->getCode();
$Code .= HTML::info(__('You\'ll be soon able to configure your own zones.'));
$this->addRightContent('zones', __('Heartrate zones'), $Code);
}
}
示例8: display
/**
* Display
*/
public function display()
{
if (!$this->Context->activity()->isPublic()) {
echo HTML::error(__('This training is private and cannot be shared.'));
return;
}
$Linklist = new BlocklinkList();
$Linklist->addCompleteLink($this->externalLink($this->getUrl(), __('Share!')));
$Linklist->display();
echo HTML::info(__('You will be forwarded to Facebook, where you can define which text shall be displayed.'));
$this->throwLinkErrorForLocalhost();
}
示例9: display
/**
* Display
*/
public function display()
{
if (!$this->Context->activity()->isPublic()) {
echo HTML::error(__('This training is private and cannot be shared.'));
return;
}
$url = 'https://plus.google.com/share?url=' . urlencode($this->getPublicURL()) . '&h1=de';
$Linklist = new BlocklinkList();
$Linklist->addCompleteLink($this->externalLink($url, __('Share +1')));
$Linklist->display();
echo HTML::info(__('You will be forwared to Google+, where you can define which text shall be displayed.'));
$this->throwLinkErrorForLocalhost();
}
示例10: addInfoLink
/**
* Add info link
*/
protected function addInfoLink()
{
if (!Request::isOnSharedPage()) {
$Linker = new Linker($this->Context->activity());
$InfoLink = Ajax::window('<a href="' . $Linker->urlToElevationInfo() . '">' . __('More about elevation') . '</a>', 'normal');
$this->Footer = HTML::info($InfoLink);
} else {
$this->Footer = '';
}
if ($this->Context->route()->hasCorrectedElevations()) {
$this->Footer .= HTML::info(__('Elevation data were corrected.'));
} elseif ($this->Context->route()->hasOriginalElevations() && Configuration::ActivityForm()->correctElevation()) {
$this->Footer .= HTML::warning(__('Elevation data are not corrected.'));
}
// TODO: Add link to correct them now!
}
示例11: display
/**
* Display
*/
public final function display()
{
$this->setFileContent();
$this->writeFile();
if (count($this->getAllErrors()) > 0) {
foreach ($this->getAllErrors() as $Error) {
echo HTML::error($Error);
}
} else {
echo HTML::info('
' . __('Your activity has been exported.') . '<br>
<br>
<a href="inc/export/files/' . $this->getFilename() . '"><strong>' . __('Download') . ': ' . $this->getFilename() . '</strong></a>
');
}
}
示例12: getFieldsetBlock
/**
* Get fieldset block
* @return string
*/
private function getFieldsetBlock()
{
$String = '';
$String .= HTML::info(sprintf(__('Found %s activities.'), count($this->TrainingObjects)));
$String .= '<table class="fullwidth multi-import-table zebra-style c" id="multi-import-table">';
$String .= '<thead><tr><th>' . __('Import') . '</th><th>' . __('Date') . '</th><th>' . __('Duration') . '</th><th>' . __('Distance') . '</th><th colspan="4"></th></tr></thead>';
$String .= '<tbody>';
foreach ($this->TrainingObjects as $i => $TrainingObject) {
$String .= '<tr>' . $this->getTableRowFor($TrainingObject, $i) . '</tr>';
}
$String .= '</tbody>';
$String .= '</table>';
$String .= Ajax::wrapJSforDocumentReady('
$("#multi-import-table td").click(function(e){
if ($(e.target).closest(\'input[type="checkbox"]\').length == 0)
$(this).parent().find(\'input:checkbox\').attr(\'checked\', !$(this).parent().find(\'input:checkbox\').attr(\'checked\'));
});
');
return $String;
}
示例13: Frontend
<?php
/**
* Delete Account
* Call: call/window.delete.php
*/
require '../inc/class.Frontend.php';
$Frontend = new Frontend();
$Errors = array();
AccountHandler::setAndSendDeletionKeyFor($Errors);
echo HTML::h1(__('Delete your account.'));
if (!empty($Errors)) {
foreach ($Errors as $Error) {
echo HTML::error($Error);
}
} else {
echo HTML::info(__('<em>A confirmation has been sent via mail.</em><br>' . 'How sad, that you\'ve decided to delete your account.<br>' . 'Your account will be deleted as soon as you click on the confirmation link in your mail.'));
}
示例14: getCodeFor
/**
* Get code for
* @param string $PluginType
* @return string
*/
private function getCodeFor($PluginType)
{
$Factory = new PluginFactory();
$Plugins = $Factory->completeData($PluginType);
usort($Plugins, $this->pluginOrderFunction());
if (empty($Plugins)) {
return HTML::info(__('No plugins available.'));
}
$Code = '
<table class="zebra-style fullwidth more-padding">
<thead>
<tr class="top b">
<th colspan="3">' . PluginType::readableString($PluginType) . '</th>
<th>' . __('Mode') . '</th>
<th>' . __('Order') . '</th>
<th></th>
</tr>
</thead>
<tbody>';
foreach ($Plugins as $Data) {
$Plugin = $Factory->newInstance($Data['key']);
if ($Plugin === false) {
$Code .= '
<tr class="unimportant">
<td>' . PluginInstaller::uninstallLink($Plugin->key()) . '</td>
<td class="b">' . $Plugin->key() . '</td>
<td colspan="4">' . __('The plugin cannot be found.') . '</td>
</tr>';
} else {
$Code .= '
<tr class="a' . ($Plugin->isInActive() ? ' unimportant' : '') . '">
<td>' . $Plugin->getConfigLink() . '</td>
<td class="b">' . $Plugin->name() . '</td>
<td>' . $Plugin->description() . '</td>
<td><select name="plugin_modus_' . $Plugin->id() . '">
<option value="' . Plugin::ACTIVE . '"' . HTML::Selected($Plugin->isActive()) . '>' . __('enabled') . '</option>
<option value="' . Plugin::ACTIVE_VARIOUS . '"' . HTML::Selected($Plugin->isHidden()) . '>' . __('hidden*') . '</option>
<option value="' . Plugin::ACTIVE_NOT . '"' . HTML::Selected($Plugin->isInActive()) . '>' . __('not enabled') . '</option>
</select></td>
<td><input type="text" name="plugin_order_' . $Plugin->id() . '" size="3" value="' . $Plugin->order() . '"></td>
<td>' . PluginInstaller::uninstallLink($Plugin->key()) . '</td>
</tr>';
}
}
$Code .= '
</tbody>
</table>';
switch ($PluginType) {
case 'panel':
$Code .= HTML::info(__('* Hidden plugins only show their headings.'));
break;
case 'stat':
$Code .= HTML::info(__('* Hidden plugins are grouped as \'Miscellaneous\'.'));
break;
case 'tool':
default:
$Code .= '';
}
return $Code;
}
示例15: getCodeFor
/**
* Get code for
* @param string $PluginType
* @return string
*/
private function getCodeFor($PluginType)
{
$Factory = new PluginFactory();
$Plugins = $Factory->completeData($PluginType);
usort($Plugins, $this->pluginOrderFunction());
if (empty($Plugins)) {
return HTML::info(__('No plugins available.'));
}
$Code = '
<table class="zebra-style fullwidth more-padding">
<thead>
<tr class="top b">
<th colspan="3">' . PluginType::readableString($PluginType) . '</th>
<th>' . __('Mode') . '</th>
<th>' . __('Order') . '</th>
<th></th>
</tr>
</thead>
<tbody>';
foreach ($Plugins as $pos => $Data) {
$Plugin = $Factory->newInstance($Data['key']);
if ($Plugin === false) {
$Code .= '
<tr class="unimportant">
<td>' . PluginInstaller::uninstallLink($Plugin->key()) . '</td>
<td class="b">' . $Plugin->key() . '</td>
<td colspan="4">' . __('The plugin cannot be found.') . '</td>
</tr>';
} else {
$Code .= '
<tr id="' . $Plugin->id() . '_tr" class="a' . ($Plugin->isInActive() ? ' unimportant' : '') . '">
<td>' . $Plugin->getConfigLink() . '</td>
<td class="b">' . $Plugin->name() . '</td>
<td>' . $Plugin->description() . '</td>
<td><select name="plugin_modus_' . $Plugin->id() . '">
<option value="' . Plugin::ACTIVE . '"' . HTML::Selected($Plugin->isActive()) . '>' . __('enabled') . '</option>
<option value="' . Plugin::ACTIVE_VARIOUS . '"' . HTML::Selected($Plugin->isHidden()) . '>' . __('hidden*') . '</option>
<option value="' . Plugin::ACTIVE_NOT . '"' . HTML::Selected($Plugin->isInActive()) . '>' . __('not enabled') . '</option>
</select></td>
<td style="white-space:nowrap;">
<input class="plugin-position" type="text" name="plugin_order_' . $Plugin->id() . '" size="3" value="' . ($pos + 1) . '">
<span class="link" onclick="pluginMove(' . $Plugin->id() . ', \'up\')">' . Icon::$UP . '</span>
<span class="link" onclick="pluginMove(' . $Plugin->id() . ', \'down\')">' . Icon::$DOWN . '</span>
</td>
<td>' . PluginInstaller::uninstallLink($Plugin->key()) . '</td>
</tr>';
}
}
$Code .= '
</tbody>
</table>';
$Code .= Ajax::wrapJS('
function pluginMove(id, way) {
var pos = parseInt($("input[name=\'plugin_order_"+id+"\']").val()),
tr = $("#"+id+"_tr");
if (way == "up" && pos > 1) {
$("#"+id+"_tr .plugin-position").val(pos-1);
tr.prev().find(".plugin-position").val(pos);
tr.prev().toggleClass("swapped");
tr.prev().before(tr);
} else if (way == "down" && tr.next().find(".plugin-position").val() > 0) {
$("#"+id+"_tr .plugin-position").val(pos+1);
tr.next().find(".plugin-position").val(pos);
tr.next().toggleClass("swapped");
tr.next().after(tr);
}
tr.toggleClass("swapped");
}
');
switch ($PluginType) {
case 'panel':
$Code .= HTML::info(__('* Hidden plugins only show their headings.'));
break;
case 'stat':
$Code .= HTML::info(__('* Hidden plugins are grouped as \'Miscellaneous\'.'));
break;
case 'tool':
default:
$Code .= '';
}
return $Code;
}