Commit 1174b7f2 authored by Sven Franck's avatar Sven Franck

erp5_officejs_afs_directory: layout updates

parent 624f2f19
......@@ -229,6 +229,7 @@
.custom-success-story-image-wrapper {
width: 100%;
max-height: 12em;
height: 12em;
}
}
......@@ -244,6 +245,8 @@
-moz-text-align-last: left;
text-align-last: left;
padding-bottom: .5em;
line-height: 1.5em;
min-height: 4.5em;
}
.custom-success-story-category-list {
padding-bottom: .5em;
......@@ -265,18 +268,8 @@
margin: 0 .25em .25em;
}
@media (max-width: 40em) {
.custom-success-story-list > li:not(:nth-last-child(1)) .custom-success-story-client + p + p:after {
content: "";
width: 60%;
display: block;
border-bottom: 1px solid #a1a1a1;
padding-bottom: 1.25em;
margin-bottom: .1.25em;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin-left: auto;
margin-right: auto;
.custom-success-story-list > li:not(:nth-last-child(1)) .custom-success-story-client + p + p {
padding-bottom: 2em;
}
}
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>954.54859.55587.35328</string> </value>
<value> <string>955.20671.48081.55893</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1477644662.41</float>
<float>1479295110.81</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -93,15 +93,44 @@
{{/if}}
<p class="custom-success-story-title">{{title}}</a></p>
<p class="custom-success-story-description">{{description}} <a href="{{url}}">Read more</a></p>
<p>Industry: {{industry}}</p>
<ul class="custom-success-story-category-list"><lh>Categories:</lh>
<table class="custom-link-table">
<tbody>
<tr>
<td>Categories</td>
<td>
<ul class="custom-success-story-category-list">
{{#each ../category_list}}
<li>{{this}}</li>
{{/each}}
</ul>
<p class="custom-success-story-client">Customer: <span>{{customer}}</span></p>
<p>Country: {{country}}</p>
<p>Language: {{language}}</p>
</td>
</tr>
<tr>
<td class="custom-success-story-client">Customer</td>
<td><b>{{customer}}</b></td>
</tr>
<tr>
<td>Industry</td>
<td>{{industry}}</td>
</tr>
<tr>
<td>Country</td>
<td>{{country}}</td>
</tr>
<tr>
<td>Language</td>
<td>{{language}}</td>
</tr>
<tr>
<td>Product Site</td>
<td><a href="{{software_website}}">{{software}}</a></td>
</tr>
<tr>
<td>Publisher Site</td>
<td><a href="{{publisher_website}}">{{publisher}}</a></td>
</tr>
</tbody>
</table>
</li>
{{/each}}
</ul>
......
......@@ -232,7 +232,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>954.57651.20561.29371</string> </value>
<value> <string>955.20607.54543.26555</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -250,7 +250,7 @@
</tuple>
<state>
<tuple>
<float>1477583198.23</float>
<float>1479290954.0</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -11,8 +11,9 @@
templater.getElementById("display-template").innerHTML
);
function clean(case_list) {
var i,
function clean(case_list, software_website, software_title, publisher_website, publisher_title) {
var emptry_string = "",
i,
len,
entry;
for (i = 0, len = case_list.length; i < len; i += 1) {
......@@ -21,6 +22,10 @@
entry.image = PLACEHOLDER;
entry.image_class = "custom-placeholder";
}
entry.software_website = software_website || emptry_string;
entry.software = software_title || emptry_string;
entry.publisher_website = publisher_website || emptry_string;
entry.publisher = publisher_title || emptry_string;
}
return case_list;
}
......@@ -45,6 +50,7 @@
return gadget.jio_get(options.jio_key);
})
.push(function (software) {
// https://en.wikipedia.org/api/rest_v1/
// only works in for english
var wikipedia_api_url = 'https://en.wikipedia.org/api/rest_v1/page/summary/';
......@@ -61,7 +67,13 @@
software.success_case_list[0].title === "") {
delete software.success_case_list;
} else {
software.success_case_list = clean(software.success_case_list);
software.success_case_list = clean(
software.success_case_list,
software.website,
software.title,
software.publisher_website,
software.publisher
);
}
if (software.wikipedia_url == "N/A") {
delete software.wikipedia_url;
......
......@@ -228,7 +228,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>954.57702.11675.11332</string> </value>
<value> <string>955.20626.3055.426</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -246,7 +246,7 @@
</tuple>
<state>
<tuple>
<float>1477584428.71</float>
<float>1479292034.72</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -30,7 +30,6 @@
return gadget.jio_get(options.jio_key);
})
.push(function (story) {
console.log(story)
if (story.image === "N/A" || story.image === "") {
story.image = PLACEHOLDER;
story.image_class = "custom-placeholder";
......
......@@ -228,7 +228,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>954.57730.56023.48657</string> </value>
<value> <string>954.58711.46291.45073</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -246,7 +246,7 @@
</tuple>
<state>
<tuple>
<float>1477644942.36</float>
<float>1479291364.95</float>
<string>UTC</string>
</tuple>
</state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment