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

erp5_officejs_afs_directory: layout updates

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