From e51c877b1cceb89e8f05a75db13746d18eb31fba Mon Sep 17 00:00:00 2001 From: skullbocks Date: Sun, 27 Jul 2014 23:55:00 +0200 Subject: [PATCH] [WebUI #7] Modified components --- .../templates/components/list_tiles.html.ep | 2 - assets/templates/components/menu.html.ep | 28 ++++----- assets/templates/components/scripts.html.ep | 2 +- .../templates/components/show_tiles.html.ep | 57 +++++-------------- 4 files changed, 29 insertions(+), 60 deletions(-) diff --git a/assets/templates/components/list_tiles.html.ep b/assets/templates/components/list_tiles.html.ep index 56923aa..71bb445 100644 --- a/assets/templates/components/list_tiles.html.ep +++ b/assets/templates/components/list_tiles.html.ep @@ -1,5 +1,3 @@ -% my $tiles_per_row=4; -% my $rows= ceil((scalar @$tiles)/$tiles_per_row); % my @items=@$tiles;
% foreach my $tile (@items) { diff --git a/assets/templates/components/menu.html.ep b/assets/templates/components/menu.html.ep index 67d13bb..ea4ffad 100644 --- a/assets/templates/components/menu.html.ep +++ b/assets/templates/components/menu.html.ep @@ -14,35 +14,35 @@
diff --git a/assets/templates/components/scripts.html.ep b/assets/templates/components/scripts.html.ep index fc344e6..2ef1855 100644 --- a/assets/templates/components/scripts.html.ep +++ b/assets/templates/components/scripts.html.ep @@ -4,7 +4,7 @@ \ No newline at end of file diff --git a/assets/templates/components/show_tiles.html.ep b/assets/templates/components/show_tiles.html.ep index b61be34..fe6eb35 100644 --- a/assets/templates/components/show_tiles.html.ep +++ b/assets/templates/components/show_tiles.html.ep @@ -3,12 +3,12 @@
- + params) "' %>> %= tag h2 => (id => $tile->id), (class => 'tile-heading') => $tile->title
@@ -20,47 +20,18 @@ % } else { % # Tiles Grid
-
-
-
-
-
-

- % if ($tile->type eq "toggle"){ - - <%= $tile->title =%> - - % } else { - - <%= $tile->title =%> - - %} -

-
-
-
-
-
-
- - % if ($tile->type ne "toggle"){ - - % } elsif ($tile->type eq "toggle" && $tile->status == "0") - - % } else { - - % } - -
-
-
-
-
- % if(defined $tile->picture()) { - %= image '/thumb/'.$tile->title.'.jpg' => (class => 'img-responsive') , width=> '260px', alt => $tile->title, itemprop => "image" - % } else { - %= image '/thumb/no-image.jpg' => (class => 'img-responsive') , width=> '260px', alt => $tile->title, itemprop => "image" - % } + % my $class = "tile-default tile-detail"; + % my $data-post = "/tile-detail/".$tile->title; + % if ($tile->toggle == 1) { + % $class = "tile-toggle command"; + % $class .= (exists $tile->status && $tile->status == 1) ? "tile-status-on"; + % $data-post = "/command/".$tile->title; + % } +
> +

<%= $tile->title %>

+

<% #glipycon light-bulb %>

+

<%= $tile->gpio %>

+

<%= $tile->room %>

% } \ No newline at end of file