Skip to content

Commit 6890086

Browse files
committed
Merge pull request #757 from loostro/v1.1
Update FA to 4.0
2 parents 957febe + d16bb80 commit 6890086

27 files changed

+140
-143
lines changed

Generator/Action/Batch/DeleteAction.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function __construct($name, BaseBuilder $builder)
1616
{
1717
parent::__construct($name, 'batch');
1818

19-
$this->setIcon('glyphicon-remove');
19+
$this->setIcon('fa-times');
2020
$this->setLabel('action.batch.delete.label');
2121
$this->setConfirm('action.batch.delete.confirm');
2222
$this->setCsrfProtected(true);

Generator/Action/Generic/ExcelAction.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function __construct($name, BaseBuilder $builder)
1818
parent::__construct($name, 'generic');
1919

2020
$this->setClass('btn-primary');
21-
$this->setIcon('glyphicon-white glyphicon-print');
21+
$this->setIcon('fa-print');
2222
$this->setLabel('action.generic.excel');
2323
}
2424
}

Generator/Action/Generic/ListAction.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function __construct($name, BaseBuilder $builder)
1616
{
1717
parent::__construct($name, 'generic');
1818

19-
$this->setIcon('glyphicon-list-alt');
19+
$this->setIcon('fa-list-alt');
2020
$this->setLabel('action.generic.list');
2121
}
2222
}

Generator/Action/Generic/NewAction.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function __construct($name, BaseBuilder $builder)
1717
parent::__construct($name, 'generic');
1818

1919
$this->setClass('btn-primary');
20-
$this->setIcon('glyphicon-white glyphicon-plus');
20+
$this->setIcon('fa-plus');
2121
$this->setLabel('action.generic.new');
2222
}
2323
}

Generator/Action/Generic/SaveAction.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function __construct($name, BaseBuilder $builder)
1717

1818
$this->setSubmit(true);
1919
$this->setClass('btn-success');
20-
$this->setIcon('glyphicon-ok glyphicon-white');
20+
$this->setIcon('fa-check');
2121
$this->setLabel('action.generic.save');
2222
}
2323
}

Generator/Action/Generic/SaveAndAddAction.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function __construct($name, BaseBuilder $builder)
1717

1818
$this->setSubmit(true);
1919
$this->setClass('btn-primary');
20-
$this->setIcon('glyphicon-plus glyphicon-white');
20+
$this->setIcon('fa-check');
2121
$this->setLabel('action.generic.save-and-add');
2222
}
2323
}

Generator/Action/Generic/SaveAndListAction.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function __construct($name, BaseBuilder $builder)
1717

1818
$this->setSubmit(true);
1919
$this->setClass('btn-info');
20-
$this->setIcon('glyphicon-list-alt glyphicon-white');
20+
$this->setIcon('fa-check');
2121
$this->setLabel('action.generic.save-and-list');
2222
}
2323
}

Generator/Action/Object/DeleteAction.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function __construct($name, BaseBuilder $builder)
1717
{
1818
parent::__construct($name, 'object');
1919

20-
$this->setIcon('glyphicon-remove');
20+
$this->setIcon('fa-times');
2121
$this->setLabel('action.object.delete.label');
2222
$this->setConfirm('action.object.delete.confirm');
2323
$this->setCsrfProtected(true);

Generator/Action/Object/EditAction.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function __construct($name, BaseBuilder $builder)
1616
{
1717
parent::__construct($name, 'object');
1818

19-
$this->setIcon('glyphicon-edit');
19+
$this->setIcon('fa-edit');
2020
$this->setLabel('action.object.edit.label');
2121

2222
$this->setRoute($builder->getBaseActionsRoute().'_edit');

Generator/Action/Object/ShowAction.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function __construct($name, BaseBuilder $builder)
1616
{
1717
parent::__construct($name, 'object');
1818

19-
$this->setIcon('glyphicon-eye-open');
19+
$this->setIcon('fa-eye');
2020
$this->setLabel('action.object.show.label');
2121

2222
$this->setRoute($builder->getBaseActionsRoute().'_show');

Menu/DefaultMenuBuilder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class DefaultMenuBuilder extends AdmingeneratorMenuBuilder
1212
public function navbarMenu(FactoryInterface $factory, array $options)
1313
{
1414
$menu = $factory->createItem('root');
15-
$menu->setChildrenAttributes(array('id' => 'main_navigation', 'class' => 'nav'));
15+
$menu->setChildrenAttributes(array('id' => 'main_navigation', 'class' => 'nav navbar-nav'));
1616

1717
$overwrite = $this->addDropdown($menu, 'Replace this menu');
1818

Resources/doc/cookbook/menu.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,7 @@ public function navbarMenu(FactoryInterface $factory, array $options)
9999
// create root item
100100
$menu = $factory->createItem('root');
101101
// set id for root item, and class for nice twitter bootstrap style
102-
$menu->setChildrenAttributes(array('id' => 'main_navigation', 'class' => 'nav'));
103-
104-
// add "navbar-nav" class for Twitter Bootstrap3 theme
105-
//$menu->setChildrenAttributes(array('id' => 'main_navigation', 'class' => 'nav navbar-nav'));
102+
$menu->setChildrenAttributes(array('id' => 'main_navigation', 'class' => 'nav navbar-nav'));
106103

107104
// add links $menu
108105
$this->addLinkURI($menu, 'Item1', 'http://www.google.com');

Resources/doc/support-and-contribution/submitting-issues.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ While writing your issue please use Github Flavored Markdown to make it more rea
3737

3838
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**:
3939

40-
> **```**yaml
41-
40+
> **```yaml**
41+
>
4242
> my.yaml_code: is here
43-
43+
>
4444
> **```**
4545
4646
will resuilt in:

Resources/public/css/bootstrap-extended.css

+16-14
Original file line numberDiff line numberDiff line change
@@ -168,18 +168,15 @@ input.btn.btn-reset,
168168
input.btn.btn-reset:hover {
169169
display: inline-block;
170170
padding: 4px 6px;
171-
/* height: 20px;*/
172-
margin-right: 1px;
173171
line-height: 20px;
174172
background: #FFFFFF;
175173
box-shadow: none;
176174
text-align: left;
177-
font-size: 14px;
178175
color: #555555;
179176
cursor: text;
180177
}
181178

182-
.list_scope_group .btn [class^="glyphicon-"] {
179+
.list_scope_group .btn [class^="fa-"] {
183180
font-size: 12px;
184181
}
185182

@@ -189,21 +186,26 @@ input.btn.btn-reset:hover {
189186
font-size: 14px;
190187
}
191188

189+
/* Fix active link */
190+
li.active > a {
191+
color: #fff;
192+
}
193+
192194
/* Fix cursor */
193-
a:hover > [class^="glyphicon-"]:before,
194-
a:hover > [class*=" glyphicon-"]:before,
195-
button:hover > [class^="glyphicon-"]:before,
196-
button:hover > [class*=" glyphicon-"]:before {
195+
a:hover > [class^="fa-"]:before,
196+
a:hover > [class*=" fa-"]:before,
197+
button:hover > [class^="fa-"]:before,
198+
button:hover > [class*=" fa-"]:before {
197199
cursor: pointer;
198200
}
199201

200202
/* Fix icons */
201-
[class^="glyphicon-"],
202-
[class*=" glyphicon-"],
203-
[class^="glyphicon-"]:focus,
204-
[class*=" glyphicon-"]:focus,
205-
*:focus > [class^="glyphicon-"],
206-
*:focus > [class*=" glyphicon-"] {
203+
[class^="fa-"],
204+
[class*=" fa-"],
205+
[class^="fa-"]:focus,
206+
[class*=" fa-"]:focus,
207+
*:focus > [class^="fa-"],
208+
*:focus > [class*=" fa-"] {
207209
background-image: none !important;
208210
}
209211

Resources/public/css/general.css

+12-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,12 @@ body {
3636
border-color: #0B6CBC;
3737
}
3838

39+
.navbar-blue .navbar-nav > li > .btn {
40+
margin-top: 8px;
41+
margin-bottom: 8px;
42+
}
43+
3944
.navbar-blue .navbar-brand {
40-
padding: 10px 20px;
4145
color: #FFFFFF;
4246
text-shadow: 0 1px 0 #777777;
4347

@@ -97,6 +101,7 @@ body {
97101
text-shadow: 0 1px 0 #777777, 0 1px 5px rgba(255, 255, 255, 0.9);
98102
}
99103

104+
.navbar-blue .dropdown-menu li.active > a,
100105
.navbar-blue .dropdown-menu li > a:hover,
101106
.navbar-blue .dropdown-menu li > a:focus,
102107
.navbar-blue .dropdown-submenu:hover > a {
@@ -107,7 +112,12 @@ body {
107112
background-image: -o-linear-gradient(top, #438EB9, #62A8D1);
108113
background-image: linear-gradient(to bottom, #438EB9, #62A8D1);
109114
background-repeat: repeat-x;
110-
filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff438EB9', endColorstr='#ff62A8D1', GradientType=0);
115+
filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff438EB9', endColorstr='#ff62A8D1', GradientType=0);
116+
color: white;
117+
}
118+
119+
.navbar-blue .dropdown-menu li.active > a {
120+
font-weight: bold;
111121
}
112122

113123
div[class^='object-actions-'],div[class*=' object-actions-'] {margin-bottom: 10px}

Resources/public/css/profile.css

-3
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@
4545
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
4646
filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff438EB9', endColorstr='#ff62A8D1', GradientType=0);
4747
filter: progid:dximagetransform.microsoft.gradient(enabled=false);
48-
49-
margin-top: 10px;
50-
margin-bottom: 10px;
5148
}
5249

5350
.btn.btn-profile:hover,

Resources/templates/CommonAdmin/ListTemplate/FiltersBuilderTemplate.php.twig

+9-9
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,24 @@
77
{{ echo_twig("form_errors(form)") }}
88
{% for field in builder.filterColumns %}
99
{% if builder.filterColumns[field.name].credentials %}
10-
{{ echo_if_granted(builder.filterColumns[field.name].credentials) }}
10+
{{ echo_if_granted(builder.filterColumns[field.name].credentials) }}
1111
{% endif %}
12-
<div class="row form-group">
13-
<div class="col-xs-8">
14-
{{ echo_twig("form_label(form['" ~ field.name ~ "'], '" ~ builder.FilterColumns[field.name].label|addslashes ~ "'|trans({}, '" ~ i18n_catalog|default("Admin") ~ "'))") }}
15-
{{ echo_twig("form_widget(form['" ~ field.name ~ "'], {'attr':{'class': 'form-control input-sm'}})") }}
12+
<div class="row form-group">
13+
<div class="col-xs-8">
14+
{{ echo_twig("form_label(form['" ~ field.name ~ "'], '" ~ builder.FilterColumns[field.name].label|addslashes ~ "'|trans({}, '" ~ i18n_catalog|default("Admin") ~ "'))") }}
15+
{{ echo_twig("form_widget(form['" ~ field.name ~ "'], {'attr':{'class': 'form-control input-sm'}})") }}
1616
{{ echo_twig("form_errors(form['" ~ field.name ~ "'], {'attr': {'class': 'form-control-feedback'}})") }}
17-
</div>
18-
</div>
17+
</div>
18+
</div>
1919
{% if builder.filterColumns[field.name].credentials %}
2020
{{ echo_endif () }}
2121
{% endif %}
2222
{% endfor %}
2323
{{ echo_twig("form_rest(form)") }}
2424
</fieldset>
2525
<div class="form-group">
26-
<button type="submit" class="btn btn-sm btn-primary"><i class="glyphicon glyphicon-search glyphicon glyphicon-white"></i> {{ echo_trans('list.button.filter') }}</button>
27-
<button type="submit" class="btn btn-sm btn-default" name="reset" value="true"><i class="glyphicon glyphicon-refresh"></i> {{ echo_trans('list.button.reset') }}</button>
26+
<button type="submit" class="btn btn-sm btn-primary"><i class="fa fa-search"></i> {{ echo_trans('list.button.filter') }}</button>
27+
<button type="submit" class="btn btn-sm btn-default" name="reset" value="true"><i class="fa fa-refresh"></i> {{ echo_trans('list.button.reset') }}</button>
2828
</div>
2929
</form>
3030
</div>

Resources/templates/CommonAdmin/ListTemplate/ListBuilderTemplate.php.twig

+15-18
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,19 @@
1818
{{ echo_block("body") }}
1919
{{- block('title') -}}
2020

21-
<!-- <div class="container-fluid"> -->
22-
<div class="row">
23-
<div class="{% if builder.filterColumns|length == 0 %} col-md-12 {% else %} col-md-9 {% endif %}">
24-
{{- block('list_scopes') -}}
25-
26-
{{ echo_include(builder.namespacePrefixForTemplate ~ bundle_name ~ ':' ~ builder.BaseGeneratorName ~ 'List:results.html.twig') }}
27-
</div>
28-
29-
{{ echo_block("filters") }}
30-
{% if builder.filterColumns|length > 0 %}
31-
<div class="col-md-3">
32-
{{ echo_include(builder.namespacePrefixForTemplate ~ bundle_name ~ ':' ~ builder.BaseGeneratorName ~ 'List:filters.html.twig') }}
33-
</div>
34-
{% endif %}
35-
{{ echo_endblock() }}
36-
37-
</div>
38-
<!-- </div> -->
21+
<div class="row">
22+
<div class="{% if builder.filterColumns|length == 0 %} col-md-12 {% else %} col-md-9 {% endif %}">
23+
{{- block('list_scopes') -}}
24+
25+
{{ echo_include(builder.namespacePrefixForTemplate ~ bundle_name ~ ':' ~ builder.BaseGeneratorName ~ 'List:results.html.twig') }}
26+
</div>
27+
28+
{{ echo_block("filters") }}
29+
{% if builder.filterColumns|length > 0 %}
30+
<div class="col-md-3">
31+
{{ echo_include(builder.namespacePrefixForTemplate ~ bundle_name ~ ':' ~ builder.BaseGeneratorName ~ 'List:filters.html.twig') }}
32+
</div>
33+
{% endif %}
34+
{{ echo_endblock() }}
35+
</div>
3936
{{ echo_endblock() }}

Resources/templates/CommonAdmin/ListTemplate/paginator.php.twig

+2-5
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
{{ echo_block("list_paginator_perpage") }}
33
{{ echo_if( builder.ModelClass ~ "s.haveToPaginate or "~ builder.ModelClass ~ "s.maxPerPage is not sameas(10)") }}
44
<div class="btn-group input-group">
5-
<div class="btn btn-sm btn-reset">{{ echo_trans('pagerfanta.view.perpage') }}</div>
6-
{#
7-
<button type="button" class="btn btn-sm btn-default">{{ echo_trans('pagerfanta.view.perpage') }}</button>
8-
#}
5+
<div class="btn btn-sm btn-default btn-reset">{{ echo_trans('pagerfanta.view.perpage') }}</div>
96
<button type="button" class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown">
107
{{ echo_twig('"pagerfanta.num.elements"|trans({"%number%": '~ builder.ModelClass ~ 's.maxPerPage}, "Admingenerator")') }} <span class="caret"></span>
118
</button>
@@ -25,6 +22,6 @@
2522

2623
{% block list_paginator_pages %}
2724
{{ echo_block('list_paginator_pages') }}
28-
{{ echo_twig("pagerfanta(" ~ builder.ModelClass ~ "s, 'admingenerator')") }}
25+
{{ echo_twig("pagerfanta(" ~ builder.ModelClass ~ "s, 'admingenerator')") }}
2926
{{ echo_endblock() }}
3027
{% endblock %}

Resources/templates/CommonAdmin/ListTemplate/scopes.php.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{% for scopeName, params in group %}
88
<a class="{{ 'btn ' ~ params.class|default('btn-default') }} {{ echo_twig("scopes['" ~ groupName ~ "'] == '" ~ scopeName ~ "' ? 'active': 'inactive'") }}" href="{{ echo_path(builder.routePrefixWithSubfolder ~ '_' ~ bundle_name ~ ( builder.BaseGeneratorName ? "_" ~ builder.BaseGeneratorName : "" ) ~ '_scopes',
99
"{ 'group': '" ~ groupName ~ "', 'scope': '" ~ scopeName ~ "' }") }}">
10-
{%- if params.icon is defined %}<i class="{{ params.icon }}"></i> {% endif -%}
10+
{%- if params.icon is defined %}<i class="fa {{ params.icon }}"></i> {% endif -%}
1111
{{- echo_trans(scopeName, {}, i18n_catalog|default("Admin")) -}}
1212
</a>
1313
{% endfor %}

Resources/templates/CommonAdmin/ListTemplate/thead.php.twig

+15-15
Original file line numberDiff line numberDiff line change
@@ -27,34 +27,34 @@
2727
{{ echo_if ("sortColumn == '" ~ column.sortOn ~ "'") }}
2828
{{ echo_if ("sortColumn == '" ~ column.sortOn ~ "' and sortOrder == 'ASC'") }}
2929
{% if column.sortType == 'alphabetic' %}
30-
<i class="glyphicon glyphicon-sort-by-alphabet active"></i>
31-
<i class="glyphicon glyphicon-sort-by-alphabet-alt hover"></i>
30+
<i class="fa fa-sort-alpha-asc active"></i>
31+
<i class="fa fa-sort-alpha-desc hover"></i>
3232
{% elseif column.sortType == 'numeric' %}
33-
<i class="glyphicon glyphicon-sort-by-order active"></i>
34-
<i class="glyphicon glyphicon-sort-by-order-alt hover"></i>
33+
<i class="fa fa-sort-numeric-asc active"></i>
34+
<i class="fa fa-sort-numeric-desc hover"></i>
3535
{% else %}
36-
<i class="glyphicon glyphicon-sort-by-attributes active"></i>
37-
<i class="glyphicon glyphicon-sort-by-attributes-alt hover"></i>
36+
<i class="fa fa-sort-amount-asc active"></i>
37+
<i class="fa fa-sort-amount-desc hover"></i>
3838
{% endif %}
3939
{{ echo_else() }}
4040
{% if column.sortType == 'alphabetic' %}
41-
<i class="glyphicon glyphicon-sort-by-alphabet hover"></i>
42-
<i class="glyphicon glyphicon-sort-by-alphabet-alt active"></i>
41+
<i class="fa fa-sort-alpha-asc hover"></i>
42+
<i class="fa fa-sort-alpha-desc active"></i>
4343
{% elseif column.sortType == 'numeric' %}
44-
<i class="glyphicon glyphicon-sort-by-order hover"></i>
45-
<i class="glyphicon glyphicon-sort-by-order-alt active"></i>
44+
<i class="fa fa-sort-numeric-asc hover"></i>
45+
<i class="fa fa-sort-numeric-desc active"></i>
4646
{% else %}
47-
<i class="glyphicon glyphicon-sort-by-attributes hover"></i>
48-
<i class="glyphicon glyphicon-sort-by-attributes-alt active"></i>
47+
<i class="fa fa-sort-amount-asc hover"></i>
48+
<i class="fa fa-sort-amount-desc active"></i>
4949
{% endif %}
5050
{{ echo_endif () }}
5151
{{ echo_else() }}
5252
{% if column.sortType == 'alphabetic' %}
53-
<i class="glyphicon glyphicon-sort-by-alphabet placeholder hover"></i>
53+
<i class="fa fa-sort-alpha-asc placeholder hover"></i>
5454
{% elseif column.sortType == 'numeric' %}
55-
<i class="glyphicon glyphicon-sort-by-order placeholder hover"></i>
55+
<i class="fa fa-sort-numeric-asc placeholder hover"></i>
5656
{% else %}
57-
<i class="glyphicon glyphicon-sort-by-attributes placeholder hover"></i>
57+
<i class="fa fa-sort-amount-asc placeholder hover"></i>
5858
{% endif %}
5959
{{ echo_endif () }}
6060
{% endif -%}

0 commit comments

Comments
 (0)