Kaynağa Gözat

Restructuration des templates + Préparation du home + gestion CSS par bundle.

bastien 12 yıl önce
ebeveyn
işleme
91f3636490

+ 17 - 17
app/config/routing_dev.yml Dosyayı Görüntüle

@@ -1,20 +1,20 @@
1
-_welcome:
2
-    pattern:  /dev
3
-    defaults: { _controller: AcmeDemoBundle:Welcome:index }
4
-
5
-_demo_secured:
6
-    resource: "@AcmeDemoBundle/Controller/SecuredController.php"
7
-    type:     annotation
8
-
9
-_demo:
10
-    resource: "@AcmeDemoBundle/Controller/DemoController.php"
11
-    type:     annotation
12
-    prefix:   /demo
13
-
14
-#_assetic:
15
-#    resource: .
16
-#    type:     assetic
17
-
1
+#_welcome:
2
+#    pattern:  /dev
3
+#    defaults: { _controller: AcmeDemoBundle:Welcome:index }
4
+#
5
+#_demo_secured:
6
+#    resource: "@AcmeDemoBundle/Controller/SecuredController.php"
7
+#    type:     annotation
8
+#
9
+#_demo:
10
+#    resource: "@AcmeDemoBundle/Controller/DemoController.php"
11
+#    type:     annotation
12
+#    prefix:   /demo
13
+#
14
+##_assetic:
15
+##    resource: .
16
+##    type:     assetic
17
+#
18 18
 _wdt:
19 19
     resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml"
20 20
     prefix:   /_wdt

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1715 - 0
app/logs/dev.log


+ 17 - 0
app/logs/prod.log Dosyayı Görüntüle

@@ -17,3 +17,20 @@
17 17
 [2011-09-09 17:14:07] request.ERROR: Symfony\Component\HttpKernel\Exception\NotFoundHttpException: No route found for "GET /images/favicon.ico" (uncaught exception) at /home/bux/NetBeansProjects/muzich/app/cache/prod/classes.php line 4539 [] []
18 18
 [2011-09-09 17:14:08] security.INFO: Populated SecurityContext with an anonymous Token [] []
19 19
 [2011-09-09 17:14:08] request.ERROR: Symfony\Component\HttpKernel\Exception\NotFoundHttpException: No route found for "GET /images/favicon.ico" (uncaught exception) at /home/bux/NetBeansProjects/muzich/app/cache/prod/classes.php line 4539 [] []
20
+[2011-09-10 11:45:12] security.INFO: Populated SecurityContext with an anonymous Token [] []
21
+[2011-09-10 11:45:12] request.ERROR: Symfony\Component\HttpKernel\Exception\NotFoundHttpException: No route found for "GET /bundles/muzichindex/css/index.css" (uncaught exception) at /home/bux/NetBeansProjects/muzich/app/cache/prod/classes.php line 4539 [] []
22
+[2011-09-10 11:49:51] security.DEBUG: Read SecurityContext from the session [] []
23
+[2011-09-10 11:49:51] security.DEBUG: Reloading user from user provider. [] []
24
+[2011-09-10 11:49:52] security.DEBUG: Username "bux" was reloaded from user provider. [] []
25
+[2011-09-10 11:49:52] request.ERROR: Symfony\Component\HttpKernel\Exception\NotFoundHttpException: No route found for "GET /bundles/muzichhome/css/home.css" (uncaught exception) at /home/bux/NetBeansProjects/muzich/app/cache/prod/classes.php line 4539 [] []
26
+[2011-09-10 11:49:52] security.DEBUG: Write SecurityContext in the session [] []
27
+[2011-09-10 11:51:43] security.DEBUG: Read SecurityContext from the session [] []
28
+[2011-09-10 11:51:43] security.DEBUG: Reloading user from user provider. [] []
29
+[2011-09-10 11:51:43] security.DEBUG: Username "bux" was reloaded from user provider. [] []
30
+[2011-09-10 11:51:43] request.ERROR: Symfony\Component\HttpKernel\Exception\NotFoundHttpException: No route found for "GET /bundles/muzichhome/css/home.css" (uncaught exception) at /home/bux/NetBeansProjects/muzich/app/cache/prod/classes.php line 4539 [] []
31
+[2011-09-10 11:51:43] security.DEBUG: Write SecurityContext in the session [] []
32
+[2011-09-10 11:51:57] security.DEBUG: Read SecurityContext from the session [] []
33
+[2011-09-10 11:51:57] security.DEBUG: Reloading user from user provider. [] []
34
+[2011-09-10 11:51:57] security.DEBUG: Username "bux" was reloaded from user provider. [] []
35
+[2011-09-10 11:51:57] request.ERROR: Symfony\Component\HttpKernel\Exception\NotFoundHttpException: No route found for "GET /bundles/muzichhome/css/home.css" (uncaught exception) at /home/bux/NetBeansProjects/muzich/app/cache/prod/classes.php line 4539 [] []
36
+[2011-09-10 11:51:57] security.DEBUG: Write SecurityContext in the session [] []

+ 3 - 1
src/Muzich/CoreBundle/Resources/views/layout.html.twig Dosyayı Görüntüle

@@ -3,7 +3,7 @@
3 3
 	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 4
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
5 5
 <head>
6
-	<title>{% block title %}{% endblock %}</title>
6
+	<title>Muzi.ch - {% block title %}{% endblock %}</title>
7 7
 	
8 8
 	<meta http-equiv="content-type" content="text/html;charset=utf-8" />
9 9
 	<meta http-equiv="Content-Style-Type" content="text/css" />
@@ -14,7 +14,9 @@
14 14
 	<link href="{{ asset('favicon.ico') }}" rel="icon" type="image/x-icon" />
15 15
 	<link href="{{ asset('bundles/muzichcore/css/base.css') }}" rel="stylesheet" media="screen" type="text/css" />
16 16
 	<link href="{{ asset('bundles/muzichcore/css/main.css') }}" rel="stylesheet" media="screen" type="text/css" />
17
+  {% block css %}{% endblock %}
17 18
 	{#<script src="{{ asset('js/main.js') }}" type="text/javascript"></script>#}
19
+  {% block js %}{% endblock %}
18 20
 </head>
19 21
 <body>
20 22
 	

+ 3 - 1
src/Muzich/HomeBundle/Controller/HomeController.php Dosyayı Görüntüle

@@ -15,6 +15,8 @@ class HomeController extends Controller
15 15
    */
16 16
   public function indexAction()
17 17
   {        
18
-    return array();
18
+    $user = $this->container->get('security.context')->getToken()->getUser();
19
+    
20
+    return array('user' => $user);
19 21
   }
20 22
 }

+ 9 - 1
src/Muzich/HomeBundle/Resources/views/Home/index.html.twig Dosyayı Görüntüle

@@ -1,2 +1,10 @@
1
-{% extends "MuzichCoreBundle::layout.html.twig" %}
1
+{% extends "MuzichHomeBundle::layout.html.twig" %}
2 2
 
3
+{% block title %}Réseau{% endblock %}
4
+
5
+{% block content %}
6
+    
7
+  Salut {{ user.username }}
8
+    
9
+    
10
+{% endblock %}

+ 9 - 0
src/Muzich/HomeBundle/Resources/views/layout.html.twig Dosyayı Görüntüle

@@ -0,0 +1,9 @@
1
+{% extends 'MuzichCoreBundle::layout.html.twig' %}
2
+
3
+{% block css %}
4
+	<link href="{{ asset('bundles/muzichhome/css/home.css') }}" rel="stylesheet" media="screen" type="text/css" />
5
+{% endblock %}
6
+
7
+{% block main_content %}
8
+    {% block content %}{% endblock %}
9
+{% endblock %}

+ 1 - 1
src/Muzich/IndexBundle/Resources/views/Index/index.html.twig Dosyayı Görüntüle

@@ -1,6 +1,6 @@
1 1
 {% extends "MuzichIndexBundle::layout.html.twig" %}
2 2
 
3
-{% block title %}Hello{% endblock %}
3
+{% block title %}Découvrez et partagez{% endblock %}
4 4
 
5 5
 {% block content %}
6 6
     

+ 0 - 14
web/bundles/muzichcore/css/main.css Dosyayı Görüntüle

@@ -1,15 +1 @@
1 1
 
2
-.hello
3
-{
4
-  background-color: #f4f4f4;
5
-  padding: 30px;
6
-}
7
-
8
-.hello .login_box
9
-{
10
-  width: 640px;
11
-  margin-left: auto;
12
-  margin-right: auto;
13
-  background-color: #e3f6fd;
14
-  padding: 20px;
15
-}

+ 13 - 0
web/bundles/muzichhome/css/home.css Dosyayı Görüntüle

@@ -0,0 +1,13 @@
1
+/* 
2
+    Document   : home
3
+    Created on : 10 sept. 2011, 12:49:23
4
+    Author     : bux
5
+    Description:
6
+        Purpose of the stylesheet follows.
7
+*/
8
+
9
+/* 
10
+   TODO customize this sample style
11
+   Syntax recommendation http://www.w3.org/TR/REC-CSS2/
12
+*/
13
+

+ 16 - 0
web/bundles/muzichindex/css/index.css Dosyayı Görüntüle

@@ -0,0 +1,16 @@
1
+
2
+
3
+.hello
4
+{
5
+  background-color: #f4f4f4;
6
+  padding: 30px;
7
+}
8
+
9
+.hello .login_box
10
+{
11
+  width: 640px;
12
+  margin-left: auto;
13
+  margin-right: auto;
14
+  background-color: #e3f6fd;
15
+  padding: 20px;
16
+}