Permalink
Browse files

Merge branch 'master' of https://github.com/raystorm/SymfonyResume

Conflicts:
	framework-standard-edition/app/config/config.yml
	framework-standard-edition/composer.lock
	framework-standard-edition/src/Tburton/ResumeBundle/Resources/views/Default/admin.html.twig
	framework-standard-edition/src/Tburton/ResumeBundle/Resources/views/Default/index.html.twig
  • Loading branch information...
raystorm committed Feb 27, 2014
2 parents e998e59 + b334bef commit eb1a30e6eb784243d8c921d968c567abe526bb21
@@ -118,30 +118,14 @@ bc_bootstrap:
assets_dir: %kernel.root_dir%/../vendor/twitter/bootstrap
jquery_path: %kernel.root_dir%/../vendor/jquery/jquery/jquery-1.9.1.js
-
# OpenId login stuffs
fp_open_id:
identity_class: Tburton\ResumeBundle\Users\OpenIdUserIdentity
# identity_class: Acme\DemoBundle\Entity\OpenIdIdentity
-
# Insert application logging
monolog:
handlers:
-# applog:
-# type: stream
-# path: /var/log/symfony.log
-# level: error
-#
-# main:
-# type: fingers_crossed
-# action_level: warning
-# handler: file
-#
-# file:
-# type: stream
-# level: debug
-#
syslog:
type: syslog
level: info
@@ -152,8 +136,6 @@ monolog:
VERBOSITY_NORMAL: NOTICE
error_log:
type: stream
-# type: service
-# id: Error_logger
level: info
stdout:
type: stream

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -2,16 +2,14 @@
namespace Tburton\ResumeBundle\Controller;
+use Alchemy\Zippy;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
-
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Core\SecurityContext;
-use Alchemy\Zippy;
-
-use ZendService\LiveDocx;
use ZendService\LiveDocx\MailMerge;
+use ZendService\LiveDocx;
class AdminController extends Controller
{
@@ -62,16 +60,17 @@ public function AdminAction(Request $request)
return $this->render( 'ResumeBundle:Default:admin.html.twig',
array( "page_title" => "Tom Burton's Portfolio",
"user" => $user,
+ "userDump" => print_r($user,true),
"form" => $form->createView(),
- "attributes" => $attributes,
+ "attributes" => print_r($attributes,true),
"result" => $result));
}
/**
* @return string with the relative path to where the Resume files are stored
*/
private function getFolder()
- { return $this->container->getParameter('reaume.FolderLocation'); }
+ { return $this->container->getParameter('resume.FolderLocation'); }
private function handleFileUpload(UploadedFile $uploaded)
{
@@ -4,8 +4,6 @@
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
-use Symfony\Component\HttpFoundation\Request;
-
class DefaultController extends Controller
{
//TODO: add template actions
@@ -15,12 +13,15 @@ public function indexAction()
$name = "Not Logged In";
$securityContext = $this->get('security.context');
- $user = $securityContext->getToken()->getUser();
- if ( $user ) { $name = $user; }
+ $token = $securityContext->getToken();
+
+ if ( $token && $securityContext->isGranted('IS_AUTHENTICATED_OPENID') )
+ { $name = $token->getUser()->getUserName(); }
return $this->render( 'ResumeBundle:Default:index.html.twig',
- array( "page_title" => "Tom Burton's Portfolio",
- "userName" => $name));
+ array( "page_title" => "Tom Burton's Portfolio",
+ "userName" => $token->getUser(),
+ "welcomeName" => $name));
}
public function aboutAction()
@@ -34,4 +35,6 @@ public function contactAction()
return $this->render('ResumeBundle:Default:contact.html.twig',
array( "page_title" => "Contact") );
}
+
+ public function dump($var) { return print_r($var, true); }
}
@@ -19,9 +19,9 @@ public function docxAction() { return $this->getFile('docx'); }
public function htmlAction() { return $this->getFile('html'); }
- public function txtAction() { return $this->getFile('txt'); }
+ public function txtAction() { return $this->getFile('txt'); }
- public function pdfAction() { return $this->getFile('pdf'); }
+ public function pdfAction() { return $this->getFile('pdf'); }
/** Generate a Nice name for the downloaded resumes */
public function buildFileName()
@@ -12,12 +12,12 @@
<p>
<h3>User Object</h3>
- <code style="white-space: pre; display: block;">{ dump(user) }</code>
+ <code style="white-space: pre; display: block;">{{ userDump }}</code>
</p>
<p>
<h3>User Attributes</h3>
- <code style="white-space: pre; display: block;">{ dump(attributes) }</code>
+ <code style="white-space: pre; display: block;">{{ attributes }}</code>
</p>
<h2>Resume Upload</h2>
@@ -6,9 +6,9 @@
<div class="hero-unit">
<h1>{{ fullName }}</h1>
<p>{{ fullName }} is an excellent Web Application Developer.</p>
- <P>
- Welcome dump(userName) !
- </P>
+ {% if welcomeName %}
+ <P> Welcome {{ welcomeName }}! </P>
+ {% endif %}
<p>
<a href="#" class="btn btn-primary btn-large">Learn more &raquo;</a>
</p>

0 comments on commit eb1a30e

Please sign in to comment.