fixes to website, item (added table for cross listing), modules_setup and form_header

This commit is contained in:
Rushabh Mehta
2012-12-25 15:09:14 +05:30
parent bea0671fc0
commit 7837d80716
20 changed files with 197 additions and 89 deletions

View File

@@ -0,0 +1,8 @@
{% if obj.parent_groups and len(obj.parent_groups) > 1 %}
<ul class="breadcrumb">
{% for ig in obj.parent_groups[:-1] %}
<li><a href="{{ ig.page_name }}.html">{{ ig.name }}</a> <span class="divider">/</span></li>
{% endfor %}
<li class="active">{{ obj.parent_groups[-1].name }}</li>
</ul>
{% endif %}

View File

@@ -1,50 +1,39 @@
{% extends "html/page.html" %}
{% block javascript %}
{% include "js/product_list.js" %}
{% endblock %}
{% block title %}{{ name }}{% endblock %}
{% block content %}
<script>
$(document).ready(function() {
window.start = 0;
window.product_group = "{{ name }}";
window.get_product_list();
});
</script>
<div class="layout-wrapper layout-wrapper-background">
<div class="web-content" id="content-product_group">
<div class="layout-main" style="padding: 30px;">
{% include 'html/product_search_box.html' %}
{% include 'html/product_breadcrumbs.html' %}
{% if description %}
<div>{{ description or ""}}</div>
{% else %}
<h3>{{ name }}</h3>
{% endif %}
{% if sub_groups %}
<div class="well">
<div class="container-fluid">
<div class="well well-small">
<div class="container-fluid" style="padding-left: 0px; margin-left:-10px; line-height: 2em;">
{% for d in sub_groups %}
<div class="span2">
<i class="icon-chevron-right"></i>
<a href="{{ d.page_name }}">{{ d.name }}</a></div>
<a href="{{ d.page_name }}">{{ d.name }} ({{ d.count }})</a>
</div>
{% endfor %}
</div>
</div>
{% endif %}
<hr>
<h3>Products</h3>
{% if items %}
<div id="search-list">
</div>
<div style="text-align: center;">
<div class="more-btn"
style="display: none; text-align: center;">
<button class="btn">More...</button>
</div>
<table class="table">
{% for item in items %}
{{ item }}
{% endfor %}
</table>
</div>
{% endif %}
</div>
</div>
</div>

View File

@@ -0,0 +1,14 @@
<tr>
<td style="width: 30%;">
{% if website_image %}
<img class="product-image" style="width: 80%;" src="{{ website_image }}">
{% else %}
{% include 'html/product_missing_image.html' %}
{% endif %}
</td>
<td>
<h4><a href="{{ page_name }}">{{ item_name }}</a></h4>
<p class="help">Item Code: {{ name }}</p>
<p>{{ website_description }}</p>
</td>
</tr>

View File

@@ -0,0 +1 @@
<div class='website-missing-image'><i class='icon-camera'></i></div>

View File

@@ -12,7 +12,7 @@
{% if item_name != name %}
{{ item_name }} [{{ name }}]
{% else %}
{{ item_name }}
{{ item_name or name }}
{% endif %}
{% endblock %}
@@ -21,19 +21,17 @@
<div class="web-content" id="content-product-{{ name }}">
<div class="layout-main" style="padding: 30px;">
{% include 'html/product_search_box.html' %}
<h1>{{ item_name }}</h1>
{% include 'html/product_breadcrumbs.html' %}
<h3>{{ item_name }}</h3>
<p class="help">Item Code: {{ name }}</p>
<div class="product-page-content">
<div class="span6">
{% if website_image %}
<image class="item-main-image" src="files/{{ website_image }}" />
<image class="item-main-image" src="{% if website_image.lower().startswith('http') %}{{ website_image}}{% else %}files/{{ website_image }}{% endif %}" />
{% else %}
<div class="img-area">
<div style='background-color: #eee; padding: 40px;
width: 32px; font-size: 32px; color: #888;' title='No Image'>
<i class='icon-camera'></i></div>
{% include 'html/product_missing_image.html' %}
</div>
{% endif %}
<br><br>
</div>
@@ -57,7 +55,7 @@
{% for d in obj.doclist.get(
{"doctype":"Item Website Specification"}) %}
<tr>
<td style="min-width: 150px;">{{ d.label }}</td>
<td style="width: 30%;">{{ d.label }}</td>
<td>{{ d.description }}</td>
</tr>
{% endfor %}