ソースを参照

Merge pull request #1030 from ivan1986/fix-1004

this commit fixes #1004
Thomas 12 年 前
コミット
0f5920c72c

+ 3 - 0
Controller/CRUDController.php

@@ -318,6 +318,9 @@ class CRUDController extends Controller
         if ($this->get('request')->get('btn_update_and_list')) {
             $url = $this->admin->generateUrl('list');
         }
+        if ($this->get('request')->get('btn_create_and_list')) {
+            $url = $this->admin->generateUrl('list');
+        }
 
         if ($this->get('request')->get('btn_create_and_create')) {
             $params = array();

+ 4 - 0
Resources/translations/SonataAdminBundle.bg.xliff

@@ -22,6 +22,10 @@
                 <source>btn_create_and_create_a_new_one</source>
                 <target>Създай и добави нов</target>
             </trans-unit>
+            <trans-unit id="btn_create_and_return_to_list">
+                <source>btn_create_and_return_to_list</source>
+                <target>Create and return to list</target>
+            </trans-unit>
             <trans-unit id="btn_filter">
                 <source>btn_filter</source>
                 <target>Филтър</target>

+ 4 - 0
Resources/translations/SonataAdminBundle.ca.xliff

@@ -22,6 +22,10 @@
                 <source>btn_create_and_create_a_new_one</source>
                 <target>Crea i afegeix-ne un altre</target>
             </trans-unit>
+            <trans-unit id="btn_create_and_return_to_list">
+                <source>btn_create_and_return_to_list</source>
+                <target>Create and return to list</target>
+            </trans-unit>
             <trans-unit id="btn_filter">
                 <source>btn_filter</source>
                 <target>Filtra</target>

+ 4 - 0
Resources/translations/SonataAdminBundle.cs.xliff

@@ -22,6 +22,10 @@
                 <source>btn_create_and_create_a_new_one</source>
                 <target>Vytvořit a přidat další</target>
             </trans-unit>
+            <trans-unit id="btn_create_and_return_to_list">
+                <source>btn_create_and_return_to_list</source>
+                <target>Create and return to list</target>
+            </trans-unit>
             <trans-unit id="btn_filter">
                 <source>btn_filter</source>
                 <target>Filtrovat</target>

+ 4 - 0
Resources/translations/SonataAdminBundle.de.xliff

@@ -22,6 +22,10 @@
                 <source>btn_create_and_create_a_new_one</source>
                 <target>Hinzufügen und neu</target>
             </trans-unit>
+            <trans-unit id="btn_create_and_return_to_list">
+                <source>btn_create_and_return_to_list</source>
+                <target>Create and return to list</target>
+            </trans-unit>
             <trans-unit id="btn_filter">
                 <source>btn_filter</source>
                 <target>Filtern</target>

+ 4 - 0
Resources/translations/SonataAdminBundle.en.xliff

@@ -22,6 +22,10 @@
                 <source>btn_create_and_create_a_new_one</source>
                 <target>Create and add another</target>
             </trans-unit>
+            <trans-unit id="btn_create_and_return_to_list">
+                <source>btn_create_and_return_to_list</source>
+                <target>Create and return to list</target>
+            </trans-unit>
             <trans-unit id="btn_filter">
                 <source>btn_filter</source>
                 <target>Filter</target>

+ 4 - 0
Resources/translations/SonataAdminBundle.es.xliff

@@ -22,6 +22,10 @@
                 <source>btn_create_and_create_a_new_one</source>
                 <target>Crear y agregar otro</target>
             </trans-unit>
+            <trans-unit id="btn_create_and_return_to_list">
+                <source>btn_create_and_return_to_list</source>
+                <target>Create and return to list</target>
+            </trans-unit>
             <trans-unit id="btn_filter">
                 <source>btn_filter</source>
                 <target>Filtrar</target>

+ 4 - 0
Resources/translations/SonataAdminBundle.fr.xliff

@@ -22,6 +22,10 @@
                 <source>btn_create_and_create_a_new_one</source>
                 <target>Créer et ajouter</target>
             </trans-unit>
+            <trans-unit id="btn_create_and_return_to_list">
+                <source>btn_create_and_return_to_list</source>
+                <target>Create and return to list</target>
+            </trans-unit>
             <trans-unit id="btn_filter">
                 <source>btn_filter</source>
                 <target>Filtrer</target>

+ 4 - 0
Resources/translations/SonataAdminBundle.hr.xliff

@@ -22,6 +22,10 @@
                 <source>btn_create_and_create_a_new_one</source>
                 <target>Spremi i dodaj još jedan</target>
             </trans-unit>
+            <trans-unit id="btn_create_and_return_to_list">
+                <source>btn_create_and_return_to_list</source>
+                <target>Create and return to list</target>
+            </trans-unit>
             <trans-unit id="btn_filter">
                 <source>btn_filter</source>
                 <target>Filtriraj</target>

+ 4 - 0
Resources/translations/SonataAdminBundle.hu.xliff

@@ -22,6 +22,10 @@
                 <source>btn_create_and_create_a_new_one</source>
                 <target>Elkészít és hozzáad</target>
             </trans-unit>
+            <trans-unit id="btn_create_and_return_to_list">
+                <source>btn_create_and_return_to_list</source>
+                <target>Create and return to list</target>
+            </trans-unit>
             <trans-unit id="btn_filter">
                 <source>btn_filter</source>
                 <target>Filter</target>

+ 4 - 0
Resources/translations/SonataAdminBundle.it.xliff

@@ -22,6 +22,10 @@
                 <source>btn_create_and_create_a_new_one</source>
                 <target>Crea e aggiungi</target>
             </trans-unit>
+            <trans-unit id="btn_create_and_return_to_list">
+                <source>btn_create_and_return_to_list</source>
+                <target>Create and return to list</target>
+            </trans-unit>
             <trans-unit id="btn_filter">
                 <source>btn_filter</source>
                 <target>Filtra</target>

+ 4 - 0
Resources/translations/SonataAdminBundle.ja.xliff

@@ -22,6 +22,10 @@
                 <source>btn_create_and_create_a_new_one</source>
                 <target>作成して次へ</target>
             </trans-unit>
+            <trans-unit id="btn_create_and_return_to_list">
+                <source>btn_create_and_return_to_list</source>
+                <target>Create and return to list</target>
+            </trans-unit>
             <trans-unit id="btn_filter">
                 <source>btn_filter</source>
                 <target>絞り込み</target>

+ 4 - 0
Resources/translations/SonataAdminBundle.lb.xliff

@@ -22,6 +22,10 @@
                 <source>btn_create_and_create_a_new_one</source>
                 <target>Dobäisetzen an nei creéieren</target>
             </trans-unit>
+            <trans-unit id="btn_create_and_return_to_list">
+                <source>btn_create_and_return_to_list</source>
+                <target>Create and return to list</target>
+            </trans-unit>
             <trans-unit id="btn_filter">
                 <source>btn_filter</source>
                 <target>Filteren</target>

+ 4 - 0
Resources/translations/SonataAdminBundle.nl.xliff

@@ -22,6 +22,10 @@
                 <source>btn_create_and_create_a_new_one</source>
                 <target>Aanmaken en nieuwe toevoegen</target>
             </trans-unit>
+            <trans-unit id="btn_create_and_return_to_list">
+                <source>btn_create_and_return_to_list</source>
+                <target>Create and return to list</target>
+            </trans-unit>
             <trans-unit id="btn_filter">
                 <source>btn_filter</source>
                 <target>Filter</target>

+ 4 - 0
Resources/translations/SonataAdminBundle.pl.xliff

@@ -22,6 +22,10 @@
                 <source>btn_create_and_create_a_new_one</source>
                 <target>Zapisz i dodaj kolejny</target>
             </trans-unit>
+            <trans-unit id="btn_create_and_return_to_list">
+                <source>btn_create_and_return_to_list</source>
+                <target>Create and return to list</target>
+            </trans-unit>
             <trans-unit id="btn_filter">
                 <source>btn_filter</source>
                 <target>Filtruj</target>

+ 4 - 0
Resources/translations/SonataAdminBundle.pt.xliff

@@ -22,6 +22,10 @@
                 <source>btn_create_and_create_a_new_one</source>
                 <target>Criar e adicionar outro</target>
             </trans-unit>
+            <trans-unit id="btn_create_and_return_to_list">
+                <source>btn_create_and_return_to_list</source>
+                <target>Create and return to list</target>
+            </trans-unit>
             <trans-unit id="btn_filter">
                 <source>btn_filter</source>
                 <target>Filtrar</target>

+ 4 - 0
Resources/translations/SonataAdminBundle.pt_BR.xliff

@@ -22,6 +22,10 @@
                 <source>btn_create_and_create_a_new_one</source>
                 <target>Criar e adicionar novo</target>
             </trans-unit>
+            <trans-unit id="btn_create_and_return_to_list">
+                <source>btn_create_and_return_to_list</source>
+                <target>Create and return to list</target>
+            </trans-unit>
             <trans-unit id="btn_filter">
                 <source>btn_filter</source>
                 <target>Filtrar</target>

+ 4 - 0
Resources/translations/SonataAdminBundle.ru.xliff

@@ -22,6 +22,10 @@
                 <source>btn_create_and_create_a_new_one</source>
                 <target>Создать и добавить новый</target>
             </trans-unit>
+            <trans-unit id="btn_create_and_return_to_list">
+                <source>btn_create_and_return_to_list</source>
+                <target>Создать и вернуться к списку</target>
+            </trans-unit>
             <trans-unit id="btn_filter">
                 <source>btn_filter</source>
                 <target>Фильтровать</target>

+ 4 - 0
Resources/translations/SonataAdminBundle.sk.xliff

@@ -22,6 +22,10 @@
                 <source>btn_create_and_create_a_new_one</source>
                 <target>Vytvoriť a pridať ďalší</target>
             </trans-unit>
+            <trans-unit id="btn_create_and_return_to_list">
+                <source>btn_create_and_return_to_list</source>
+                <target>Create and return to list</target>
+            </trans-unit>
             <trans-unit id="btn_filter">
                 <source>btn_filter</source>
                 <target>Filter</target>

+ 4 - 0
Resources/translations/SonataAdminBundle.sl.xliff

@@ -22,6 +22,10 @@
                 <source>btn_create_and_create_a_new_one</source>
                 <target>Ustvari in dodaj nov predmet</target>
             </trans-unit>
+            <trans-unit id="btn_create_and_return_to_list">
+                <source>btn_create_and_return_to_list</source>
+                <target>Create and return to list</target>
+            </trans-unit>
             <trans-unit id="btn_filter">
                 <source>btn_filter</source>
                 <target>Prikaži</target>

+ 4 - 0
Resources/translations/SonataAdminBundle.uk.xliff

@@ -22,6 +22,10 @@
                 <source>btn_create_and_create_a_new_one</source>
                 <target>Створити й додати новий</target>
             </trans-unit>
+            <trans-unit id="btn_create_and_return_to_list">
+                <source>btn_create_and_return_to_list</source>
+                <target>Створити й повернутись до списку</target>
+            </trans-unit>
             <trans-unit id="btn_filter">
                 <source>btn_filter</source>
                 <target>Фільтрувати</target>

+ 1 - 0
Resources/views/CRUD/base_edit_form.html.twig

@@ -61,6 +61,7 @@
                             {% endif %}
                         {% else %}
                             <input class="btn btn-primary" type="submit" name="btn_create_and_edit" value="{{ 'btn_create_and_edit_again'|trans({}, 'SonataAdminBundle') }}"/>
+                            <input type="submit" class="btn" name="btn_create_and_list" value="{{ 'btn_create_and_return_to_list'|trans({}, 'SonataAdminBundle') }}"/>
                             <input class="btn" type="submit" name="btn_create_and_create" value="{{ 'btn_create_and_create_a_new_one'|trans({}, 'SonataAdminBundle') }}"/>
                         {% endif %}
                     {% endif %}