示例#1
0
function smartyp__($params)
{
    $original = $params['original'];
    $context = $params['context'];
    $n = $params['count'];
    return p__($context, $original, $n);
}
示例#2
0
文件: read.php 项目: oscarotero/folk
</button>
			<button type="submit" name="method-override" value="PUT" data-confirm="<?php 
echo p__('edit', 'You will save this data as a new row. Are you sure?');
?>
" formaction="<?php 
echo $app->getRoute('create', ['entity' => $entityName]);
?>
" class="button button-link"><?php 
echo p__('edit', 'Duplicate');
?>
</button>
			<button type="submit" name="method-override" value="DELETE" data-confirm="<?php 
echo p__('edit', 'This action cannot be undo. Are you sure?');
?>
" formaction="<?php 
echo $app->getRoute('delete', ['entity' => $entityName, 'id' => $id]);
?>
" class="button button-link"><?php 
echo p__('edit', 'Delete');
?>
</button>
		</div>
		<?php 
echo $form->closeHtml();
?>

    </div>
</div>

<progress class="progress"></progress>
示例#3
0
文件: index.php 项目: oscarotero/folk
    echo $app->description;
    ?>
				| <a href="<?php 
    echo $app['url'];
    ?>
" target="_blank"><?php 
    echo p__('home', 'View web');
    ?>
</a>
			</p>
			<p>
				<a class="button button-bookmarklet" href="javascript:<?php 
    echo $bookmarklet;
    ?>
"><?php 
    echo p__('home', 'Bookmarklet');
    ?>
</a>
			</p>

		<?php 
} else {
    ?>
			<p>
				<?php 
    echo $app->description;
    ?>
			</p>
		<?php 
}
?>
示例#4
0
文件: nav.php 项目: oscarotero/folk
?>
" class="menu-secondary-search" data-module="search" method="get" tabindex="-1">
		<a href="<?php 
echo $app->getRoute('search', ['entity' => $entityName]);
?>
" title="<?php 
echo $entity->description;
?>
">
			<?php 
echo $entity->title;
?>
		</a>

		<input id="search-entity" name="query" type="search" placeholder="<?php 
echo isset($placeholder) ? $placeholder : p__('search', 'Search %s...', strtolower($entity->title));
?>
" value="<?php 
echo isset($search) ? $search->getQuery() : '';
?>
">
		<input type="hidden" name="page" value="1">
		<button type="submit">
			<?php 
echo $this->icon('action/search');
?>
		</button>
	</form>

	<ul class="menu-secondary-options">
		<li>
示例#5
0
?>
</p>
	<p><?php 
echo __('This is another text "with double quotes"');
?>
</p>
	<p><?php 
echo htmlspecialchars(__('This is another text \'with escaped quotes\''));
?>
</p>
	<p><?php 
echo n__('%s point', '%s points', rand(1, 3));
?>
</p>
	<p><?php 
echo p__('dsadasd', 'Text with prefix');
?>
</p>
	<?php 
echo foo();
?>
	<?php 
function foo()
{
    $date = time();
    $date_str_parts_arr[] = __('on :date at :clock', array(':date' => date('d.m.Y', $date), ':clock' => date('H:i', $date)));
    return $date_str_parts_arr[0];
}
?>

	<br>	
示例#6
0
    if ($search->getPage() !== null && count($rows) === $search->getLimit()) {
        ?>
		<footer class="footer-primary">
			<a href="<?php 
        echo $app->getRoute('search', ['entity' => $entityName], ['query' => isset($search) ? $search->getQuery() : null, 'page' => (isset($search) ? $search->getPage() : 0) + 1]);
        ?>
" class="button button-call ui-autoload-btn">
				<?php 
        echo p__('search', 'More results');
        ?>
			</a>
		</footer>
		<?php 
    }
    ?>

		<?php 
} else {
    ?>
		<div class="page-list-noresults">
			<p><?php 
    echo p__('search', 'No items found');
    ?>
</p>
		</div>
		<?php 
}
?>
	</div>
</article>
示例#7
0
<header>
    <h1><?php 
__e('text 1');
?>
</h1>
</header>

<div>
    <p><?php 
__($var);
?>
</p>
    <p><?php 
p__('context', $var);
?>
</p>
    <p><?php 
__('text 2');
?>
</p>
    <p><?php 
__('text 3 (with parenthesis)');
?>
</p>
    <p><?php 
__('text 4 "with double quotes"');
?>
</p>
    <p><?php 
__('text 5 \'with escaped single quotes\'');
?>
示例#8
0
?>

<?php 
$this->insert('nav', ['entityName' => $entityName]);
?>

<div class="page page-form">
	<div class="page-content">
		<?php 
echo $form->data('module', 'submit')->action($app->getRoute('create', ['entity' => $entityName]))->openHtml();
$form['data']->addClass('page-form-content');
echo $form->html();
?>

		<div class="footer-primary is-floating">
			<button type="submit" class="button button-call"><?php 
echo p__('insert', 'Create');
?>
</button>
		</div>

        <input type="hidden" name="method-override" value="put">

		<?php 
echo $form->closeHtml();
?>
    </div>
</div>

<progress class="progress"></progress>