Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:braincrafted/bootstrap-bundle in…
Browse files Browse the repository at this point in the history
…to develop

* 'develop' of github.com:braincrafted/bootstrap-bundle:
  Set correct default value for label_col
  Correction of PHPDoc for badgeFunction
  Second attempt Fix #162
  Fix #162
  • Loading branch information
Florian Eckerstorfer committed Dec 28, 2013
2 parents 1706e42 + 7689aeb commit a0c0ac4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Resources/views/Form/bootstrap.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@

{% if label is not sameas(false) %}
{% set style = style|default(bootstrap_get_style()) %}
{% set label_col = label_col|default(2) %}
{% set label_col = label_col|default(bootstrap_get_label_col()) %}

{% if attr.style is defined and attr.style is not empty %}
{% set style = attr.style %}
Expand Down
10 changes: 6 additions & 4 deletions Resources/views/Menu/bootstrap.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,15 @@
<li{{ _self.attributes(attributes) }}>
{%- if attributes.divider is defined and attributes.divider is not empty %}
{%- elseif item.hasChildren and options.style is defined and options.style in ['tabs', 'justified-tabs', 'pills', 'justified-pills', 'navbar', 'navbar-right', 'navbar_justified'] and options.currentDepth is sameas(1) and ((item.extras.dropdown is not defined and item.displayChildren is sameas(true) or item.extras.dropdown is defined and item.extras.dropdown is sameas(true) and item.displayChildren is sameas(true))) %}
{{ block('dropdownElement') }}
{{ block('dropdownElement') }}
{%- elseif item.hasChildren and options.style is defined and options.style in ['tabs', 'justified-tabs', 'pills', 'justified-pills', 'navbar', 'navbar-right', 'navbar_justified'] and options.currentDepth is sameas(1) and ((item.extras.dropdown is defined and item.extras.dropdown is sameas(false) or item.displayChildren(false) )) %}
{{ block('linkElement') }}
{%- elseif item.uri is not empty and ((matcher is defined and not matcher.isCurrent(item)) or options.currentAsLink) %}
{{ block('linkElement') }}
{{ block('linkElement') }}
{%- elseif item.uri is not empty and ((item.current is defined and not item.current) or options.currentAsLink) %}
{{ block('linkElement') }}
{{ block('linkElement') }}
{%- else %}
{{ block('spanElement') }}
{{ block('spanElement') }}
{%- endif %}
{# render the list of children#}
{%- set childrenClasses = item.childrenAttribute('class') is not empty ? [item.childrenAttribute('class')] : [] %}
Expand Down
1 change: 0 additions & 1 deletion Twig/BootstrapBadgeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public function getFunctions()
* Returns the HTML code for a badge.
*
* @param string $text The text of the badge
* @param string $type The type of badge
*
* @return string The HTML code of the badge
*/
Expand Down

0 comments on commit a0c0ac4

Please sign in to comment.