1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/web/ synced 2025-03-09 00:00:01 +01:00

Add message for entites without attributes

This commit is contained in:
Markus Grigull 2015-10-14 13:12:51 +02:00
parent f52d77912b
commit c3a4e2d120
2 changed files with 21 additions and 14 deletions

View file

@ -9,6 +9,11 @@ export default Ember.Component.extend({
return properties.objectAt(0);
}.property('entity'),
entityAvailable: function() {
var properties = this.get('entity.properties');
return (properties.get('length') > 0);
}.property('entity'),
actions: {
showPropertyValues(_prop) {
this.set('visibleProperty', _prop);

View file

@ -1,13 +1,14 @@
{{#if entity}}
<table height="100%">
{{#if entityName}}
<tr>
<th colspan="2">
<h2>{{entityName}}</h2>
</th>
</tr>
{{/if}}
<table height="100%">
{{#if entityName}}
<tr>
<th colspan="2">
<h2>{{entityName}}</h2>
</th>
</tr>
{{/if}}
<tr>
{{#if entityAvailable}}
<td class="column-left" valign="top">
{{property-table model=entity showProperty="showPropertyValues"}}
</td>
@ -22,8 +23,9 @@
<h4>{{visibleProperty.type}}</h4>
{{/if}}
</td>
</tr>
</table>
{{else}}
<h3>No entitiy found</h3>
{{/if}}
{{else}}
<h3>Entity has no attributes</h3>
{{/if}}
</tr>
</table>