Skip to content
Snippets Groups Projects
Commit 44c7fe21 authored by Tyler Lemburg's avatar Tyler Lemburg
Browse files

Add images and service space requests for home page

parent 02cf4e5f
No related branches found
No related tags found
No related merge requests found
require 'active_record'
require 'models/user'
class AddSuperAdminAndImages < ActiveRecord::Migration
def up
add_column :users, :is_super_admin, :boolean, :default => false
add_column :service_spaces, :imagedata, :blob
create_table :service_space_requests do |t|
t.string :name
t.string :url_name
t.string :description
t.integer :user_id
end
User.reset_column_information
tyler = User.find_by(:username => 's-tlembur1')
tyler.is_super_admin = true
tyler.save
end
def down
remove_table :service_space_requests
remove_column :service_spaces, :imagedata
remove_column :users, :is_super_admin
end
end
\ No newline at end of file
......@@ -3,6 +3,10 @@ require 'active_record'
class ServiceSpace < ActiveRecord::Base
has_many :users
def image_src
"/service_space/images/#{id}/"
end
def href
"/#{self.url_name}/"
end
......
require 'active_record'
class ServiceSpaceRequest < ActiveRecord::Base
end
\ No newline at end of file
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_2_1_" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="-408.8 247.4 300 300" enable-background="new -408.8 247.4 300 300" xml:space="preserve">
<g>
<path fill="#231F20" d="M-228.7,419l-2.3,0.2v23.6c0.9,0.1,1.5,0.2,2.7,0.2c4.6,0,6.1-2.5,7.9-7l1.1,0.4l-1.6,8.5
c-1.8-0.5-2-0.5-4-0.5h-11.2V443l2-0.3v-23.5l-2-0.2v-1.4h7.5L-228.7,419L-228.7,419z"/>
<path fill="#231F20" d="M-214.7,442.7l1.6,0.3v1.3h-5.9V443l1.7-0.3v-13.1c0-0.9-0.3-1.4-0.9-1.4c-0.3,0-0.5,0.1-0.8,0.2v-1.2
l4.3-1.6V442.7z M-216.1,421.5c-1,0-1.8-0.9-1.8-2.1c0-1.2,0.8-2.1,1.9-2.1c1,0,1.7,1,1.7,2.2
C-214.3,420.6-215.1,421.5-216.1,421.5z"/>
<path fill="#231F20" d="M-207.7,428.5c1-1.7,2.8-2.8,4.5-2.8c3.7,0,4.9,3.2,4.9,7v10l1.6,0.3v1.3h-5.9V443l1.7-0.3v-10
c0-3.4-1-5.2-3-5.2c-1.5,0-3,1-3.8,2.6v12.6l1.7,0.3v1.3h-6V443l1.7-0.3v-11.3c0-2.5-0.3-3.2-1.2-3.2c-0.1,0-0.3,0-0.5,0.1V427
l3.2-1.6C-208.2,426.3-207.8,427.2-207.7,428.5z"/>
<path fill="#231F20" d="M-189.5,445c-4,0-6.7-3.6-6.7-8.9c0-5.8,3.3-10.4,7.4-10.4c2.4,0,4.4,1.4,4.4,3.2c0,1.2-0.8,2.1-1.7,2.1
c-0.9,0-1.7-0.9-1.9-2.1c-0.3-1.5-0.4-1.6-1.4-1.6c-2.4,0-4.2,3.1-4.2,7.2c0,4.6,2.3,8.1,5.4,8.1c1.5,0,2.4-0.8,3.7-2.9l0.8,0.7
C-185.1,443.4-187.1,445-189.5,445z"/>
<path fill="#231F20" d="M-172.3,435.1c0,5.4-1.4,8.4-3.9,8.4c-2.8,0-4-2.7-4-8.5c0-5,1.6-8,4.2-8
C-173.8,427-172.3,430.1-172.3,435.1z M-169.2,435.5c0-5.5-3-9.8-6.8-9.8c-4,0-7.3,4.4-7.3,9.5c0,5.4,3.1,9.8,7.1,9.8
C-172.5,445-169.2,440.5-169.2,435.5z"/>
<path fill="#231F20" d="M-164.8,442.7l1.7,0.3v1.3h-6V443l1.7-0.3v-21.4c0-1.8-0.3-2.4-1-2.4c-0.2,0-0.2,0-0.7,0.1v-1.4l4.3-2
C-164.8,415.7-164.8,442.7-164.8,442.7z"/>
<path fill="#231F20" d="M-157.7,428.5c1-1.7,2.8-2.8,4.5-2.8c3.7,0,4.9,3.2,4.9,7v10l1.6,0.3v1.3h-5.8V443l1.7-0.3v-10
c0-3.4-1-5.2-3-5.2c-1.5,0-3,1-3.8,2.6v12.6l1.7,0.3v1.3h-6V443l1.7-0.3v-11.3c0-2.5-0.3-3.2-1.2-3.2c-0.1,0-0.3,0-0.5,0.1V427
l3.2-1.6C-158.1,426.3-157.8,427.2-157.7,428.5z"/>
<path fill="#231F20" d="M-288.3,354.8v7.5c0,1.8,0.1,2.3,0.4,2.9c0.4,0.8,1.2,1.2,2.2,1.2c1.1,0,2-0.6,2.3-1.5
c0.2-0.5,0.3-1.1,0.3-2.6v-7.5h1.4v7.5c0,2-0.1,2.7-0.6,3.5c-0.7,1.2-1.8,1.8-3.4,1.8c-1.8,0-3.1-0.8-3.6-2.2
c-0.3-0.7-0.4-1.4-0.4-3.1v-7.5L-288.3,354.8L-288.3,354.8z"/>
<polygon fill="#231F20" points="-271,367.4 -272.4,367.4 -278.2,357.2 -278.2,367.4 -279.5,367.4 -279.5,354.8 -278.2,354.8
-272.4,365.1 -272.4,354.8 -271,354.8 "/>
<rect x="-268.5" y="354.8" fill="#231F20" width="1.4" height="12.6"/>
<polygon fill="#231F20" points="-260.8,364.9 -257.2,354.8 -255.9,354.8 -260.4,367.4 -261.3,367.4 -265.3,354.8 -263.9,354.8 "/>
<polygon fill="#231F20" points="-248.9,360.4 -248.9,361.6 -252.7,361.6 -252.7,366.2 -248.4,366.2 -248.4,367.4 -254.1,367.4
-254.1,354.8 -248.9,354.8 -248.9,356 -252.7,356 -252.7,360.4 "/>
<path fill="#231F20" d="M-245,360.5V356h1.4c1.1,0,1.6,0.6,1.6,2c0,0.9-0.3,1.7-0.7,2.1c-0.4,0.3-0.7,0.4-1.4,0.4H-245z
M-246.4,367.4h1.4v-5.8h1.2l3,5.8h1.5l-3.2-5.9c0.6-0.3,0.9-0.4,1.2-0.8c0.5-0.7,0.9-1.7,0.9-2.7c0-1.3-0.5-2.3-1.3-2.8
c-0.4-0.3-1-0.4-2.1-0.4h-2.6L-246.4,367.4L-246.4,367.4z"/>
<path fill="#231F20" d="M-233.6,357.3c-0.4-1.1-0.9-1.5-1.7-1.5c-0.9,0-1.5,0.8-1.5,1.9c0,1,0.3,1.5,1.8,2.5c1,0.7,1.4,1.1,1.8,1.5
c0.5,0.5,0.7,1.3,0.7,2.2c0,2.2-1.3,3.7-3.3,3.7c-1.3,0-2.3-0.6-2.9-1.9l0.9-1.2c0.4,1.2,1.1,1.9,2,1.9c1.1,0,1.8-0.9,1.8-2.3
c0-0.7-0.2-1.2-0.6-1.6c-0.3-0.3-0.3-0.3-1.3-1c-1.8-1.3-2.4-2.2-2.4-3.6c0-1.9,1.2-3.3,2.9-3.3c1.2,0,2,0.5,2.6,1.7L-233.6,357.3z
"/>
<rect x="-230.3" y="354.8" fill="#231F20" width="1.4" height="12.6"/>
<polygon fill="#231F20" points="-222.1,367.4 -223.5,367.4 -223.5,356 -226.5,356 -226.5,354.8 -219.2,354.8 -219.2,356
-222.1,356 "/>
<polygon fill="#231F20" points="-209.4,354.8 -212.8,361.8 -212.8,367.4 -214.2,367.4 -214.2,361.8 -217.7,354.8 -216.3,354.8
-213.5,360.3 -210.7,354.8 "/>
<path fill="#231F20" d="M-185.4,355.8c2.1,0,3.4,2,3.4,5.3c0,3.3-1.3,5.4-3.4,5.4c-2.2,0-3.5-2-3.5-5.4
C-188.9,357.8-187.6,355.8-185.4,355.8z M-185.4,354.6c-3.1,0-5,2.4-5,6.4c0,2.4,0.5,3.9,1.5,5.1c0.9,1,2,1.5,3.5,1.5
c1.4,0,2.6-0.5,3.5-1.5c1-1.2,1.5-2.8,1.5-5C-180.5,357-182.3,354.6-185.4,354.6z"/>
<polygon fill="#231F20" points="-173.2,360.5 -173.2,361.7 -176.5,361.7 -176.5,367.4 -177.9,367.4 -177.9,354.8 -172.9,354.8
-172.9,356 -176.5,356 -176.5,360.5 "/>
<path fill="#E21937" d="M-344.9,353.8v1.6l1,0.2c4.5,0.9,5.2,1,5.2,6.4c0,0,0,29.8,0,32.2c-1.3-2.1-24.2-40.4-24.2-40.4h-12.3v1.7
l1.2,0.1c4.7,0.4,5.3,0.4,5.3,5.8v40.2c0,4.9-0.8,5-4.8,5.6l-1.7,0.2l0,0.3v1.6h17v-1.9l-1.9-0.3c-4.1-0.6-4.8-0.7-4.8-5.5
c0,0,0-31.6,0-34c1.3,2,26.4,41.7,26.4,41.7h3.6v-47.6c0-4.8,0.7-5,4.3-6l0.8-0.2v-1.7L-344.9,353.8L-344.9,353.8z"/>
<path fill="#E21937" d="M-286.4,371.9c-3.9,0-6.7,1.5-9.2,4.7c0-2,0-26.8,0-26.8l-0.5,0.2l-10.2,3.8v1.9l0.5-0.1
c0.8-0.2,1.1-0.2,1.4-0.2c1.6,0,2.2,0.7,2.2,4.5v34.8c0,7.4-0.4,10.1-2.1,14.6l-0.1,0.3l2,1.1c0,0,4-4.8,4.6-5.4
c2.2,3.7,5.5,5.6,9.7,5.6c8.5,0,15.1-8.9,15.1-20.3C-273,379.4-278.4,371.9-286.4,371.9z M-288.8,406.7c-5.3,0-6.8-2.9-6.8-12.9
c0,0,0-12.5,0-12.8c2.2-2.6,4.1-3.6,6.3-3.6c5.6,0,9.8,6.8,9.8,15.8C-279.5,401.4-283.1,406.7-288.8,406.7z"/>
<path fill="#E21937" d="M-144.8,403.2l-0.2,0.3c-1.1,1.4-1.5,1.6-2.1,1.6c-0.8,0-1.4-1.4-1.4-3.4v-16.9c0-4.6-0.8-6.7-3.1-8.6
c-6.4-5.2-13.2-5.2-15.4-5.1c-6.6-0.3-22.9,9-27.2,19.8c0-6.2,0-5.8,0-40.9l-10.3,3.9v2l0.5-0.1c0.5-0.1,1-0.2,1.5-0.2
c1.3,0,1.8,0.5,1.8,3.8c0,0,0,47.2,0,47.8c-0.5,0.1-3.8,0.5-3.8,0.5v2.2h14.1v-2.2c0,0-3.3-0.5-3.8-0.5c0-8.1,0.4-10.2,5-16.7
c0.5,1,8.4,15.8,8.9,16.7c-0.8,0.1-3.6,0.5-3.6,0.5v2.2h15.5c1.3,0.5,2.7,0.8,4.1,0.8c4.1,0,7.9-2.4,10-6.2
c0.3,3.9,2.2,6.2,5.3,6.2c1.7,0,4.1-1.9,6.5-5.1l0.2-0.3L-144.8,403.2z M-174.6,400.6c0,2.4,0.8,4.7,2.2,6.4
c-0.4-0.1-0.8-0.1-0.9-0.1c-0.2-0.3-11.9-21.6-12.2-22.1c2.1-2.8,7.8-7.4,12.1-7.9c1.2-0.1,2-0.2,2.2,0c0.8,1.2,2.7,1.1,2.7,1.1
c0.4,0,2.7,0.3,4.7-3c0,0,0.1-0.5,1.3-0.5c5.1,0,7.1,5.9,7.2,9.8C-162.6,386.8-174.6,390.7-174.6,400.6z M-155.3,400.9
c-2.2,2.6-4.6,4-6.7,4c-3.3,0-5.6-2.7-5.6-6.3c0-6.8,6.8-9.1,12.2-10.9c0,0,0.1,0,0.1,0C-155.3,388.6-155.3,400.7-155.3,400.9z"/>
<path fill="#E21937" d="M-306.2,398.9l-0.2,0.3c-2.9,4.2-5.3,5.9-8.7,5.9c-5.5,0-9.9-4.9-11.1-12.1c0.6-0.2,22.2-6,22.2-6l0-0.3
c-1.1-9.3-6.2-14.8-13.8-14.8c-8.4,0-15.3,9.3-15.3,20.7c0,10.4,6.6,18,15.7,18c5.9,0,10.2-3.1,13.3-9.6l0.1-0.3L-306.2,398.9z
M-317.9,375.4c3.5,0,5.8,2.7,5.8,6.7c0,2.1-0.7,3.3-4.6,4.3c0,0-8,2-10,2.5C-326.5,380.6-323.2,375.4-317.9,375.4z"/>
<path fill="#E21937" d="M-211.8,387.4c-8.1-3.5-8.7-4-8.7-7.2c0-2.5,2.3-4.6,5.1-4.6c0,0,2.4-0.1,2.7,1c0.1,0.4,1.1,3.6,4.9,2.8
c1.7-0.3,2.3-1.9,2.3-3.1c0.1-2.2-2.6-4.4-6.6-4.4c-8.2,0-14.3,4.8-14.3,11.1c0,5.9,4.9,8.2,9.6,10.3c4.1,1.9,8,3.6,8,7.8
c0,3.3-2.9,5.9-6.4,5.9c-3.6,0-4.8-1.8-5.1-4.4c-0.3-2.6-2.4-3.3-4.2-3.3c-2-0.1-3.5,1.4-3.7,3.8c0,0.5,0,0.6,0.2,1
c-0.8,0.9-1.2,1.1-1.7,1.1c-0.8,0-1.4-1.4-1.4-3.4l0-16.9c0-4.6-0.8-6.7-3.1-8.6c-3.9-3.5-11.8-6.3-18.3-5
c-3.6,0.8-9.5,5.2-12.3,12.6c-0.2-5.8-0.8-8.1-2.8-12l-0.2-0.3l-7.2,3.4v1.5l0.8-0.2l0.4-0.1c2.2,0,3.2,2.8,3.2,9
c0,0,0,21.2,0,21.8c-0.5,0.1-3.9,0.6-3.9,0.6v1.9h14.5v-1.9c0,0-3.5-0.5-4.1-0.5c0-0.6,0.1-8.4,0.1-8.4c1-17.7,4.9-19.6,6.6-20.6
c1.4-0.9,3.5-1,3.6-0.8c0.8,1.2,2.7,1.1,2.7,1.1c0.5,0,2.8,0.2,4.7-3c0,0,0.1-0.5,1.3-0.5c5.1,0,7.1,5.9,7.2,9.8l0.1,0c0,0,0,0,0,0
c-7.3,2.4-19.3,6.3-19.3,16.2c0,5.8,4.1,9.9,10,9.9c4.1,0,7.9-2.4,10-6.2c0.3,3.9,2.2,6.2,5.3,6.2c1.4,0,3.3-1.3,5.3-3.6
c2.1,2.2,5.8,3.6,10.5,3.6c7.3,0,13.1-5,13.1-11.5C-202.7,394.2-206.1,389.8-211.8,387.4z M-237.6,401.1c-2.2,2.6-4.6,4-6.7,4
c-3.3,0-5.6-2.7-5.6-6.3c0-6.8,6.8-9.1,12.2-10.9c0,0,0.1,0,0.1,0C-237.6,388.8-237.6,400.8-237.6,401.1z"/>
<rect x="-381.8" y="349.9" fill="none" width="246" height="95.2"/>
<g>
<path fill="#231F20" d="M-135.8,415.1c0,2.5-2,4.5-4.5,4.5s-4.5-2-4.5-4.5c0-2.5,2-4.5,4.5-4.5
C-137.8,410.6-135.8,412.6-135.8,415.1z M-143.9,415.1c0,2,1.7,3.7,3.7,3.7c2,0,3.6-1.7,3.6-3.7c0-2-1.6-3.7-3.6-3.7
C-142.3,411.3-143.9,413-143.9,415.1z M-141.8,412.5h1.3c0.6,0,0.9,0,1.1,0.1c0.5,0.2,0.7,0.6,0.7,1.2c0,0.7-0.4,1.2-1.1,1.4
l1.5,2.4h-0.9l-1.4-2.3h-0.5v2.3h-0.8V412.5z M-140.6,414.7c0.8,0,1.1-0.3,1.1-0.9c0-0.5-0.2-0.7-0.8-0.7h-0.3h-0.4v1.6H-140.6z"
/>
</g>
</g>
</svg>
......@@ -74,6 +74,13 @@
}
}
.space-image {
background: lighten(@light-triad, 20%);
border-radius: 1em;
border: 1px solid @dark-triad;
padding: 1em;
}
#notice .message-content a {
text-decoration: underline;
}
......
......@@ -8,8 +8,17 @@
<h5 class="wdn-center wdn-brand">Your Service Spaces</h5>
<div class="wdn-grid-set-thirds">
<% spaces.each do |space| %>
<div class="wdn-col">
<a href="<%= space.href %>"><%= space.name %></a>
<div class="wdn-col wdn-center">
<a href="<%= space.href %>">
<div class="space-image">
<% if space.imagedata.nil? %>
<img src="/images/wordmark02.svg" alt="Image for Space: <%= space.name %>">
<% else %>
<img src="<%= space.image_src %>" alt="Image for Space: <%= space.name %>">
<% end %>
</div>
<%= space.name %>
</a>
</div>
<% end %>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment