Use proper shortcut methods in templates

This commit is contained in:
Morris Jobke 2016-04-06 10:18:56 +02:00
parent 046506dd14
commit 22898fa107
7 changed files with 11 additions and 11 deletions

View File

@ -34,7 +34,7 @@
'id' => 'files_index', 'id' => 'files_index',
'order' => 0, 'order' => 0,
'href' => $urlGenerator->linkToRoute('files.view.index'), 'href' => $urlGenerator->linkToRoute('files.view.index'),
'icon' => \OCP\Util::imagePath('core', 'places/files.svg'), 'icon' => $urlGenerator->imagePath('core', 'places/files.svg'),
'name' => $l->t('Files'), 'name' => $l->t('Files'),
]; ];
}); });

View File

@ -2,9 +2,9 @@
<button type="button" class="ldap_action_test_connection" name="ldap_action_test_connection"> <button type="button" class="ldap_action_test_connection" name="ldap_action_test_connection">
<?php p($l->t('Test Configuration'));?> <?php p($l->t('Test Configuration'));?>
</button> </button>
<a href="<?php p(\OC::$server->getURLGenerator()->linkToDocs('admin-ldap')); ?>" <a href="<?php p(link_to_docs('admin-ldap')); ?>"
target="_blank" rel="noreferrer"> target="_blank" rel="noreferrer">
<img src="<?php print_unescaped(OCP\Util::imagePath('', 'actions/info.png')); ?>" <img src="<?php print_unescaped(image_path('', 'actions/info.png')); ?>"
style="height:1.75ex" /> style="height:1.75ex" />
<?php p($l->t('Help'));?> <?php p($l->t('Help'));?>
</a> </a>

View File

@ -8,9 +8,9 @@
<button class="ldap_action_continue" name="ldap_action_continue" type="button"> <button class="ldap_action_continue" name="ldap_action_continue" type="button">
<?php p($l->t('Continue'));?> <?php p($l->t('Continue'));?>
</button> </button>
<a href="<?php p(\OC::$server->getURLGenerator()->linkToDocs('admin-ldap')); ?>" <a href="<?php p(link_to_docs('admin-ldap')); ?>"
target="_blank" rel="noreferrer"> target="_blank" rel="noreferrer">
<img src="<?php print_unescaped(OCP\Util::imagePath('', 'actions/info.png')); ?>" <img src="<?php print_unescaped(image_path('', 'actions/info.png')); ?>"
style="height:1.75ex" /> style="height:1.75ex" />
<span class="ldap_grey"><?php p($l->t('Help'));?></span> <span class="ldap_grey"><?php p($l->t('Help'));?></span>
</a> </a>

View File

@ -120,5 +120,5 @@ style('user_ldap', 'settings');
</fieldset> </fieldset>
</div> </div>
<!-- Spinner Template --> <!-- Spinner Template -->
<img class="ldapSpinner hidden" src="<?php p(\OCP\Util::imagePath('core', 'loading.gif')); ?>"> <img class="ldapSpinner hidden" src="<?php p(image_path('core', 'loading.gif')); ?>">
</form> </form>

View File

@ -33,7 +33,7 @@ script('core', [
<?php endif; ?> <?php endif; ?>
<div id="message" class="hidden"> <div id="message" class="hidden">
<img class="float-spinner" alt="" <img class="float-spinner" alt=""
src="<?php p(\OCP\Util::imagePath('core', 'loading-dark.gif'));?>"> src="<?php p(image_path('core', 'loading-dark.gif'));?>">
<span id="messageText"></span> <span id="messageText"></span>
<!-- the following div ensures that the spinner is always inside the #message div --> <!-- the following div ensures that the spinner is always inside the #message div -->
<div style="clear: both;"></div> <div style="clear: both;"></div>

View File

@ -34,7 +34,7 @@ script('core', 'lostpassword');
</p> </p>
<input type="submit" id="submit" value="<?php p($l->t('Reset password')); ?>" /> <input type="submit" id="submit" value="<?php p($l->t('Reset password')); ?>" />
<p class="text-center"> <p class="text-center">
<img class="hidden" id="float-spinner" src="<?php p(\OCP\Util::imagePath('core', 'loading-dark.gif'));?>"/> <img class="hidden" id="float-spinner" src="<?php p(image_path('core', 'loading-dark.gif'));?>"/>
</p> </p>
</fieldset> </fieldset>
</form> </form>

View File

@ -170,15 +170,15 @@ if($_['passwordChangeSupported']) {
<div id="clientsbox" class="section clientsbox"> <div id="clientsbox" class="section clientsbox">
<h2><?php p($l->t('Get the apps to sync your files'));?></h2> <h2><?php p($l->t('Get the apps to sync your files'));?></h2>
<a href="<?php p($_['clients']['desktop']); ?>" rel="noreferrer" target="_blank"> <a href="<?php p($_['clients']['desktop']); ?>" rel="noreferrer" target="_blank">
<img src="<?php print_unescaped(OCP\Util::imagePath('core', 'desktopapp.svg')); ?>" <img src="<?php print_unescaped(image_path('core', 'desktopapp.svg')); ?>"
alt="<?php p($l->t('Desktop client'));?>" /> alt="<?php p($l->t('Desktop client'));?>" />
</a> </a>
<a href="<?php p($_['clients']['android']); ?>" rel="noreferrer" target="_blank"> <a href="<?php p($_['clients']['android']); ?>" rel="noreferrer" target="_blank">
<img src="<?php print_unescaped(OCP\Util::imagePath('core', 'googleplay.png')); ?>" <img src="<?php print_unescaped(image_path('core', 'googleplay.png')); ?>"
alt="<?php p($l->t('Android app'));?>" /> alt="<?php p($l->t('Android app'));?>" />
</a> </a>
<a href="<?php p($_['clients']['ios']); ?>" rel="noreferrer" target="_blank"> <a href="<?php p($_['clients']['ios']); ?>" rel="noreferrer" target="_blank">
<img src="<?php print_unescaped(OCP\Util::imagePath('core', 'appstore.svg')); ?>" <img src="<?php print_unescaped(image_path('core', 'appstore.svg')); ?>"
alt="<?php p($l->t('iOS app'));?>" /> alt="<?php p($l->t('iOS app'));?>" />
</a> </a>