mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-09 00:00:01 +01:00
Add conditionals for empty entity or properties
This commit is contained in:
parent
403351d12b
commit
35e63c34fc
10 changed files with 22 additions and 20 deletions
|
@ -1,5 +0,0 @@
|
|||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Component.extend({
|
||||
tagName: 'h2'
|
||||
});
|
|
@ -2,7 +2,6 @@ import Ember from 'ember';
|
|||
|
||||
export default Ember.Route.extend({
|
||||
model() {
|
||||
console.log('entities');
|
||||
return this.store.findAll('entity');
|
||||
}
|
||||
});
|
||||
|
|
|
@ -2,7 +2,6 @@ import Ember from 'ember';
|
|||
|
||||
export default Ember.Route.extend({
|
||||
model(params) {
|
||||
console.log("entity: " + params.entity_id);
|
||||
return this.store.findRecord('entity', params.entity_id);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -2,7 +2,6 @@ import Ember from 'ember';
|
|||
|
||||
export default Ember.Route.extend({
|
||||
model(params) {
|
||||
console.log("property: " + params.property_id);
|
||||
return this.store.findRecord('property', params.property_id);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -11,7 +11,7 @@ body {
|
|||
max-width: 1500px;
|
||||
margin: 0 auto;
|
||||
|
||||
font: 14px 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
font: 16px 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
font-weight: 300;
|
||||
font-smoothing: antialiased;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
|
@ -58,8 +58,6 @@ body {
|
|||
float: left;
|
||||
width: 45%;
|
||||
|
||||
margin-top: 20px;
|
||||
|
||||
padding-top: 10px;
|
||||
/*padding-left: 25px;*/
|
||||
}
|
||||
|
@ -68,8 +66,6 @@ body {
|
|||
float: right;
|
||||
width: 45%;
|
||||
|
||||
margin-top: 20px;
|
||||
|
||||
padding-top: 10px;
|
||||
/*padding-right: 25px;*/
|
||||
}
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
{{entity.id}}
|
|
@ -1,7 +1,11 @@
|
|||
<section id="main">
|
||||
<h2>Entities</h2>
|
||||
{{#if model}}
|
||||
<h2>Entities</h2>
|
||||
|
||||
{{entities-table entities=model}}
|
||||
{{entities-table entities=model}}
|
||||
{{else}}
|
||||
<h2>No entities found</h2>
|
||||
{{/if}}
|
||||
|
||||
{{outlet}}
|
||||
</section>
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
{{entity-title entity=model}}
|
||||
<h3>{{model.id}}</h3>
|
||||
|
||||
{{properties-table entity=model}}
|
||||
{{#if model.properties}}
|
||||
<section id="main-left">
|
||||
{{properties-table entity=model}}
|
||||
</section>
|
||||
|
||||
{{outlet}}
|
||||
<section id="main-right">
|
||||
{{outlet}}
|
||||
</section>
|
||||
{{else}}
|
||||
<h3>No properties</h3>
|
||||
{{/if}}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<p>Select a property</p>
|
|
@ -1 +1,3 @@
|
|||
<p>Select an entity to show it's properties</p>
|
||||
{{#if model}}
|
||||
<p>Select an entity to show it's properties</p>
|
||||
{{/if}}
|
||||
|
|
Loading…
Add table
Reference in a new issue