Browse Source

Added some missing asset() calls in the templates

This makes these assets work also when the site is not at the root of the
domain (when developing without createing a dedicated virtual host).
Christophe Coevoet 12 years ago
parent
commit
25779a6532
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/Packagist/WebBundle/Resources/views/layout.html.twig

+ 2 - 2
src/Packagist/WebBundle/Resources/views/layout.html.twig

@@ -27,7 +27,7 @@
             <link rel="stylesheet" href="{{ asset_url }}" />
             <link rel="stylesheet" href="{{ asset_url }}" />
         {% endstylesheets %} #}
         {% endstylesheets %} #}
 
 
-        <script src="/js/libs/modernizr-1.7.min.js"></script>
+        <script src="{{ asset('js/libs/modernizr-1.7.min.js') }}"></script>
     </head>
     </head>
     <body>
     <body>
         <div class="container">
         <div class="container">
@@ -99,7 +99,7 @@
         </footer>
         </footer>
 
 
         <script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
         <script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
-        <script>!window.jQuery && document.write(unescape('%3Cscript src="/js/libs/jquery-1.5.2.min.js"%3E%3C/script%3E'))</script>
+        <script>!window.jQuery && document.write(unescape('%3Cscript src="{{ asset('js/libs/jquery-1.5.2.min.js') }}"%3E%3C/script%3E'))</script>
         <script src="{{ asset('js/libs/humane.min.js') }}"></script>
         <script src="{{ asset('js/libs/humane.min.js') }}"></script>
         <script src="{{ asset('bundles/packagistweb/js/layout.js') }}"></script>
         <script src="{{ asset('bundles/packagistweb/js/layout.js') }}"></script>
         <script src="{{ asset('bundles/packagistweb/js/search.js')}}"></script>
         <script src="{{ asset('bundles/packagistweb/js/search.js')}}"></script>