<?php use_helper('Date', 'sfSimpleBlog', 'crossAppLink') ?> <div class="hentry" id="post-<?php echo $post->getId() ?>"> <h2 class="entry-title"><?php echo link_to_post($post)?></h2> <div class="entry-date"> <abbr class="published"> <?php echo format_date(strtotime($post->getPublishedAt()), 'P') ?> <?php if ($sf_user->isAuthenticated()): ?> <?php $user_id = $sf_user->getAttribute('user_id', null, 'sfGuardSecurityUser') ?> <?php if ($post->getAuthorId() == $user_id): ?> <a href="<?php echo cross_app_url_for('backend', '@sf_simple_blog_post_edit?id='.$post->getId()) ?>">(<?php echo __('Edit') ?>)</a> <?php endif; ?> <?php endif; ?> </abbr> </div> <div class="entry-content"> <?php echo $post->getExtract(ESC_RAW) ?> </div> <div class="entry-meta"> <span class="entry-category"> <?php echo __('Posted in ') ?>› <?php echo __('%1%', array('%1%' => get_category_links($post->getsfSimpleBlogCategorys()))) ?> </span> <span class="meta-sep">|</span> <span class="tag-links"> <?php echo __('Tagged ') ?>› <?php if($tags = $post->getTags()): ?> <?php echo __('%1%', array('%1%' => get_tag_links($tags))) ?> <?php endif; ?> </span> <span class="meta-sep">|</span>
/** * Cette fonction est un infame copier coller de link_to1 avec un zeste de modif pour la rendre cross app * * @param string $name * @param string $app l'application * @param string $internalUri * @param string $env * @param array $options * * @see link_to1 * * * @return string */ function cross_app_link_to($name, $app, $internalUri, $env = null, $options = array()) { sfProjectConfiguration::getActive()->loadHelpers(array('Url')); $crossUrl = cross_app_url_for($app, $internalUri, true, $env); return link_to($name, $crossUrl, $options); }
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <?php include_http_metas() ?> <?php include_metas() ?> <title> <?php if (!include_slot('title')): ?> <?php echo sfConfig::get('app_sfSimpleBlog_title', 'sfSimpleBlog') ?> <?php endif; ?> </title> <link rel="shortcut icon" href="/favicon.ico" /> <link rel="stylesheet" type="text/css" media="screen" href="/sfSimpleBlog15Plugin/css/login.css" /> <link rel="stylesheet" type="text/css" media="screen" href="/sfSimpleBlog15Plugin/css/button.css" /> </head> <body> <div id="logincontainer"> <p id="backtoblog"><a href="<?php echo cross_app_url_for('frontend', '@homepage', true) ?>">← Back to <?php echo sfConfig::get('app_sfSimpleBlog_title', 'sfSimpleBlog') ?></a></p> <h1><?php echo sfConfig::get('app_sfSimpleBlog_title', 'sfSimpleBlog') ?></h1> <div id="loginbox"> <form action="<?php echo url_for('@sf_guard_signin') ?>" method="post"> <?php echo $form->renderGlobalErrors(); ?> <?php if(isset($form['_csrf_token'])): ?> <?php echo $form['_csrf_token']->render(); ?> <?php endif; ?> <?php echo $form['username']->renderRow(); ?> <?php echo $form['password']->renderRow(); ?> <div class="button_holder"> <label for="signin_remember"> <?php echo $form['remember']->render(array('class' => 'inputcheck')); ?> <?php echo __('Remember?', array(), 'sf_admin_blog') ?> </label> <input type="submit" value="Login" class="button blue large" />
?> <?php include_title(); ?> <link rel="shortcut icon" href="/crew/favicon.ico" /> <?php include_stylesheets(); ?> <?php include_javascripts(); ?> </head> <body onload=""> <div class="header"> <a href="<?php echo cross_app_url_for('front', '@homepage'); ?> " id="crew-logo" title="Crew, code review tool for git projects"><?php echo image_tag('crew-logo.png'); ?> </a> <?php include_component('default', 'userbox'); ?> </div> <div class="site"> <div class="page"> <?php echo $sf_content; ?> </div>
<?php use_helper('I18N', 'crossAppLink'); ?> <div id='sf_admin_theme_header'> <p class="f-right"> User: <strong><a href="#"><?php echo $sf_user->getGuardUser()->getUsername() ?></a></strong> <strong><?php echo link_to(__('Logout', null, 'sf_admin_blog'), '@sf_guard_signout', array('id' => 'logout')); ?></strong> </p> </div> <div id='sf_admin_top_menu'> <ul class="f-right"> <li><a href="<?php echo cross_app_url_for('frontend', '@homepage', true) ?>"><span class="button black large"><?php echo __('Visit Site', null, 'sf_admin_blog') ?> »</span></a></li> </ul> <ul> <li><a href="<?php echo url_for('@homepage') ?>"><span class="button black large">« <?php echo __('Dashboard', null, 'sf_admin_blog') ?></span></a></li> </ul> </div>