Merge branch 'master' into task/3713/clean_up_css

This commit is contained in:
Arvind Tiwari 2018-02-09 02:20:06 +05:30
commit f42c5a5e20
7 changed files with 67 additions and 174 deletions

View file

@ -3,11 +3,10 @@ from cms.plugin_pool import plugin_pool
from .models import ( from .models import (
UngelichContactUsSection, UngelichTextSection, Service, ServiceItem, UngelichContactUsSection, UngelichTextSection, Service, ServiceItem,
About, AboutItem, SectionWithImage, UngleichServiceItem, UngleichHeader, About, AboutItem, SectionWithImage, UngleichServiceItem,
UngleichHeaderItem, UngleichProductItem, UngleichProduct, UngleichCustomer, UngleichProductItem, UngleichProduct, UngleichCustomer,
UngleichCustomerItem, UngleichHTMLOnly, UngleichSimpleHeader, UngleichCustomerItem, UngleichHTMLOnly,
UngleichHeaderWithBackgroundImageSlider, UngleichHeaderWithBackgroundImageSlider,
UngleichHeaderWithBackgroundImageSliderItem,
UngleichHeaderWithBackgroundVideoSliderItem, UngleichHeaderWithBackgroundVideoSliderItem,
) )
@ -184,49 +183,6 @@ class UngleichServicesItemPlugin(CMSPluginBase):
return context return context
@plugin_pool.register_plugin
class UngleichHeaderWithTextAndImagePlugin(CMSPluginBase):
name = "ungleich Header with Text and Image Plugin"
model = UngleichSimpleHeader
render_template = "ungleich_page/ungleich/header.html"
cache = False
def render(self, context, instance, placeholder):
context['instance'] = instance
return context
@plugin_pool.register_plugin
class UngleichHeaderWithTextAndImageSliderPlugin(CMSPluginBase):
name = "ungleich Header with Text and Image Slider Plugin"
model = UngleichHeader
render_template = "ungleich_page/ungleich/header_with_slider.html"
cache = False
allow_children = True
child_classes = ['UngleichHeaderItemPlugin']
def render(self, context, instance, placeholder):
context['instance'] = instance
return context
@plugin_pool.register_plugin
class UngleichHeaderItemPlugin(CMSPluginBase):
name = "ungleich Header Item Plugin"
model = UngleichHeaderItem
render_template = "ungleich_page/ungleich/_header_item.html"
cache = False
require_parent = True
parent_classes = ['UngleichHeaderWithTextAndImageSliderPlugin']
def render(self, context, instance, placeholder):
context = super(UngleichHeaderItemPlugin, self).render(
context, instance, placeholder
)
context['instance'] = instance
return context
@plugin_pool.register_plugin @plugin_pool.register_plugin
class UngleichHeaderBackgroundImageAndTextSliderPlugin(CMSPluginBase): class UngleichHeaderBackgroundImageAndTextSliderPlugin(CMSPluginBase):
name = "ungleich Header with Background and Image Slider Plugin" name = "ungleich Header with Background and Image Slider Plugin"
@ -237,7 +193,6 @@ class UngleichHeaderBackgroundImageAndTextSliderPlugin(CMSPluginBase):
cache = False cache = False
allow_children = True allow_children = True
child_classes = [ child_classes = [
'UngleichHeaderBackgroundImageAndTextItemPlugin',
'UngleichHeaderBackgroundVideoItemPlugin', 'UngleichHeaderBackgroundVideoItemPlugin',
] ]
@ -263,25 +218,6 @@ class UngleichHeaderBackgroundVideoItemPlugin(CMSPluginBase):
return context return context
@plugin_pool.register_plugin
class UngleichHeaderBackgroundImageAndTextItemPlugin(CMSPluginBase):
name = "ungleich Header with Background and Image and Text Item Plugin"
model = UngleichHeaderWithBackgroundImageSliderItem
render_template = (
'ungleich_page/ungleich/_header_with_background_image_slider_item.html'
)
cache = False
require_parent = True
parent_classes = ['UngleichHeaderBackgroundImageAndTextSliderPlugin']
def render(self, context, instance, placeholder):
context = super(
UngleichHeaderBackgroundImageAndTextItemPlugin, self
).render(context, instance, placeholder)
context['instance'] = instance
return context
@plugin_pool.register_plugin @plugin_pool.register_plugin
class UngleichProductsPlugin(CMSPluginBase): class UngleichProductsPlugin(CMSPluginBase):
name = "ungleich Products Plugin" name = "ungleich Products Plugin"

View file

@ -0,0 +1,64 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2018-01-05 12:56
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('cms', '0014_auto_20160404_1908'),
('ungleich_page', '0017_auto_20171219_1856'),
]
operations = [
migrations.RemoveField(
model_name='ungleichheader',
name='background_image',
),
migrations.RemoveField(
model_name='ungleichheader',
name='cmsplugin_ptr',
),
migrations.RemoveField(
model_name='ungleichheaderitem',
name='cmsplugin_ptr',
),
migrations.RemoveField(
model_name='ungleichheaderitem',
name='image',
),
migrations.RemoveField(
model_name='ungleichheaderwithbackgroundimageslideritem',
name='background_image',
),
migrations.RemoveField(
model_name='ungleichheaderwithbackgroundimageslideritem',
name='cmsplugin_ptr',
),
migrations.RemoveField(
model_name='ungleichsimpleheader',
name='background_image',
),
migrations.RemoveField(
model_name='ungleichsimpleheader',
name='cmsplugin_ptr',
),
migrations.RemoveField(
model_name='ungleichsimpleheader',
name='image',
),
migrations.DeleteModel(
name='UngleichHeader',
),
migrations.DeleteModel(
name='UngleichHeaderItem',
),
migrations.DeleteModel(
name='UngleichHeaderWithBackgroundImageSliderItem',
),
migrations.DeleteModel(
name='UngleichSimpleHeader',
),
]

View file

@ -98,63 +98,10 @@ class UngleichServiceItem(ServiceItem):
) )
class UngleichSimpleHeader(CMSPlugin):
background_image = FilerImageField(
null=True,
blank=True,
related_name="ungleich_simple_header_background_image",
on_delete=models.SET_NULL
)
image = FilerImageField(
null=True,
blank=True,
related_name="ungleich_simple_header_image",
on_delete=models.SET_NULL
)
text = HTMLField()
class UngleichHeader(CMSPlugin):
background_image = FilerImageField(
null=True,
blank=True,
related_name="ungleich_header_background_image",
on_delete=models.SET_NULL
)
carousel_data_interval = models.IntegerField(default=5000)
class UngleichHeaderWithBackgroundImageSliderItem(CMSPlugin):
background_image = FilerImageField(
null=True, blank=True,
related_name="ungleich_header_slider_item_image",
on_delete=models.SET_NULL
)
description = HTMLField(
default='<div class="intro-cap">We Design, Configure &amp; Maintain '
'<br>Your Linux Infrastructure</div><p class="intro_lead">'
'Ruby on Rails, Django, Java, Webserver, Mailserver, any '
'infrastructure that needs to configured, we provide '
'comprehensive solutions. Amazon, rackspace or bare metal '
'servers, we configure for you.</p><p style="text-align: '
'right;"><a class="btn btn-trans" href="">Learn More</a></p>'
)
class UngleichHeaderWithBackgroundImageSlider(CMSPlugin): class UngleichHeaderWithBackgroundImageSlider(CMSPlugin):
carousel_data_interval = models.IntegerField(default=2000) carousel_data_interval = models.IntegerField(default=2000)
class UngleichHeaderItem(CMSPlugin):
image = FilerImageField(
null=True,
blank=True,
related_name="ungleich_header_item_image",
on_delete=models.SET_NULL
)
description = HTMLField()
class UngleichHeaderWithBackgroundVideoSliderItem(CMSPlugin): class UngleichHeaderWithBackgroundVideoSliderItem(CMSPlugin):
image = FilerImageField( image = FilerImageField(
null=True, null=True,

View file

@ -1,14 +0,0 @@
<div class="container">
<div>
{% if instance.image %}
<img src="{{ instance.image.url }}" alt=""
class="logo-image" img-responsive="" width="300"/>
<div class="header-vh"></div>
{% endif %}
<div>
<span class="intro-cap-sans-transform">
{{ instance.description }}
</span>
</div>
</div>
</div>

View file

@ -1,4 +0,0 @@
<div class="bg_img" style="background-image:url({{ instance.background_image.url }})"></div>
<div class="container">
{{ instance.description }}
</div>

View file

@ -1,15 +0,0 @@
{% load cms_tags %}
<!-- Header -->
<header style="background-image: url({{ instance.background_image.url }})">
<div class="container">
<div class="intro-text">
<img src="{{ instance.image.url }}" alt="" class="logo-image" img-responsive="" width="300" />
<p></p><p></p><br>
<div class="intro-cap">
<span class="intro-cap">
{{ instance.text }}
</span>
</div>
</div>
</div>
</header>

View file

@ -1,21 +0,0 @@
{% load cms_tags %}
<header class="header_slider" style="background-image: url({{ instance.background_image.url }})">
<div id="carousel-header-ungleich" class="carousel slide" data-ride="carousel" data-interval="{{ instance.carousel_data_interval}}">
<!-- Indicators -->
{% if instance.child_plugin_instances|length > 1 %}
<ol class="carousel-indicators">
{% for plugin in instance.child_plugin_instances %}
<li data-target="#carousel-header-ungleich" data-slide-to="{{forloop.counter0}}" {% if forloop.counter0 == 0 %}class="active" {% endif %}></li>
{% endfor %}
</ol>
{% endif %}
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
{% for plugin in instance.child_plugin_instances %}
<div class="item {% if forloop.counter0 == 0 %}active{% endif %}">
{% render_plugin plugin %}
</div>
{% endfor %}
</div>
</div>
</header>