Browse Source

Un peu de js sur interface inscription/connexion.

bastien 13 years ago
parent
commit
73b73c2236

+ 3 - 0
app/Resources/MuzichIndexBundle/views/layout.html.twig View File

@@ -3,6 +3,9 @@
3 3
 {% block css %}
4 4
 	<link href="{{ asset('bundles/muzichindex/css/index.css') }}" rel="stylesheet" media="screen" type="text/css" />
5 5
 {% endblock %}
6
+{% block js %}
7
+  <script src="{{ asset('bundles/muzichindex/js/index.js') }}" type="text/javascript"></script>
8
+{% endblock %}
6 9
 
7 10
 {% block main_content %}
8 11
     {% block content %}{% endblock %}

+ 10 - 1
app/Resources/translations/navigationui.fr.yml View File

@@ -9,4 +9,13 @@ top_bar:
9 9
   logout:               Déconnexion
10 10
   
11 11
 network:
12
-  mygroups:             Mes groupes
12
+  mygroups:             Mes groupes
13
+  
14
+registration:
15
+  display:              Créer un nouveau compte
16
+  
17
+login:
18
+  display:              J'ai déjà un compte
19
+  
20
+title:
21
+  hello:                Découvrez et partagez la musique !

+ 12 - 4
src/Muzich/IndexBundle/Resources/views/Index/index.html.twig View File

@@ -1,17 +1,25 @@
1 1
 {% extends "MuzichIndexBundle::layout.html.twig" %}
2 2
 
3
-{% block title %}Découvrez et partagez{% endblock %}
3
+{% block title %}{{ 'title.hello'|trans({}, 'navigationui') }}{% endblock %}
4 4
 
5 5
 {% block content %}
6 6
     
7 7
   <div class="hello">
8 8
 
9
-    <div class="login_box">
9
+    <div id="login_box">
10 10
       {% include "MuzichUserBundle:Security:login.html.twig" %}
11 11
         
12
-      <br /><br />
13
-      
12
+      <a href="#" id="registration_link">
13
+        {{ 'registration.display'|trans({}, 'navigationui') }} >>
14
+      </a>
15
+    </div>
16
+    
17
+    <div id="registration_box" style="display: none;">
14 18
       {% include "MuzichUserBundle:Registration:register.html.twig" %}
19
+        
20
+      <a href="#" id="login_link">
21
+        {{ 'login.display'|trans({}, 'navigationui') }} >>
22
+      </a>
15 23
     </div>
16 24
     
17 25
   </div>

+ 8 - 2
web/bundles/muzichindex/css/index.css View File

@@ -6,7 +6,7 @@
6 6
   padding: 30px;
7 7
 }
8 8
 
9
-.hello .login_box
9
+.hello #login_box, .hello #registration_box
10 10
 {
11 11
   width: 525px;
12 12
   margin-left: auto;
@@ -15,7 +15,13 @@
15 15
   padding: 20px;
16 16
 }
17 17
 
18
-.login_box input[id="username"], .login_box input[id="password"]
18
+#login_box input[id="username"], #login_box input[id="password"]
19 19
 {
20 20
   width: 100px;
21 21
 }
22
+
23
+#registration_link, #login_link
24
+{
25
+  float: right;
26
+  font-size: 120%;
27
+}

+ 14 - 0
web/bundles/muzichindex/js/index.js View File

@@ -0,0 +1,14 @@
1
+$(document).ready(function(){
2
+   
3
+   $('#registration_link').click(function(){
4
+     $('#registration_box').slideDown("slow");
5
+     $('#login_box').slideUp("slow");
6
+   });
7
+   
8
+   $('#login_link').click(function(){
9
+     $('#login_box').slideDown("slow");
10
+     $('#registration_box').slideUp("slow");
11
+   });
12
+   
13
+   
14
+ });