瀏覽代碼

added version info

Fabien Potencier 14 年之前
父節點
當前提交
58bad7fc03

+ 17 - 15
Controller/ConfiguratorController.php

@@ -47,8 +47,12 @@ class ConfiguratorController extends ContainerAware
             return new RedirectResponse($this->container->get('router')->generate('_configurator_final'));
             return new RedirectResponse($this->container->get('router')->generate('_configurator_final'));
         }
         }
 
 
-        return $this->container->get('templating')->renderResponse($step->getTemplate(),
-            array('form' => $form, 'index' => $index, 'count' => $configurator->getStepCount()));
+        return $this->container->get('templating')->renderResponse($step->getTemplate(), array(
+            'form'    => $form,
+            'index'   => $index,
+            'count'   => $configurator->getStepCount(),
+            'version' => file_get_contents($this->container->getParameter('kernel.root_dir').'/../VERSION'),
+        ));
     }
     }
 
 
     public function checkAction()
     public function checkAction()
@@ -77,13 +81,12 @@ class ConfiguratorController extends ContainerAware
             return new RedirectResponse($url);
             return new RedirectResponse($url);
         }
         }
 
 
-        return $this->container->get('templating')->renderResponse('SymfonyWebConfiguratorBundle::check.html.twig',
-            array(
-                'majors' => $majors,
-                'minors' => $minors,
-                'url'    => $url,
-            )
-        );
+        return $this->container->get('templating')->renderResponse('SymfonyWebConfiguratorBundle::check.html.twig', array(
+            'majors' => $majors,
+            'minors' => $minors,
+            'url'    => $url,
+            'version' => file_get_contents($this->container->getParameter('kernel.root_dir').'/../VERSION'),
+        ));
     }
     }
 
 
     public function finalAction()
     public function finalAction()
@@ -91,11 +94,10 @@ class ConfiguratorController extends ContainerAware
         $configurator = $this->container->get('symfony.webconfigurator');
         $configurator = $this->container->get('symfony.webconfigurator');
         $configurator->clean();
         $configurator->clean();
 
 
-        return $this->container->get('templating')->renderResponse('SymfonyWebConfiguratorBundle::final.html.twig',
-            array(
-                'parameters'  => $configurator->render(),
-                'is_writable' => $configurator->isFileWritable(),
-            )
-        );
+        return $this->container->get('templating')->renderResponse('SymfonyWebConfiguratorBundle::final.html.twig', array(
+            'parameters'  => $configurator->render(),
+            'is_writable' => $configurator->isFileWritable(),
+            'version' => file_get_contents($this->container->getParameter('kernel.root_dir').'/../VERSION'),
+        ));
     }
     }
 }
 }

+ 8 - 1
Resources/public/css/configure.css

@@ -244,7 +244,7 @@ strong
     -moz-border-radius:         16px;
     -moz-border-radius:         16px;
     -webkit-border-radius:      16px;
     -webkit-border-radius:      16px;
     border-radius:              16px;
     border-radius:              16px;
-    margin-bottom:              20px;
+    margin-bottom:              5px;
 }
 }
 
 
 #symfony-search
 #symfony-search
@@ -420,3 +420,10 @@ h1
     width:  100%;
     width:  100%;
     height: 240px;
     height: 240px;
 }
 }
+
+.version
+{
+    text-align: right;
+    font-size: 10px;
+    margin-right: 20px;
+}

+ 9 - 2
Resources/public/css/install.css

@@ -244,7 +244,7 @@ strong
     -moz-border-radius:         16px;
     -moz-border-radius:         16px;
     -webkit-border-radius:      16px;
     -webkit-border-radius:      16px;
     border-radius:              16px;
     border-radius:              16px;
-    margin-bottom:              20px;
+    margin-bottom:              5px;
 }
 }
 
 
 #symfony-search
 #symfony-search
@@ -364,4 +364,11 @@ input[type=text]
 .symfony-install-continue li
 .symfony-install-continue li
 {
 {
     padding-bottom: 10px;
     padding-bottom: 10px;
-}
+}
+
+.version
+{
+    text-align: right;
+    font-size: 10px;
+    margin-right: 20px;
+}

+ 1 - 0
Resources/views/layout.html.twig

@@ -14,6 +14,7 @@
             <div id="symfony-content">
             <div id="symfony-content">
                 {% block content %}{% endblock %}
                 {% block content %}{% endblock %}
             </div>
             </div>
+            <div class="version">Symfony Standard Edition v.{{ version }}</div>
         </div>
         </div>
     </body>
     </body>
 </html>
 </html>