Access key issueing.
authorhiroto
Wed, 04 Sep 2013 12:25:37 +0900
changeset 39 50f946b51282
parent 38 fa983cc0e405
child 40 6ea1850c62d6
Access key issueing.
autotweet-php/src/Org/W3/AutotweetBundle/Controller/DefaultController.php
autotweet-php/src/Org/W3/AutotweetBundle/Resources/views/Default/list.html.twig
autotweet-php/src/Org/W3/AutotweetBundle/Resources/views/Default/newtalk.html.twig
autotweet-php/src/Org/W3/AutotweetBundle/Resources/views/Default/note.html.twig
--- a/autotweet-php/src/Org/W3/AutotweetBundle/Controller/DefaultController.php	Wed Sep 04 12:16:40 2013 +0900
+++ b/autotweet-php/src/Org/W3/AutotweetBundle/Controller/DefaultController.php	Wed Sep 04 12:25:37 2013 +0900
@@ -32,7 +32,7 @@
     public function noteAction($id){
         $talk = $this->getDoctrine()->getRepository('OrgW3AutotweetBundle:Talk')->find($id);
         $post= $this->getDoctrine()->getRepository('OrgW3AutotweetBundle:Post')->findBy(array('talk'=>$talk));
-        return $this->render('OrgW3AutotweetBundle:Default:note.html.twig', array('post' => $post));
+        return $this->render('OrgW3AutotweetBundle:Default:note.html.twig', array('post' => $post, 'talk' => $talk));
     }
     
     public function newTalkAction(Request $request)
@@ -41,7 +41,7 @@
              $user = $this->getDoctrine()->getRepository('OrgW3AutotweetBundle:User')->find(99999);
             $newpost = $this->getDoctrine()->getRepository('OrgW3AutotweetBundle:Talk')->addnew($user);
            
-        return $this->render('OrgW3AutotweetBundle:Default:newtalk.html.twig', array('talk'=>$newpost)); 
+        return $this->render('OrgW3AutotweetBundle:Default:newtalk.html.twig', array('key'=>$newpost->getAccesskey())); 
     }
     
     public function testAction(){
--- a/autotweet-php/src/Org/W3/AutotweetBundle/Resources/views/Default/list.html.twig	Wed Sep 04 12:16:40 2013 +0900
+++ b/autotweet-php/src/Org/W3/AutotweetBundle/Resources/views/Default/list.html.twig	Wed Sep 04 12:25:37 2013 +0900
@@ -34,7 +34,7 @@
     {% for data in talk %}
      <tr>
       <td>
-        <a href="{{ path('org_w3_autotweet_note', {'id': data.id}) }}">{{data.name}}</a>
+        <a href="{{ path('org_w3_autotweet_note', {'id': data.id}) }}">{%if null==data.title %}{{data.name}}{% else %}{{data.name}}{% endif %}</a>
       </td>
       <td>{{data.accesskey}}</td>
     </tr>
--- a/autotweet-php/src/Org/W3/AutotweetBundle/Resources/views/Default/newtalk.html.twig	Wed Sep 04 12:16:40 2013 +0900
+++ b/autotweet-php/src/Org/W3/AutotweetBundle/Resources/views/Default/newtalk.html.twig	Wed Sep 04 12:25:37 2013 +0900
@@ -23,7 +23,7 @@
         <div class="span8 offset2 paymentdata">
                            <h1>Accesskey Generated.</h1><br />
 <br />
-<p>{{talk.accesskey}}</p>
+<p>{{key}}</p>
 <a href="{{ path('org_w3_autotweet_list') }}">Back</a>
 
 
--- a/autotweet-php/src/Org/W3/AutotweetBundle/Resources/views/Default/note.html.twig	Wed Sep 04 12:16:40 2013 +0900
+++ b/autotweet-php/src/Org/W3/AutotweetBundle/Resources/views/Default/note.html.twig	Wed Sep 04 12:25:37 2013 +0900
@@ -24,6 +24,8 @@
 <h1>Notes list</h1>
 <a href="{{ path('org_w3_autotweet_list') }}">Back</a>
 <p>
+<h3>{{talk.title}}</h3>
+<p>by {{talk.author}}</p>
 <table id="paymentTable" style="text-align: left;" cellspacing="0">
   <thead>
     <tr>