Browse Source

Evolution #554: Design

Bastien Sevajol 12 years ago
parent
commit
c3ee7ab4d5

+ 4 - 0
app/Resources/translations/userui.fr.yml View File

@@ -26,7 +26,9 @@ my_account:
26 26
   email:            Adresse email
27 27
   favorite_tags:    Vos tags préférés
28 28
   change_password:  Changer mon mot de passe
29
+  change_password_submit: Mettre à jour mon mot de passe
29 30
   change_email:     Changer mon adresse email
31
+  change_email_submit: Mettre à jour mon email
30 32
   address:
31 33
     title:          Mon adresse
32 34
     description:    Avec votre adresse Muzi.ch pourra vous avertir plus aisément des événements à venirs dans votre région.
@@ -37,6 +39,8 @@ my_account:
37 39
       errors:
38 40
         notown:     Veuillez saisir la ville
39 41
         nocountry:  Veuillez saisir le pays
42
+  help_clicks:      |
43
+                    Cliquez sur les titres ci-dessous pour accèder aux autres paramètres
40 44
   
41 45
 connexion:
42 46
   password_lost:    Mot de passe perdu ?

+ 3 - 3
src/Muzich/UserBundle/Resources/views/Security/change_password_form.html.twig View File

@@ -13,19 +13,19 @@
13 13
   <div class="field">
14 14
     {{ form_errors(form.current) }}
15 15
     {{ form_label(form.current, 'password.actual'|trans({}, 'userform')) }}
16
-    {{ form_widget(form.current) }}
16
+    {{ form_widget(form.current, {'attr':{'class':'niceinput'}}) }}
17 17
   </div>
18 18
 
19 19
   <div class="field">
20 20
     {{ form_errors(form.new.first) }}
21 21
     {{ form_label(form.new.first, 'password.new.first'|trans({}, 'userform')) }}
22
-    {{ form_widget(form.new.first) }}
22
+    {{ form_widget(form.new.first, {'attr':{'class':'niceinput'}}) }}
23 23
   </div>
24 24
 
25 25
   <div class="field">
26 26
     {{ form_errors(form.new.second) }}
27 27
     {{ form_label(form.new.second, 'password.new.second'|trans({}, 'userform')) }}
28
-    {{ form_widget(form.new.second) }}
28
+    {{ form_widget(form.new.second, {'attr':{'class':'niceinput'}}) }}
29 29
   </div>
30 30
 
31 31
 {{ form_rest(form) }}

+ 62 - 52
src/Muzich/UserBundle/Resources/views/User/account.html.twig View File

@@ -5,61 +5,71 @@
5 5
 
6 6
 {% block content %}
7 7
 
8
-  <h2>{{ 'my_account.title'|trans({}, 'userui') }}</h2>
8
+<div id="myaccount">
9 9
   
10
-  <ul>
11
-    <li>
12
-      <b>{{ 'my_account.username'|trans({}, 'userui') }}</b>: {{ user.name }}
13
-    </li>
14
-    <li>
15
-      <b>{{ 'my_account.email'|trans({}, 'userui') }}</b>: {{ user.email }}
16
-    </li>
17
-  </ul>
18
-  
19
-  <h3>{{ 'my_account.favorite_tags'|trans({}, 'userui') }}</h3>
20
-  
21
-  {% include "MuzichCoreBundle:Tag:tagFavoritesForm.html.twig" with { 
22
-    'form'             : form_tags_favorites,
23
-    'redirect'         : 'account',
24
-    'form_name'        : form_tags_favorites_name,
25
-    'favorite_tags_id' : favorite_tags_id
26
-  } %}
27
-  
28
-  <h3>{{ 'my_account.change_password'|trans({}, 'userui') }}</h3>
29
-  
30
-  <form action="{{ path('change_password') }}" method="post" {{ form_enctype(form_password) }}>
31
-    
32
-    {% include "MuzichUserBundle:Security:change_password_form.html.twig" with { 
33
-      'form': form_password
34
-    } %}
10
+    <h1>{{ 'my_account.title'|trans({}, 'userui') }}</h1>
35 11
 
36
-    <input type="submit" class="button" />
37
-  </form>
38
-  
39
-  <h3>{{ 'my_account.change_email'|trans({}, 'userui') }}</h3>
40
-  
41
-  <form action="{{ path('change_email_request') }}" method="post" {{ form_enctype(change_email_form) }}>
12
+    <ul>
13
+      <li>
14
+        <b>{{ 'my_account.username'|trans({}, 'userui') }}</b>: {{ user.name }}
15
+      </li>
16
+      <li>
17
+        <b>{{ 'my_account.email'|trans({}, 'userui') }}</b>: {{ user.email }}
18
+      </li>
19
+    </ul>
20
+
21
+    <form id="address_update" action="{{ path('update_address', {"token":app.user.getPersonalHash}) }}" method="post">
22
+      <p>
23
+        {{ 'my_account.address.form.ilivenear'|trans({}, 'userui') }}
24
+        <input type="text" name="town" class="intext" value="{{ app.user.town }}" />
25
+        {{ 'my_account.address.form.in'|trans({}, 'userui') }}
26
+        <input type="text" name="country" class="intext" value="{{ app.user.country }}" />
27
+        <input type="submit" value="{{ 'my_account.address.form.submit'|trans({}, 'userui') }}" class="button address_submit" />
28
+        <img class="loader" style="display: none;" src="{{ asset('/bundles/muzichcore/img/ajax-loader.gif') }}" alt="loading"/>
29
+      </p>
30
+    </form>
42 31
     
43
-    {% include "MuzichUserBundle:User:change_email_form.html.twig" with { 
44
-      'form': change_email_form
45
-    } %}
32
+    <p class="help">
33
+      {{ 'my_account.help_clicks'|trans({}, 'userui') }}
34
+    </p>
46 35
 
47
-    <input type="submit" class="button" />
48
-  </form>
49
-  
50
-  <h3>{{ 'my_account.address.title'|trans({}, 'userui') }}</h3>
51
-  
52
-  <p>{{ 'my_account.address.description'|trans({}, 'userui') }}</p>
36
+    <h2 data-open="myaccount_favorites_tags">{{ 'my_account.favorite_tags'|trans({}, 'userui') }}</h2>
37
+
38
+    <div id="myaccount_favorites_tags" class="myaccount_part" style="display: none;">
39
+      {% include "MuzichCoreBundle:Tag:tagFavoritesForm.html.twig" with { 
40
+        'form'             : form_tags_favorites,
41
+        'redirect'         : 'account',
42
+        'form_name'        : form_tags_favorites_name,
43
+        'favorite_tags_id' : favorite_tags_id
44
+      } %}
45
+    </div>
46
+
47
+    <h2 data-open="myaccount_favorites_password">{{ 'my_account.change_password'|trans({}, 'userui') }}</h2>
48
+
49
+    <div id="myaccount_favorites_password" class="myaccount_part" style="display: none;">
50
+      <form class="nicelabels changepassword" action="{{ path('change_password') }}" method="post" {{ form_enctype(form_password) }}>
51
+
52
+        {% include "MuzichUserBundle:Security:change_password_form.html.twig" with { 
53
+          'form': form_password
54
+        } %}
55
+
56
+        <input type="submit" class="button" value="{{ 'my_account.change_password_submit'|trans({}, 'userui') }}" />
57
+      </form>
58
+    </div>
59
+
60
+    <h2 data-open="myaccount_favorites_email">{{ 'my_account.change_email'|trans({}, 'userui') }}</h2>
61
+
62
+    <div id="myaccount_favorites_email" class="myaccount_part" style="display: none;">
63
+      <form class="nicelabels changeemail" action="{{ path('change_email_request') }}" method="post" {{ form_enctype(change_email_form) }}>
64
+
65
+        {% include "MuzichUserBundle:User:change_email_form.html.twig" with { 
66
+          'form': change_email_form
67
+        } %}
68
+
69
+        <input type="submit" class="button" value="{{ 'my_account.change_email_submit'|trans({}, 'userui') }}" />
70
+      </form>
71
+    </div>
72
+    <div style="clear:both;"></div>
53 73
   
54
-  <form id="address_update" action="{{ path('update_address', {"token":app.user.getPersonalHash}) }}" method="post">
55
-    <p>
56
-      {{ 'my_account.address.form.ilivenear'|trans({}, 'userui') }}
57
-      <input type="text" name="town" class="intext" value="{{ app.user.town }}" />
58
-      {{ 'my_account.address.form.in'|trans({}, 'userui') }}
59
-      <input type="text" name="country" class="intext" value="{{ app.user.country }}" />
60
-      <input type="submit" value="{{ 'my_account.address.form.submit'|trans({}, 'userui') }}" class="button address_submit" />
61
-      <img class="loader" style="display: none;" src="{{ asset('/bundles/muzichcore/img/ajax-loader.gif') }}" alt="loading"/>
62
-    </p>
63
-  </form>
64
-    
74
+  </div>
65 75
 {% endblock %}

+ 1 - 1
src/Muzich/UserBundle/Resources/views/User/change_email_form.html.twig View File

@@ -4,6 +4,6 @@
4 4
     
5 5
   {{ form_errors(form.email) }}
6 6
   {{ form_label(form.email) }}
7
-  {{ form_widget(form.email) }}
7
+  {{ form_widget(form.email, {'attr':{'class':'niceinput'}}) }}
8 8
 
9 9
 {{ form_rest(form) }}

+ 7 - 0
web/bundles/muzichcore/js/muzich.js View File

@@ -2467,6 +2467,13 @@ $(document).ready(function(){
2467 2467
       $(this).css('height', '283px');
2468 2468
     }
2469 2469
   });
2470
+  
2471
+  /* Sous menus page mon compte (myaccount) */
2472
+  $('div#myaccount h2').click(function(){
2473
+    $('div#myaccount div.myaccount_part:visible').slideUp();
2474
+    console.log($(this).data('open'));
2475
+    $('div#'+$(this).data('open')).slideDown();
2476
+  });
2470 2477
 
2471 2478
 });
2472 2479
 

+ 57 - 0
web/css/main.css View File

@@ -1545,4 +1545,61 @@ div#add_url_title, div.element_title
1545 1545
   background: -ms-linear-gradient(top,  #f6282d 0%,#f6282d 0%,#c50617 100%,#c50617 100%); /* IE10+ */
1546 1546
   background: linear-gradient(to bottom,  #f6282d 0%,#f6282d 0%,#c50617 100%,#c50617 100%); /* W3C */
1547 1547
   filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f6282d', endColorstr='#c50617',GradientType=0 ); /* IE6-8 */
1548
+}
1549
+
1550
+div#tags_prompt_tag_favorites_form input.tag_prompt
1551
+{
1552
+  width: 95%;
1553
+}
1554
+
1555
+form[name="tag_favorites_form"] input.button
1556
+{
1557
+  float: right;
1558
+  margin-right: 11px;
1559
+  margin-top: 5px;
1560
+}
1561
+
1562
+form.changepassword label
1563
+{
1564
+  width: 210px;
1565
+}
1566
+
1567
+form.changepassword input[type="password"]
1568
+{
1569
+  margin-bottom: 2px;
1570
+  width: 388px;
1571
+}
1572
+
1573
+form.changepassword input[type="submit"]
1574
+{
1575
+  float: right;
1576
+  margin-top: 5px;
1577
+  margin-right: 7px;
1578
+}
1579
+
1580
+form.changeemail label
1581
+{
1582
+  width: 210px;
1583
+}
1584
+
1585
+form.changeemail input[type="text"]
1586
+{
1587
+  width: 388px;
1588
+}
1589
+
1590
+form.changeemail input[type="submit"]
1591
+{
1592
+  float: right;
1593
+  margin-top: 5px;
1594
+  margin-right: 7px;
1595
+}
1596
+
1597
+div#myaccount h2
1598
+{
1599
+  cursor: pointer;
1600
+}
1601
+
1602
+div#myaccount h2:hover
1603
+{
1604
+  text-decoration: underline;
1548 1605
 }