Skip to content

Commit

Permalink
remove spain banners + add advert to posts
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Petrash committed May 23, 2017
1 parent 95f0a82 commit 04338d3
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 4 deletions.
1 change: 1 addition & 0 deletions app/Resources/translations/messages.ru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ post-item:
icon-images: Фото внутри
icon-videos: Видео внутри
icon-vu: volleyball.ua
icon-advert: Реклама
icon-hits: Просмотров
source: Источник

Expand Down
1 change: 1 addition & 0 deletions app/Resources/translations/messages.uk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ post-item:
icon-images: Фото всередині
icon-videos: Відео всередині
icon-vu: volleyball.ua
icon-advert: Реклама
icon-hits: Переглядів
source: Джерело

Expand Down
2 changes: 1 addition & 1 deletion app/Resources/views/layout.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@
{% include 'VolleyFaceBundle:Default/includes:modal_social.html.twig' with {} %}

<!-- Modal advertising -->
{% include 'VolleyFaceBundle:Default/includes:onmediads.html.twig' with {} %}
{#{% include 'VolleyFaceBundle:Default/includes:onmediads.html.twig' with {} %}#}

</body>
</html>
23 changes: 23 additions & 0 deletions src/Volley/FaceBundle/Entity/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,13 @@ class Post
*/
private $vu;

/**
* @var boolean
*
* @ORM\Column(name="advert", type="boolean")
*/
private $advert;

/**
* @var string
*
Expand Down Expand Up @@ -778,6 +785,22 @@ public function setVu($vu)
$this->vu = $vu;
}

/**
* @return bool
*/
public function isAdvert()
{
return $this->advert;
}

/**
* @param bool $advert
*/
public function setAdvert($advert)
{
$this->advert = $advert;
}

/**
* Set language
*
Expand Down
4 changes: 4 additions & 0 deletions src/Volley/FaceBundle/Form/PostType.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ public function buildForm(FormBuilderInterface $builder, array $options)
'label' => false,
'attr' => ['data-toggle' => 'toggle', 'data-on' => 'VU', 'data-off' => "Not VU", 'data-onstyle' => 'info']
])
->add('advert',null,[
'label' => false,
'attr' => ['data-toggle' => 'toggle', 'data-on' => 'Advert', 'data-off' => "Not Advert", 'data-onstyle' => 'info']
])
->add('language')
->add('category','entity', [
'class' => 'Volley\FaceBundle\Entity\Category',
Expand Down
20 changes: 19 additions & 1 deletion src/Volley/FaceBundle/Resources/public/css/custom/body.css
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@

.news-item .news-info .icon-images,
.news-item .news-info .icon-videos,
.news-item .news-info .icon-vu {
.news-item .news-info .icon-vu,
.news-item .news-info .icon-advert,
.post .news-info .icon-advert {
float: right;
margin: 5px 0 5px 5px;
}
Expand Down Expand Up @@ -121,6 +123,22 @@
background-position: center center;
}

.post .news-info .icon-advert,
.news-item .news-info .icon-advert {
display: inline-block;
height: 12px;
margin: 6px 0 6px 5px;
font-size: 12px;
text-transform: uppercase;
line-height: 12px;
/*background-image: url('../bundles/volleyface/images/icon-vu.png');*/
/*background-size: contain;*/
/*background-repeat: no-repeat;*/
/*background-position: center center;*/
}



.underline {
display: block;
height: 1px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
alt="{{ item.title ~ ' ' ~ item.metakey }}">
</a>
<div class="news-info row">
<div class="col col-lg-8 col-md-8 col-sm-8 col-xs-8">
<div class="col col-lg-7 col-md-7 col-sm-7 col-xs-7">
<span class="news-date">{{ item.created|localizeddate('none', 'none', null, null, "cccc, d MMMM") }} <br/>
<a href="{{ path('volley_face_blog',{'category_slug': item.category.slug}) }}"
title="{{ item.category.name }}"
style="color: {{ color }}">{{ item.category.name }}</a></span>
{#<span class="news-author"> / {{ item.createdBy }}</span>#}
</div>
<div class="col col-lg-4 col-md-4 col-sm-4 col-xs-34">
<div class="col col-lg-5 col-md-5 col-sm-5 col-xs-5">
{% if item.videos %}
<a href="{{ path('volley_face_post',{'category_slug': item.category.slug,'post_slug': item.slug}) }}">
<div class="icon-videos" title="{{ 'post-item.post-info.icon-videos'|trans({}) }}"></div>
Expand All @@ -31,6 +31,11 @@
<div class="icon-vu" title="{{ 'post-item.post-info.icon-vu'|trans({}) }}"></div>
</a>
{% endif %}
{% if item.advert %}
<a href="{{ path('volley_face_post',{'category_slug': item.category.slug,'post_slug': item.slug}) }}">
<div class="icon-advert" title="{{ 'post-item.post-info.icon-advert'|trans({}) }}">{{ 'post-item.post-info.icon-advert'|trans({}) }}</div>
</a>
{% endif %}
</div>
<span class="clearfix"></span>
</div>
Expand Down
5 changes: 5 additions & 0 deletions src/Volley/FaceBundle/Resources/views/Default/post.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@
{#<br/>#}
{#<span class="news-author ">{{ post.createdBy }}</span>#}
</span>
{% if post.advert %}
<a href="{{ path('volley_face_post',{'category_slug': post.category.slug,'post_slug': post.slug}) }}">
<div class="icon-advert" title="{{ 'post-item.post-info.icon-advert'|trans({}) }}">{{ 'post-item.post-info.icon-advert'|trans({}) }}</div>
</a>
{% endif %}
</div>
<span class="clearfix"></span>
</div>
Expand Down

0 comments on commit 04338d3

Please sign in to comment.