From 72dcd8d983bb33700536cd1d0913c710140edaf1 Mon Sep 17 00:00:00 2001 From: loostro Date: Tue, 17 Jun 2014 19:33:16 +0200 Subject: [PATCH 01/10] CSS fixes --- Resources/public/css/general.css | 14 ++++++++++++-- Resources/public/css/profile.css | 3 --- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Resources/public/css/general.css b/Resources/public/css/general.css index 43dcb3a1..c3873c8e 100644 --- a/Resources/public/css/general.css +++ b/Resources/public/css/general.css @@ -36,8 +36,12 @@ body { border-color: #0B6CBC; } +.navbar-blue .navbar-nav > li > .btn { + margin-top: 8px; + margin-bottom: 8px; +} + .navbar-blue .navbar-brand { - padding: 10px 20px; color: #FFFFFF; text-shadow: 0 1px 0 #777777; @@ -97,6 +101,7 @@ body { text-shadow: 0 1px 0 #777777, 0 1px 5px rgba(255, 255, 255, 0.9); } +.navbar-blue .dropdown-menu li.active > a, .navbar-blue .dropdown-menu li > a:hover, .navbar-blue .dropdown-menu li > a:focus, .navbar-blue .dropdown-submenu:hover > a { @@ -107,7 +112,12 @@ body { background-image: -o-linear-gradient(top, #438EB9, #62A8D1); background-image: linear-gradient(to bottom, #438EB9, #62A8D1); background-repeat: repeat-x; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff438EB9', endColorstr='#ff62A8D1', GradientType=0); + filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff438EB9', endColorstr='#ff62A8D1', GradientType=0); + color: white; +} + +.navbar-blue .dropdown-menu li.active > a { + font-weight: bold; } div[class^='object-actions-'],div[class*=' object-actions-'] {margin-bottom: 10px} diff --git a/Resources/public/css/profile.css b/Resources/public/css/profile.css index d891432c..62b1766a 100644 --- a/Resources/public/css/profile.css +++ b/Resources/public/css/profile.css @@ -45,9 +45,6 @@ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff438EB9', endColorstr='#ff62A8D1', GradientType=0); filter: progid:dximagetransform.microsoft.gradient(enabled=false); - - margin-top: 10px; - margin-bottom: 10px; } .btn.btn-profile:hover, From 53249b9e75763239e56ae7d9ccd65654d465889f Mon Sep 17 00:00:00 2001 From: loostro Date: Tue, 17 Jun 2014 19:37:56 +0200 Subject: [PATCH 02/10] CS fixes base_admin_navbar --- Resources/views/base_admin_navbar.html.twig | 85 ++++++++++----------- 1 file changed, 42 insertions(+), 43 deletions(-) diff --git a/Resources/views/base_admin_navbar.html.twig b/Resources/views/base_admin_navbar.html.twig index 12253525..dde978ee 100644 --- a/Resources/views/base_admin_navbar.html.twig +++ b/Resources/views/base_admin_navbar.html.twig @@ -1,51 +1,50 @@ {% block login_script_block %} From e3f0bba50ab67a52ad2740690c1bcfade62c61fe Mon Sep 17 00:00:00 2001 From: loostro Date: Tue, 17 Jun 2014 19:38:37 +0200 Subject: [PATCH 03/10] Updage menu doc --- Resources/doc/cookbook/menu.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Resources/doc/cookbook/menu.md b/Resources/doc/cookbook/menu.md index b73c771c..3a39dc3c 100644 --- a/Resources/doc/cookbook/menu.md +++ b/Resources/doc/cookbook/menu.md @@ -99,10 +99,7 @@ public function navbarMenu(FactoryInterface $factory, array $options) // create root item $menu = $factory->createItem('root'); // set id for root item, and class for nice twitter bootstrap style - $menu->setChildrenAttributes(array('id' => 'main_navigation', 'class' => 'nav')); - - // add "navbar-nav" class for Twitter Bootstrap3 theme - //$menu->setChildrenAttributes(array('id' => 'main_navigation', 'class' => 'nav navbar-nav')); + $menu->setChildrenAttributes(array('id' => 'main_navigation', 'class' => 'nav navbar-nav')); // add links $menu $this->addLinkURI($menu, 'Item1', 'http://www.google.com'); From e574b8ea506ec642d7bc2cc4c2d8e656d3630047 Mon Sep 17 00:00:00 2001 From: loostro Date: Tue, 17 Jun 2014 19:39:28 +0200 Subject: [PATCH 04/10] Fix markdown --- Resources/doc/support-and-contribution/submitting-issues.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Resources/doc/support-and-contribution/submitting-issues.md b/Resources/doc/support-and-contribution/submitting-issues.md index 414062d9..d5dd55c4 100644 --- a/Resources/doc/support-and-contribution/submitting-issues.md +++ b/Resources/doc/support-and-contribution/submitting-issues.md @@ -37,10 +37,10 @@ While writing your issue please use Github Flavored Markdown to make it more rea If you paste any code **wrap it in github's code block!** To do that start with 3 **```** characters, then name language you're useing, for example **yaml**: -> **```**yaml - +> **```yaml** +> > my.yaml_code: is here - +> > **```** will resuilt in: From 98a12e06941480b91b3ae6b52fe0f89543a417f0 Mon Sep 17 00:00:00 2001 From: loostro Date: Tue, 17 Jun 2014 20:10:35 +0200 Subject: [PATCH 05/10] Use fa icons --- Generator/Action/Batch/DeleteAction.php | 2 +- Generator/Action/Generic/ExcelAction.php | 2 +- Generator/Action/Generic/ListAction.php | 2 +- Generator/Action/Generic/NewAction.php | 2 +- Generator/Action/Generic/SaveAction.php | 2 +- Generator/Action/Generic/SaveAndAddAction.php | 2 +- .../Action/Generic/SaveAndListAction.php | 2 +- Generator/Action/Object/DeleteAction.php | 2 +- Generator/Action/Object/EditAction.php | 2 +- Generator/Action/Object/ShowAction.php | 2 +- .../FiltersBuilderTemplate.php.twig | 18 +++++----- .../ListTemplate/ListBuilderTemplate.php.twig | 33 +++++++++---------- .../ListTemplate/paginator.php.twig | 5 +-- .../CommonAdmin/ListTemplate/thead.php.twig | 30 ++++++++--------- .../NestedListTemplate/modal.php.twig | 20 +++++------ .../CommonAdmin/batch_actions.php.twig | 2 +- .../CommonAdmin/generic_actions.php.twig | 4 +-- .../CommonAdmin/object_actions.php.twig | 2 +- Resources/views/base_admin_navbar.html.twig | 10 +++--- 19 files changed, 68 insertions(+), 76 deletions(-) diff --git a/Generator/Action/Batch/DeleteAction.php b/Generator/Action/Batch/DeleteAction.php index b674d9ef..dcdbf202 100644 --- a/Generator/Action/Batch/DeleteAction.php +++ b/Generator/Action/Batch/DeleteAction.php @@ -16,7 +16,7 @@ public function __construct($name, BaseBuilder $builder) { parent::__construct($name, 'batch'); - $this->setIcon('glyphicon-remove'); + $this->setIcon('fa-times'); $this->setLabel('action.batch.delete.label'); $this->setConfirm('action.batch.delete.confirm'); $this->setCsrfProtected(true); diff --git a/Generator/Action/Generic/ExcelAction.php b/Generator/Action/Generic/ExcelAction.php index c6c46440..c6ff520e 100644 --- a/Generator/Action/Generic/ExcelAction.php +++ b/Generator/Action/Generic/ExcelAction.php @@ -18,7 +18,7 @@ public function __construct($name, BaseBuilder $builder) parent::__construct($name, 'generic'); $this->setClass('btn-primary'); - $this->setIcon('glyphicon-white glyphicon-print'); + $this->setIcon('fa-print'); $this->setLabel('action.generic.excel'); } } diff --git a/Generator/Action/Generic/ListAction.php b/Generator/Action/Generic/ListAction.php index fe016ad2..0315309d 100644 --- a/Generator/Action/Generic/ListAction.php +++ b/Generator/Action/Generic/ListAction.php @@ -16,7 +16,7 @@ public function __construct($name, BaseBuilder $builder) { parent::__construct($name, 'generic'); - $this->setIcon('glyphicon-list-alt'); + $this->setIcon('fa-list-alt'); $this->setLabel('action.generic.list'); } } diff --git a/Generator/Action/Generic/NewAction.php b/Generator/Action/Generic/NewAction.php index f55d4ddb..291c5e0d 100644 --- a/Generator/Action/Generic/NewAction.php +++ b/Generator/Action/Generic/NewAction.php @@ -17,7 +17,7 @@ public function __construct($name, BaseBuilder $builder) parent::__construct($name, 'generic'); $this->setClass('btn-primary'); - $this->setIcon('glyphicon-white glyphicon-plus'); + $this->setIcon('fa-plus'); $this->setLabel('action.generic.new'); } } diff --git a/Generator/Action/Generic/SaveAction.php b/Generator/Action/Generic/SaveAction.php index e44100f9..1c9915f5 100644 --- a/Generator/Action/Generic/SaveAction.php +++ b/Generator/Action/Generic/SaveAction.php @@ -17,7 +17,7 @@ public function __construct($name, BaseBuilder $builder) $this->setSubmit(true); $this->setClass('btn-success'); - $this->setIcon('glyphicon-ok glyphicon-white'); + $this->setIcon('fa-check'); $this->setLabel('action.generic.save'); } } diff --git a/Generator/Action/Generic/SaveAndAddAction.php b/Generator/Action/Generic/SaveAndAddAction.php index 9dc6078d..c65c7440 100644 --- a/Generator/Action/Generic/SaveAndAddAction.php +++ b/Generator/Action/Generic/SaveAndAddAction.php @@ -17,7 +17,7 @@ public function __construct($name, BaseBuilder $builder) $this->setSubmit(true); $this->setClass('btn-primary'); - $this->setIcon('glyphicon-plus glyphicon-white'); + $this->setIcon('fa-check'); $this->setLabel('action.generic.save-and-add'); } } diff --git a/Generator/Action/Generic/SaveAndListAction.php b/Generator/Action/Generic/SaveAndListAction.php index 677bb01a..b143ebf8 100644 --- a/Generator/Action/Generic/SaveAndListAction.php +++ b/Generator/Action/Generic/SaveAndListAction.php @@ -17,7 +17,7 @@ public function __construct($name, BaseBuilder $builder) $this->setSubmit(true); $this->setClass('btn-info'); - $this->setIcon('glyphicon-list-alt glyphicon-white'); + $this->setIcon('fa-check'); $this->setLabel('action.generic.save-and-list'); } } diff --git a/Generator/Action/Object/DeleteAction.php b/Generator/Action/Object/DeleteAction.php index 3e080e56..6023f6ae 100644 --- a/Generator/Action/Object/DeleteAction.php +++ b/Generator/Action/Object/DeleteAction.php @@ -17,7 +17,7 @@ public function __construct($name, BaseBuilder $builder) { parent::__construct($name, 'object'); - $this->setIcon('glyphicon-remove'); + $this->setIcon('fa-times'); $this->setLabel('action.object.delete.label'); $this->setConfirm('action.object.delete.confirm'); $this->setCsrfProtected(true); diff --git a/Generator/Action/Object/EditAction.php b/Generator/Action/Object/EditAction.php index e7cc7699..8c536ae5 100644 --- a/Generator/Action/Object/EditAction.php +++ b/Generator/Action/Object/EditAction.php @@ -16,7 +16,7 @@ public function __construct($name, BaseBuilder $builder) { parent::__construct($name, 'object'); - $this->setIcon('glyphicon-edit'); + $this->setIcon('fa-edit'); $this->setLabel('action.object.edit.label'); $this->setRoute($builder->getBaseActionsRoute().'_edit'); diff --git a/Generator/Action/Object/ShowAction.php b/Generator/Action/Object/ShowAction.php index 0de1f94a..fb5b9d23 100644 --- a/Generator/Action/Object/ShowAction.php +++ b/Generator/Action/Object/ShowAction.php @@ -16,7 +16,7 @@ public function __construct($name, BaseBuilder $builder) { parent::__construct($name, 'object'); - $this->setIcon('glyphicon-eye-open'); + $this->setIcon('fa-eye'); $this->setLabel('action.object.show.label'); $this->setRoute($builder->getBaseActionsRoute().'_show'); diff --git a/Resources/templates/CommonAdmin/ListTemplate/FiltersBuilderTemplate.php.twig b/Resources/templates/CommonAdmin/ListTemplate/FiltersBuilderTemplate.php.twig index eff9a891..39f89a4b 100644 --- a/Resources/templates/CommonAdmin/ListTemplate/FiltersBuilderTemplate.php.twig +++ b/Resources/templates/CommonAdmin/ListTemplate/FiltersBuilderTemplate.php.twig @@ -7,15 +7,15 @@ {{ echo_twig("form_errors(form)") }} {% for field in builder.filterColumns %} {% if builder.filterColumns[field.name].credentials %} - {{ echo_if_granted(builder.filterColumns[field.name].credentials) }} + {{ echo_if_granted(builder.filterColumns[field.name].credentials) }} {% endif %} -
-
- {{ echo_twig("form_label(form['" ~ field.name ~ "'], '" ~ builder.FilterColumns[field.name].label|addslashes ~ "'|trans({}, '" ~ i18n_catalog|default("Admin") ~ "'))") }} - {{ echo_twig("form_widget(form['" ~ field.name ~ "'], {'attr':{'class': 'form-control input-sm'}})") }} +
+
+ {{ echo_twig("form_label(form['" ~ field.name ~ "'], '" ~ builder.FilterColumns[field.name].label|addslashes ~ "'|trans({}, '" ~ i18n_catalog|default("Admin") ~ "'))") }} + {{ echo_twig("form_widget(form['" ~ field.name ~ "'], {'attr':{'class': 'form-control input-sm'}})") }} {{ echo_twig("form_errors(form['" ~ field.name ~ "'], {'attr': {'class': 'form-control-feedback'}})") }} -
-
+
+
{% if builder.filterColumns[field.name].credentials %} {{ echo_endif () }} {% endif %} @@ -23,8 +23,8 @@ {{ echo_twig("form_rest(form)") }}
- - + +
diff --git a/Resources/templates/CommonAdmin/ListTemplate/ListBuilderTemplate.php.twig b/Resources/templates/CommonAdmin/ListTemplate/ListBuilderTemplate.php.twig index 032b6767..ef890318 100644 --- a/Resources/templates/CommonAdmin/ListTemplate/ListBuilderTemplate.php.twig +++ b/Resources/templates/CommonAdmin/ListTemplate/ListBuilderTemplate.php.twig @@ -18,22 +18,19 @@ {{ echo_block("body") }} {{- block('title') -}} - -
-
- {{- block('list_scopes') -}} - - {{ echo_include(builder.namespacePrefixForTemplate ~ bundle_name ~ ':' ~ builder.BaseGeneratorName ~ 'List:results.html.twig') }} -
- - {{ echo_block("filters") }} - {% if builder.filterColumns|length > 0 %} -
- {{ echo_include(builder.namespacePrefixForTemplate ~ bundle_name ~ ':' ~ builder.BaseGeneratorName ~ 'List:filters.html.twig') }} -
- {% endif %} - {{ echo_endblock() }} - -
- +
+
+ {{- block('list_scopes') -}} + + {{ echo_include(builder.namespacePrefixForTemplate ~ bundle_name ~ ':' ~ builder.BaseGeneratorName ~ 'List:results.html.twig') }} +
+ + {{ echo_block("filters") }} + {% if builder.filterColumns|length > 0 %} +
+ {{ echo_include(builder.namespacePrefixForTemplate ~ bundle_name ~ ':' ~ builder.BaseGeneratorName ~ 'List:filters.html.twig') }} +
+ {% endif %} + {{ echo_endblock() }} +
{{ echo_endblock() }} diff --git a/Resources/templates/CommonAdmin/ListTemplate/paginator.php.twig b/Resources/templates/CommonAdmin/ListTemplate/paginator.php.twig index 2e632503..7453427c 100644 --- a/Resources/templates/CommonAdmin/ListTemplate/paginator.php.twig +++ b/Resources/templates/CommonAdmin/ListTemplate/paginator.php.twig @@ -3,9 +3,6 @@ {{ echo_if( builder.ModelClass ~ "s.haveToPaginate or "~ builder.ModelClass ~ "s.maxPerPage is not sameas(10)") }}
{{ echo_trans('pagerfanta.view.perpage') }}
- {# - - #} @@ -25,6 +22,6 @@ {% block list_paginator_pages %} {{ echo_block('list_paginator_pages') }} - {{ echo_twig("pagerfanta(" ~ builder.ModelClass ~ "s, 'admingenerator')") }} + {{ echo_twig("pagerfanta(" ~ builder.ModelClass ~ "s, 'admingenerator')") }} {{ echo_endblock() }} {% endblock %} diff --git a/Resources/templates/CommonAdmin/ListTemplate/thead.php.twig b/Resources/templates/CommonAdmin/ListTemplate/thead.php.twig index 3452d4c4..d28dcce9 100644 --- a/Resources/templates/CommonAdmin/ListTemplate/thead.php.twig +++ b/Resources/templates/CommonAdmin/ListTemplate/thead.php.twig @@ -27,34 +27,34 @@ {{ echo_if ("sortColumn == '" ~ column.sortOn ~ "'") }} {{ echo_if ("sortColumn == '" ~ column.sortOn ~ "' and sortOrder == 'ASC'") }} {% if column.sortType == 'alphabetic' %} - - + + {% elseif column.sortType == 'numeric' %} - - + + {% else %} - - + + {% endif %} {{ echo_else() }} {% if column.sortType == 'alphabetic' %} - - + + {% elseif column.sortType == 'numeric' %} - - + + {% else %} - - + + {% endif %} {{ echo_endif () }} {{ echo_else() }} {% if column.sortType == 'alphabetic' %} - + {% elseif column.sortType == 'numeric' %} - + {% else %} - + {% endif %} {{ echo_endif () }} {% endif -%} diff --git a/Resources/templates/CommonAdmin/NestedListTemplate/modal.php.twig b/Resources/templates/CommonAdmin/NestedListTemplate/modal.php.twig index ff31e794..5963a2a3 100644 --- a/Resources/templates/CommonAdmin/NestedListTemplate/modal.php.twig +++ b/Resources/templates/CommonAdmin/NestedListTemplate/modal.php.twig @@ -1,16 +1,16 @@ {% block nestedset_modal %} {{ echo_block("nestedset_modal") }}