added some stuff
This commit is contained in:
parent
0489045aee
commit
2708b8ad28
|
@ -13,7 +13,12 @@ ul.building-showcase{
|
|||
position: relative;
|
||||
transition-property: left, right, top;
|
||||
width: 200px;
|
||||
height: 250px;
|
||||
height: 275px;
|
||||
|
||||
.actions {
|
||||
text-align: center;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.shade {
|
||||
background-color: #000000;
|
||||
|
@ -31,7 +36,7 @@ ul.building-showcase{
|
|||
}
|
||||
|
||||
p {
|
||||
bottom: 0;
|
||||
bottom: 30px;
|
||||
color: #f2f2f2;
|
||||
font-family: "Playfair Display SC",sans-serif;
|
||||
font-size: 30px;
|
||||
|
@ -46,7 +51,7 @@ ul.building-showcase{
|
|||
}
|
||||
|
||||
img {
|
||||
height: 100%;
|
||||
height: 250px;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,20 @@
|
|||
class SpacesController < ApplicationController
|
||||
def index
|
||||
buildings = Building.all.collect do |building|
|
||||
floors = building.floors.collect do |floor|
|
||||
image = (!floor.layout_image.nil? ? floor.layout_image.url : "/assets/no-layout.jpg")
|
||||
{
|
||||
"floor-title" => floor.title,
|
||||
"floor-image" => image,
|
||||
"alt-title" => floor.title,
|
||||
"link_to_show" => OrbitHelper.url_to_show(floor.to_param)
|
||||
}
|
||||
end
|
||||
{
|
||||
"building-title" => building.title,
|
||||
"building-image" => building.image.url,
|
||||
"alt-title" => building.title
|
||||
"alt-title" => building.title,
|
||||
"floors" => floors
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ class Floor
|
|||
field :layout
|
||||
|
||||
mount_uploader :layout_image, ImageUploader
|
||||
mount_uploader :frontend_image, ImageUploader
|
||||
|
||||
belongs_to :building
|
||||
has_many :floor_units, :dependent => :destroy
|
||||
|
|
|
@ -4,4 +4,7 @@
|
|||
<div class="shade"></div>
|
||||
<p><%= building.title %></p>
|
||||
</a>
|
||||
<div class="actions">
|
||||
<a href="#">Edit</a> | <a href="#">Delete</a>
|
||||
</div>
|
||||
</li>
|
|
@ -42,6 +42,12 @@
|
|||
<input type="file" placeholder="Floor1" id="floor-name-text-box" name="floor[layout_image]" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label for="floor-name-text-box" class="control-label muted">Frontend Image</label>
|
||||
<div class="controls">
|
||||
<input type="file" placeholder="Floor1" id="floor-name-text-box" name="floor[frontend_image]" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
|
Loading…
Reference in New Issue