Quellcode durchsuchen

Anomalie #718: Page d'eereur: liens non connecté

Sevajol Bastien vor 11 Jahren
Ursprung
Commit
671d03319e

+ 1 - 1
app/Resources/TwigBundle/views/Exception/error.html.twig Datei anzeigen

@@ -1,4 +1,4 @@
1
-{% extends 'MuzichCoreBundle::layout.html.twig' %}
1
+{% extends 'MuzichCoreBundle::layout_error.html.twig' %}
2 2
 
3 3
 {% block title %}{{ 'error_page.error.title'|trans({}, 'navigationui') }}{% endblock %}
4 4
 {% block mainbox_classes %}mainbox_padding{% endblock %}

+ 1 - 1
app/Resources/TwigBundle/views/Exception/error403.html.twig Datei anzeigen

@@ -1,4 +1,4 @@
1
-{% extends 'MuzichCoreBundle::layout.html.twig' %}
1
+{% extends 'MuzichCoreBundle::layout_error.html.twig' %}
2 2
 
3 3
 {% block title %}{{ 'error_page.forbidden.title'|trans({}, 'navigationui') }}{% endblock %}
4 4
 {% block mainbox_classes %}mainbox_padding{% endblock %}

+ 1 - 1
app/Resources/TwigBundle/views/Exception/error404.html.twig Datei anzeigen

@@ -1,4 +1,4 @@
1
-{% extends 'MuzichCoreBundle::layout.html.twig' %}
1
+{% extends 'MuzichCoreBundle::layout_error.html.twig' %}
2 2
 
3 3
 {% block title %}{{ 'error_page.notfound.title'|trans({}, 'navigationui') }}{% endblock %}
4 4
 {% block mainbox_classes %}mainbox_padding{% endblock %}

+ 1 - 1
src/Muzich/CoreBundle/Controller/InfoController.php Datei anzeigen

@@ -72,7 +72,7 @@ class InfoController extends Controller
72 72
   
73 73
   public function testErrorAction($code)
74 74
   {
75
-    if (!is_numeric($code))
75
+    if (!in_array($code, array('404', '403', '')))
76 76
     {
77 77
       throw new HttpException(404);
78 78
     }

+ 1 - 1
src/Muzich/CoreBundle/Resources/config/routing.yml Datei anzeigen

@@ -88,7 +88,7 @@ info_cgu:
88 88
   
89 89
 test_errors:
90 90
   pattern: /info/test-error/{code}
91
-  defaults: { _controller: MuzichCoreBundle:Info:testError }
91
+  defaults: { _controller: MuzichCoreBundle:Info:testError, code: null }
92 92
   
93 93
 ### helper
94 94
 

+ 11 - 0
src/Muzich/CoreBundle/Resources/views/Layout/header_error.html.twig Datei anzeigen

@@ -0,0 +1,11 @@
1
+<div id="hgroup">
2
+  
3
+  {% include "MuzichCoreBundle:Language:languages.html.twig" %}
4
+  
5
+  <a id="header_logo" href="{{ path('home') }}" title="">
6
+    <img src="{{ asset('img/header_logo.png') }}" alt="logo" />
7
+  </a>
8
+  
9
+  {% include 'MuzichCoreBundle:Menu:main_menu_minimal.html.twig' %}
10
+  
11
+</div>

+ 14 - 9
src/Muzich/CoreBundle/Resources/views/Layout/side.html.twig Datei anzeigen

@@ -1,6 +1,9 @@
1 1
 {% if display_launch_demo is not defined %}
2 2
   {% set display_launch_demo = false %}
3 3
 {% endif %}
4
+{% if display_help is not defined %}
5
+  {% set display_help = true %}
6
+{% endif %}
4 7
 
5 8
 {% if app.user %}
6 9
   
@@ -22,16 +25,18 @@
22 25
 
23 26
   <div class="side_margin_top"></div>
24 27
   
25
-  <div class="center">
26
-    <a id="know_more" class="helpbox button" href="{{ path('helpbox_bootstrap', {'ressource_id':'know_more'}) }}" title="{{ 'help.know_more'|trans({}, 'navigationui') }}">
27
-      {{ 'help.know_more'|trans({}, 'navigationui') }}
28
-    </a>
29
-    {% if display_launch_demo %}
30
-      <a id="launch_tour" class="button" href="#" title="{{ 'help.maunch_tour'|trans({}, 'navigationui') }}">
31
-        {{ 'help.launch_tour'|trans({}, 'navigationui') }}
28
+  {% if display_help %}
29
+    <div class="center">
30
+      <a id="know_more" class="helpbox button" href="{{ path('helpbox_bootstrap', {'ressource_id':'know_more'}) }}" title="{{ 'help.know_more'|trans({}, 'navigationui') }}">
31
+        {{ 'help.know_more'|trans({}, 'navigationui') }}
32 32
       </a>
33
-    {% endif %}
34
-  </div>
33
+      {% if display_launch_demo %}
34
+        <a id="launch_tour" class="button" href="#" title="{{ 'help.maunch_tour'|trans({}, 'navigationui') }}">
35
+          {{ 'help.launch_tour'|trans({}, 'navigationui') }}
36
+        </a>
37
+      {% endif %}
38
+    </div>
39
+  {% endif %}
35 40
   
36 41
 {% endif %}
37 42
 

+ 11 - 0
src/Muzich/CoreBundle/Resources/views/Menu/main_menu_minimal.html.twig Datei anzeigen

@@ -0,0 +1,11 @@
1
+<ul id="header_menu">
2
+  
3
+  <li>
4
+    <a href="{{ path('home') }}" class="all_network">
5
+      {{ 'filter.network_all'|trans({}, 'userui') }}
6
+    </a>
7
+  </li
8
+  
9
+  <li class="separator"></li>
10
+  
11
+</ul>

+ 66 - 0
src/Muzich/CoreBundle/Resources/views/layout_error.html.twig Datei anzeigen

@@ -0,0 +1,66 @@
1
+<!doctype html>
2
+<html>
3
+  <head>
4
+    <title>Muzi.ch - {% block title %}{% endblock %}</title>
5
+    {% include 'MuzichCoreBundle:Layout:head.html.twig' %}
6
+    {% block css %}{% endblock %}
7
+    {% block js %}{% endblock %}
8
+  </head>
9
+  <body>
10
+    
11
+  <div id="container">
12
+  
13
+    <div id="main_content">
14
+      
15
+      <div id="header">
16
+        {% include 'MuzichCoreBundle:Layout:header_error.html.twig' %}
17
+      </div>
18
+      
19
+      <div id="content">
20
+        
21
+        <div id="main">
22
+          
23
+          <div id="mainbox" class="nicebox {% block mainbox_classes %}{% endblock %}">
24
+            {% block main_content %}{% endblock %}
25
+            {% block fos_user_content %}{% endblock %}
26
+          </div>
27
+          
28
+        </div>
29
+          
30
+        <aside id="sidebar">
31
+          {% block sidebar_top %}{% endblock %}
32
+          {% include 'MuzichCoreBundle:Layout:side.html.twig' with {'display_help' : false} %}
33
+          {% block sidebar_bottom %}{% endblock %}
34
+        </aside>
35
+          
36
+      </div>
37
+      
38
+    </div>
39
+    
40
+    <div id="footer">
41
+      {% include 'MuzichCoreBundle:Layout:footer.html.twig' %}
42
+    </div>
43
+    
44
+  </div>
45
+    
46
+    {% if  app.environment == 'prod' %} 
47
+      <!-- Piwik -->
48
+      <script type="text/javascript"> 
49
+        var _paq = _paq || [];
50
+        _paq.push(['trackPageView']);
51
+        _paq.push(['enableLinkTracking']);
52
+        (function() {
53
+          //var u=(("https:" == document.location.protocol) ? "https" : "http") + "://analytics.muzi.ch//"; # pas de certif sur analytics.muzi.ch pour le moment
54
+          var u=(("https:" == document.location.protocol) ? "http" : "http") + "://analytics.muzi.ch//";
55
+          _paq.push(['setTrackerUrl', u+'piwik.php']);
56
+          _paq.push(['setSiteId', 1]);
57
+          var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript';
58
+          g.defer=true; g.async=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
59
+        })();
60
+      
61
+      </script>
62
+      <noscript><p><img src="http://analytics.muzi.ch/piwik.php?idsite=1" style="border:0" alt="" /></p></noscript>
63
+      <!-- End Piwik Code -->
64
+    {% endif %}
65
+  </body>
66
+</html>

+ 0 - 211
src/Muzich/CoreBundle/Resources/views/layout_old.html.twig Datei anzeigen

@@ -1,211 +0,0 @@
1
-<!-- XHTML 1.0 - Transitional -->
2
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3
-	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
5
-<head>
6
-  <title>Muzi.ch - {% block title %}{% endblock %}</title>
7
-  <meta http-equiv="content-type" content="text/html;charset=utf-8" />
8
-	<meta http-equiv="Content-Style-Type" content="text/css" />
9
-	<meta name="description" content="" />
10
-	<meta name="keywords" content="" />
11
-	<meta name="author" content="" />
12
-  <link href="apple-touch-icon.png" rel="apple-touch-icon" />
13
-  
14
-	<link href="{{ asset('favicon.ico') }}" rel="icon" type="image/x-icon" />
15
-	<link href="{{ asset('bundles/muzichcore/css/base.css') }}" rel="stylesheet" media="screen" type="text/css" />
16
-	<link href="{{ asset('bundles/muzichcore/css/main.css') }}" rel="stylesheet" media="screen" type="text/css" />
17
-  {% block css %}{% endblock %}
18
-  {% if  app.environment != 'prod' %}  
19
-	<script src="{{ asset('js/jquery-1.8.2.dev.js') }}" type="text/javascript"></script>
20
-  {% else %}
21
-	<script src="{{ asset('js/jquery-1.8.2.prod.js') }}" type="text/javascript"></script>
22
-  {% endif %}
23
-  <script src="{{ asset('js/jquery-ui-1.8.7.min.js') }}" type="text/javascript"></script>
24
-  <script src="{{ asset('bundles/muzichcore/js/muzich.js') }}" type="text/javascript"></script>
25
-	
26
-  <script type="text/javascript" src="{{ asset('js/swfobject.js') }}"></script> 
27
-  {# TODO: On peux piquer les js ?  #}
28
-  <script src="http://connect.soundcloud.com/sdk.js"></script>
29
-  <script src="http://w.soundcloud.com/player/api.js"></script>
30
-       
31
-  <script src="{{ asset('bundles/muzichcore/js/autoplay.js') }}" type="text/javascript"></script>
32
-  
33
-  {# jPlayer #}
34
-  <link href="{{ asset('jplayer/skin/blue.monday/jplayer.blue.monday.css') }}" rel="stylesheet" type="text/css" />
35
-  <script type="text/javascript" src="{{ asset('jplayer/js/jquery.jplayer.min.js') }}"></script>
36
-  <script type="text/javascript" src="{{ asset('jplayer/js/jplayer.playlist.min.js') }}"></script>
37
-  
38
-  <script src="{{ asset('js/tags/jquery.autoGrowInput.js') }}" type="text/javascript"></script>
39
-  <script src="{{ asset('js/tags/jquery.tagBox.js') }}" type="text/javascript"></script>
40
-  <script src="{{ asset('js/formdefault/jquery.formdefaults.js') }}" type="text/javascript"></script>
41
-  <script src="{{ asset('js/jquery.form-2.14.js') }}" type="text/javascript"></script>
42
-  <script src="{{ asset('js/jConfirmAction/jconfirmaction.jquery.js') }}" type="text/javascript"></script>
43
-  <script type="text/javascript">
44
-    string_follow_stop = "{{ 'user.stop_follow'|trans({}, 'users') }}";
45
-    string_follow_following = "{{ 'user.following'|trans({}, 'users') }}";
46
-    string_follow_follow = "{{ 'user.follow'|trans({}, 'users') }}";
47
-    string_tag_add_title = "{{ 'tags.add.title'|trans({}, 'userui') }}";
48
-    string_tag_add_text = "{{ 'tags.add.text'|trans({}, 'userui') }}";
49
-    string_tag_add_argument = "{{ 'tags.add.argument'|trans({}, 'userui') }}";
50
-    string_tag_add_inputs_cancel = "{{ 'tags.add.inputs.cancel'|trans({}, 'userui') }}";
51
-    string_tag_add_inputs_submit = "{{ 'tags.add.inputs.submit'|trans({}, 'userui') }}";
52
-    string_element_delete_confirm_sentence = "{{ 'element.remove.confirm.sentence'|trans({}, 'elements') }}";
53
-    string_element_delete_confirm_yes = "{{ 'element.remove.confirm.yes'|trans({}, 'elements') }}";
54
-    string_element_delete_confirm_no = "{{ 'element.remove.confirm.no'|trans({}, 'elements') }}";
55
-    string_comment_delete_confirm_sentence = "{{ 'comment.remove.confirm.sentence'|trans({}, 'elements') }}";
56
-    string_comment_delete_confirm_yes = "{{ 'comment.remove.confirm.yes'|trans({}, 'elements') }}";
57
-    string_comment_delete_confirm_no = "{{ 'comment.remove.confirm.no'|trans({}, 'elements') }}";
58
-    string_tag_addtofav_confirm_sentence = "{{ 'element.tag.addtofav.confirm.sentence'|trans({}, 'elements') }}";
59
-    string_tag_addtofav_confirm_yes = "{{ 'element.tag.addtofav.confirm.yes'|trans({}, 'elements') }}";
60
-    string_tag_addtofav_confirm_no = "{{ 'element.tag.addtofav.confirm.no'|trans({}, 'elements') }}";
61
-    string_elementreport_confirm_sentence = "{{ 'element.report.confirm.sentence'|trans({}, 'userui') }}";
62
-    string_elementreport_confirm_yes = "{{ 'element.report.confirm.yes'|trans({}, 'userui') }}";
63
-    string_elementreport_confirm_no = "{{ 'element.report.confirm.no'|trans({}, 'userui') }}";
64
-    string_commentreport_confirm_sentence = "{{ 'comment.report.confirm.sentence'|trans({}, 'userui') }}";
65
-    string_commentreport_confirm_yes = "{{ 'comment.report.confirm.yes'|trans({}, 'userui') }}";
66
-    string_commentreport_confirm_no = "{{ 'comment.report.confirm.no'|trans({}, 'userui') }}";
67
-    string_elementreshare_confirm_sentence = "{{ 'element.reshare.confirm.sentence'|trans({}, 'userui') }}";
68
-    string_elementreshare_confirm_yes = "{{ 'element.reshare.confirm.yes'|trans({}, 'userui') }}";
69
-    string_elementreshare_confirm_no = "{{ 'element.reshare.confirm.no'|trans({}, 'userui') }}";
70
-    {% autoescape false %}
71
-    string_search_tag_title = "{{ 'search_tag.title'|trans({}, 'userui') }}";
72
-    {% endautoescape %}
73
-    
74
-    url_search_tag = "{{ path('search_tag') }}";
75
-    url_get_favorites_tags = "{{ path('ajax_get_favorites_tags') }}";
76
-    url_add_tag = "{{ path('ajax_add_tag') }}";
77
-    url_element_new_count = "{{ path('element_new_count') }}";
78
-    url_element_new_get = "{{ path('element_new_get') }}";
79
-    url_global_search = "{{ path('global_search') }}";
80
-    url_datas_api = "{{ path('element_retrieve_api_datas') }}";
81
-    url_element_add = "{{ path('element_add') }}";
82
-    url_element_dom_get_one_autoplay = "{{ path('element_dom_get_one', {'type':'autoplay'}) }}";
83
-    url_element_get_stream_data = "{{ path('element_get_stream_data') }}";
84
-    
85
-    url_img_ajax_loader = "{{ asset('/bundles/muzichcore/img/ajax-loader.gif') }}";
86
-  </script>
87
-  {% block js %}{% endblock %}
88
-  
89
-</head>
90
-<body>
91
-  
92
-  <div id="autoplay" class="popin_block" style="display: none;">
93
-      
94
-      <a href="javascript:void(0);" id="autoplay_previous">
95
-        <img src="{{ asset('/bundles/muzichcore/img/autoplay_previous.png') }}" alt="previous" />
96
-      </a>
97
-      
98
-	<a href="javascript:void(0);" id="autoplay_close" >
99
-	  <img src="{{ asset('/bundles/muzichcore/img/1317386146_cancel.png') }}" alt="close" />
100
-	</a>
101
-      
102
-      <a href="javascript:void(0);" id="autoplay_next">
103
-        <img src="{{ asset('/bundles/muzichcore/img/autoplay_next.png') }}" alt="next" />
104
-      </a>
105
-      
106
-    <img id="autoplay_element_loader" src="{{ asset('/bundles/muzichcore/img/ajax-loader.gif') }}" alt="loader" />
107
-    <ul id="autoplay_element"><li class="element" id="autoplay_element_container"></li></ul>
108
-    <div id="autoplay_player_container">
109
-      <div id="autoplay_player"></div>
110
-    </div>
111
-    <div id="autoplay_player_soundcloud"></div>
112
-    <div id="autoplay_player_generic" style="display: none;">
113
-      <div id="jquery_jplayer_1" class="jp-jplayer"></div>
114
-      <div id="jp_container_1" class="jp-audio">
115
-        <div class="jp-type-playlist">
116
-          <div class="jp-gui jp-interface">
117
-            <ul class="jp-controls">
118
-              <li><a href="javascript:;" class="jp-previous" tabindex="1">previous</a></li>
119
-              <li><a href="javascript:;" class="jp-play" tabindex="1">play</a></li>
120
-              <li><a href="javascript:;" class="jp-pause" tabindex="1">pause</a></li>
121
-              <li><a href="javascript:;" class="jp-next" tabindex="1">next</a></li>
122
-              <li><a href="javascript:;" class="jp-stop" tabindex="1">stop</a></li>
123
-              <li><a href="javascript:;" class="jp-mute" tabindex="1" title="mute">mute</a></li>
124
-              <li><a href="javascript:;" class="jp-unmute" tabindex="1" title="unmute">unmute</a></li>
125
-              <li><a href="javascript:;" class="jp-volume-max" tabindex="1" title="max volume">max volume</a></li>
126
-            </ul>
127
-            <div class="jp-progress">
128
-              <div class="jp-seek-bar">
129
-                <div class="jp-play-bar"></div>
130
-              </div>
131
-            </div>
132
-            <div class="jp-volume-bar">
133
-              <div class="jp-volume-bar-value"></div>
134
-            </div>
135
-            <div class="jp-time-holder">
136
-              <div class="jp-current-time"></div>
137
-              <div class="jp-duration"></div>
138
-            </div>
139
-            <ul class="jp-toggles" style="display: none;">
140
-              <li><a href="javascript:;" class="jp-shuffle" tabindex="1" title="shuffle">shuffle</a></li>
141
-              <li><a href="javascript:;" class="jp-shuffle-off" tabindex="1" title="shuffle off">shuffle off</a></li>
142
-              <li><a href="javascript:;" class="jp-repeat" tabindex="1" title="repeat">repeat</a></li>
143
-              <li><a href="javascript:;" class="jp-repeat-off" tabindex="1" title="repeat off">repeat off</a></li>
144
-            </ul>
145
-          </div>
146
-          <div class="jp-playlist">
147
-            <ul>
148
-              <li></li>
149
-            </ul>
150
-          </div>
151
-          <div class="jp-no-solution">
152
-            <span>Update Required</span>
153
-            To play the media you will need to either update your browser to a recent version or update your <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash plugin</a>.
154
-          </div>
155
-        </div>
156
-      </div>
157
-    </div>
158
-    <img id="autoplay_loader" src="{{ asset('/bundles/muzichcore/img/ajax-loader.gif') }}" alt="loader" />
159
-    <p id="autoplay_noelements_text" style="display: none;">{{ 'elements.autoplay.noelements.text'|trans({}, 'elements') }}</p>
160
-        
161
-    <p><span class="sinfo">{{ 'autoplay.limitations_players'|trans({}, 'userui') }}</span></p>
162
-    
163
-  </div>
164
-    
165
-  {% include "MuzichCoreBundle:Language:languages.html.twig" %}
166
-  
167
-  {% include "MuzichUserBundle:Account:topBar.html.twig" %}
168
-  
169
-  <noscript>
170
-    <div id="noscript_warning">
171
-      <p>
172
-        {{ 'noscript.message'|trans({}, 'messages') }}
173
-        <a href="{{ 'noscript.link_search'|trans({}, 'messages') }}" target="_blank">
174
-          {{ 'noscript.link_text'|trans({}, 'messages') }}
175
-        </a>
176
-      </p>
177
-    </div>
178
-  </noscript>
179
-      
180
-  <div id="container">
181
-    
182
-    {% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
183
-      {% render "MuzichUserBundle:Event:infoBar" %}
184
-    {% endif %}
185
-    
186
-    {% block main_content %}{% endblock %}
187
-    {% block fos_user_content %}{% endblock %}
188
-  </div>
189
-    
190
-  {% for key, flash in app.session.getFlashes() %}
191
-    <div class="{{ key }} message">
192
-      <a class="message-close" href="javascript:void(0);" title="fermer"><img alt="close" src="{{ asset('bundles/muzichcore/img/1317386146_cancel.png') }}" /></a>
193
-      <h3>{{ flash|trans({}, 'flash') }}</h3>
194
-    </div>
195
-  
196
-    {% if key == 'success' %}
197
-    <script type="text/javascript" >
198
-      $(document).ready(function(){
199
-        window.setTimeout(function(){
200
-          $('div.success').slideUp();
201
-        }, 3000);
202
-      });
203
-    </script>
204
-    {% endif %}
205
-  {% endfor %}
206
-  
207
-  {% include "MuzichCoreBundle:Info:container.html.twig" %}
208
-  
209
-</body>
210
-</html>
211
-