Skip to content

Commit

Permalink
Merge pull request #757 from loostro/v1.1
Browse files Browse the repository at this point in the history
Update FA to 4.0
  • Loading branch information
loostro committed Jun 18, 2014
2 parents 957febe + d16bb80 commit 6890086
Show file tree
Hide file tree
Showing 27 changed files with 140 additions and 143 deletions.
2 changes: 1 addition & 1 deletion Generator/Action/Batch/DeleteAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion Generator/Action/Generic/ExcelAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}
2 changes: 1 addition & 1 deletion Generator/Action/Generic/ListAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}
2 changes: 1 addition & 1 deletion Generator/Action/Generic/NewAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}
2 changes: 1 addition & 1 deletion Generator/Action/Generic/SaveAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}
2 changes: 1 addition & 1 deletion Generator/Action/Generic/SaveAndAddAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}
2 changes: 1 addition & 1 deletion Generator/Action/Generic/SaveAndListAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}
2 changes: 1 addition & 1 deletion Generator/Action/Object/DeleteAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion Generator/Action/Object/EditAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion Generator/Action/Object/ShowAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion Menu/DefaultMenuBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class DefaultMenuBuilder extends AdmingeneratorMenuBuilder
public function navbarMenu(FactoryInterface $factory, array $options)
{
$menu = $factory->createItem('root');
$menu->setChildrenAttributes(array('id' => 'main_navigation', 'class' => 'nav'));
$menu->setChildrenAttributes(array('id' => 'main_navigation', 'class' => 'nav navbar-nav'));

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

Expand Down
5 changes: 1 addition & 4 deletions Resources/doc/cookbook/menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
6 changes: 3 additions & 3 deletions Resources/doc/support-and-contribution/submitting-issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
30 changes: 16 additions & 14 deletions Resources/public/css/bootstrap-extended.css
Original file line number Diff line number Diff line change
Expand Up @@ -168,18 +168,15 @@ input.btn.btn-reset,
input.btn.btn-reset:hover {
display: inline-block;
padding: 4px 6px;
/* height: 20px;*/
margin-right: 1px;
line-height: 20px;
background: #FFFFFF;
box-shadow: none;
text-align: left;
font-size: 14px;
color: #555555;
cursor: text;
}

.list_scope_group .btn [class^="glyphicon-"] {
.list_scope_group .btn [class^="fa-"] {
font-size: 12px;
}

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

/* Fix active link */
li.active > a {
color: #fff;
}

/* Fix cursor */
a:hover > [class^="glyphicon-"]:before,
a:hover > [class*=" glyphicon-"]:before,
button:hover > [class^="glyphicon-"]:before,
button:hover > [class*=" glyphicon-"]:before {
a:hover > [class^="fa-"]:before,
a:hover > [class*=" fa-"]:before,
button:hover > [class^="fa-"]:before,
button:hover > [class*=" fa-"]:before {
cursor: pointer;
}

/* Fix icons */
[class^="glyphicon-"],
[class*=" glyphicon-"],
[class^="glyphicon-"]:focus,
[class*=" glyphicon-"]:focus,
*:focus > [class^="glyphicon-"],
*:focus > [class*=" glyphicon-"] {
[class^="fa-"],
[class*=" fa-"],
[class^="fa-"]:focus,
[class*=" fa-"]:focus,
*:focus > [class^="fa-"],
*:focus > [class*=" fa-"] {
background-image: none !important;
}

Expand Down
14 changes: 12 additions & 2 deletions Resources/public/css/general.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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 {
Expand All @@ -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}
3 changes: 0 additions & 3 deletions Resources/public/css/profile.css
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@
{{ 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 %}
<div class="row form-group">
<div class="col-xs-8">
{{ 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'}})") }}
<div class="row form-group">
<div class="col-xs-8">
{{ 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'}})") }}
</div>
</div>
</div>
</div>
{% if builder.filterColumns[field.name].credentials %}
{{ echo_endif () }}
{% endif %}
{% endfor %}
{{ echo_twig("form_rest(form)") }}
</fieldset>
<div class="form-group">
<button type="submit" class="btn btn-sm btn-primary"><i class="glyphicon glyphicon-search glyphicon glyphicon-white"></i> {{ echo_trans('list.button.filter') }}</button>
<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>
<button type="submit" class="btn btn-sm btn-primary"><i class="fa fa-search"></i> {{ echo_trans('list.button.filter') }}</button>
<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>
</div>
</form>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,19 @@
{{ echo_block("body") }}
{{- block('title') -}}

<!-- <div class="container-fluid"> -->
<div class="row">
<div class="{% if builder.filterColumns|length == 0 %} col-md-12 {% else %} col-md-9 {% endif %}">
{{- block('list_scopes') -}}

{{ echo_include(builder.namespacePrefixForTemplate ~ bundle_name ~ ':' ~ builder.BaseGeneratorName ~ 'List:results.html.twig') }}
</div>

{{ echo_block("filters") }}
{% if builder.filterColumns|length > 0 %}
<div class="col-md-3">
{{ echo_include(builder.namespacePrefixForTemplate ~ bundle_name ~ ':' ~ builder.BaseGeneratorName ~ 'List:filters.html.twig') }}
</div>
{% endif %}
{{ echo_endblock() }}

</div>
<!-- </div> -->
<div class="row">
<div class="{% if builder.filterColumns|length == 0 %} col-md-12 {% else %} col-md-9 {% endif %}">
{{- block('list_scopes') -}}

{{ echo_include(builder.namespacePrefixForTemplate ~ bundle_name ~ ':' ~ builder.BaseGeneratorName ~ 'List:results.html.twig') }}
</div>

{{ echo_block("filters") }}
{% if builder.filterColumns|length > 0 %}
<div class="col-md-3">
{{ echo_include(builder.namespacePrefixForTemplate ~ bundle_name ~ ':' ~ builder.BaseGeneratorName ~ 'List:filters.html.twig') }}
</div>
{% endif %}
{{ echo_endblock() }}
</div>
{{ echo_endblock() }}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
{{ echo_block("list_paginator_perpage") }}
{{ echo_if( builder.ModelClass ~ "s.haveToPaginate or "~ builder.ModelClass ~ "s.maxPerPage is not sameas(10)") }}
<div class="btn-group input-group">
<div class="btn btn-sm btn-reset">{{ echo_trans('pagerfanta.view.perpage') }}</div>
{#
<button type="button" class="btn btn-sm btn-default">{{ echo_trans('pagerfanta.view.perpage') }}</button>
#}
<div class="btn btn-sm btn-default btn-reset">{{ echo_trans('pagerfanta.view.perpage') }}</div>
<button type="button" class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown">
{{ echo_twig('"pagerfanta.num.elements"|trans({"%number%": '~ builder.ModelClass ~ 's.maxPerPage}, "Admingenerator")') }} <span class="caret"></span>
</button>
Expand All @@ -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 %}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{% for scopeName, params in group %}
<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',
"{ 'group': '" ~ groupName ~ "', 'scope': '" ~ scopeName ~ "' }") }}">
{%- if params.icon is defined %}<i class="{{ params.icon }}"></i> {% endif -%}
{%- if params.icon is defined %}<i class="fa {{ params.icon }}"></i> {% endif -%}
{{- echo_trans(scopeName, {}, i18n_catalog|default("Admin")) -}}
</a>
{% endfor %}
Expand Down
30 changes: 15 additions & 15 deletions Resources/templates/CommonAdmin/ListTemplate/thead.php.twig
Original file line number Diff line number Diff line change
Expand Up @@ -27,34 +27,34 @@
{{ echo_if ("sortColumn == '" ~ column.sortOn ~ "'") }}
{{ echo_if ("sortColumn == '" ~ column.sortOn ~ "' and sortOrder == 'ASC'") }}
{% if column.sortType == 'alphabetic' %}
<i class="glyphicon glyphicon-sort-by-alphabet active"></i>
<i class="glyphicon glyphicon-sort-by-alphabet-alt hover"></i>
<i class="fa fa-sort-alpha-asc active"></i>
<i class="fa fa-sort-alpha-desc hover"></i>
{% elseif column.sortType == 'numeric' %}
<i class="glyphicon glyphicon-sort-by-order active"></i>
<i class="glyphicon glyphicon-sort-by-order-alt hover"></i>
<i class="fa fa-sort-numeric-asc active"></i>
<i class="fa fa-sort-numeric-desc hover"></i>
{% else %}
<i class="glyphicon glyphicon-sort-by-attributes active"></i>
<i class="glyphicon glyphicon-sort-by-attributes-alt hover"></i>
<i class="fa fa-sort-amount-asc active"></i>
<i class="fa fa-sort-amount-desc hover"></i>
{% endif %}
{{ echo_else() }}
{% if column.sortType == 'alphabetic' %}
<i class="glyphicon glyphicon-sort-by-alphabet hover"></i>
<i class="glyphicon glyphicon-sort-by-alphabet-alt active"></i>
<i class="fa fa-sort-alpha-asc hover"></i>
<i class="fa fa-sort-alpha-desc active"></i>
{% elseif column.sortType == 'numeric' %}
<i class="glyphicon glyphicon-sort-by-order hover"></i>
<i class="glyphicon glyphicon-sort-by-order-alt active"></i>
<i class="fa fa-sort-numeric-asc hover"></i>
<i class="fa fa-sort-numeric-desc active"></i>
{% else %}
<i class="glyphicon glyphicon-sort-by-attributes hover"></i>
<i class="glyphicon glyphicon-sort-by-attributes-alt active"></i>
<i class="fa fa-sort-amount-asc hover"></i>
<i class="fa fa-sort-amount-desc active"></i>
{% endif %}
{{ echo_endif () }}
{{ echo_else() }}
{% if column.sortType == 'alphabetic' %}
<i class="glyphicon glyphicon-sort-by-alphabet placeholder hover"></i>
<i class="fa fa-sort-alpha-asc placeholder hover"></i>
{% elseif column.sortType == 'numeric' %}
<i class="glyphicon glyphicon-sort-by-order placeholder hover"></i>
<i class="fa fa-sort-numeric-asc placeholder hover"></i>
{% else %}
<i class="glyphicon glyphicon-sort-by-attributes placeholder hover"></i>
<i class="fa fa-sort-amount-asc placeholder hover"></i>
{% endif %}
{{ echo_endif () }}
{% endif -%}
Expand Down
Loading

0 comments on commit 6890086

Please sign in to comment.