Permalink
Browse files

added some styling, fixed some views

  • Loading branch information...
1 parent 63bf611 commit 62b6bd503572e2d3483688ba4772aac89c23982e @imathis imathis committed Apr 23, 2011
@@ -0,0 +1,12 @@
+<% title "Companies" %>
+
+<p><%= link_to "New Company", new_company_path %></p>
+<div class="companies">
+ <% @companies.each do |company| %>
+ <div class="company">
+ <h4><%= link_to company.name, company %></h4>
+ <%= render :partial => "phone_numbers/list", :object => company.phone_numbers %>
+ <%= render :partial => "email_addresses/list", :object => company.email_addresses %>
+ </div>
+ <% end %>
+</div>
@@ -1,4 +1,10 @@
<div class="company">
+ <ul class="actions">
+ <li><%= link_to "Edit", edit_company_path(@company) %></li>
+ <li><%= link_to "Destroy", @company, :confirm => 'Are you sure?', :method => :delete %></li>
+ <li><%= link_to "View All", companies_path %></li>
+ </ul>
+
<% title @company.name %>
<%= render :partial => 'phone_numbers/phone_numbers', :object => @company.phone_numbers %>
@@ -7,9 +13,4 @@
<%= render :partial => 'email_addresses/email_addresses', :object => @company.email_addresses %>
<%= link_to "Add a New Email Address", new_email_address_path(:company_id => @company), :id => "new_email_address" %>
- <ul>
- <li><%= link_to "Edit", edit_company_path(@company) %></li>
- <li><%= link_to "Destroy", @company, :confirm => 'Are you sure?', :method => :delete %></li>
- <li><%= link_to "View All", companies_path %></li>
- </p>
-</div>
+</div>
@@ -0,0 +1,9 @@
+<ul class='email_addresses'>
+ <% list.each do |email_address| %>
+ <li>
+ <%= email_address.address%>
+ <%= link_to "edit", edit_email_address_path(email_address) %>
+ <%= link_to "delete", email_address_path(email_address), :method => :delete, :id => "delete_email_address_#{email_address.id}" %>
+ </li>
+ <% end %>
+</ul>
@@ -2,15 +2,17 @@
<html>
<head>
<title><%= content_for?(:title) ? yield(:title) : "Untitled" %></title>
- <%= stylesheet_link_tag "application" %>
+ <%= stylesheet_link_tag "screen" %>
<%= javascript_include_tag :defaults %>
<%= csrf_meta_tag %>
<%= yield(:head) %>
</head>
<body>
<div id="container">
<% flash.each do |name, msg| %>
- <%= content_tag :div, msg, :id => "flash_#{name}" %>
+ <div class="flash">
+ <%= content_tag :div, msg, :id => "flash_#{name}" %>
+ </div>
<% end %>
<%= content_tag :h1, yield(:title) if show_title? %>
<%= yield %>
@@ -1,8 +1,9 @@
<% title "Edit #{@person.last_name}, #{@person.first_name}" %>
-<%= render 'form' %>
-
<ul class="actions">
- <li><%= link_to "Show", @person %></li>
<li><%= link_to "View All", people_path %></li>
-</p>
+ <li><%= link_to "Show", @person %></li>
+</ul>
+
+<%= render 'form' %>
+
@@ -1,18 +1,18 @@
<% title "People" %>
+<p><%= link_to "New Person", new_person_path, :id => "new_person" %></p>
+
<div class="people">
<% @people.each do |person| %>
- <div class="company">
+ <div class="person">
<h4><%= person.last_name %>, <%= person.first_name %></h4>
<%= render :partial => 'phone_numbers/phone_numbers', :object => person.phone_numbers %>
- <%= render :partial => 'email_addresses/email_addresses', :object => person.email_addresses %>
- <ul class="actions">
+ <%= render :partial => 'email_addresses/email_addresses', :object => person.email_addresses %>
+ <ul>
<li><%= link_to "Show", person %></li>
<li><%= link_to "Edit", edit_person_path(person) %></li>
<li><%= link_to "Destroy", person, :confirm => 'Are you sure?', :method => :delete %></li>
</ul>
</div>
<% end %>
-</table>
-
-<p><%= link_to "New Person", new_person_path, :id => "new_person" %></p>
+</div>
@@ -1,15 +1,16 @@
<div class="person">
<% title "#{@person.last_name}, #{@person.first_name}" %>
+ <ul class="actions">
+ <li><%= link_to "Edit", edit_person_path(@person) %></li>
+ <li><%= link_to "Destroy", @person, :confirm => 'Are you sure?', :method => :delete %></li>
+ <li><%= link_to "View All", people_path %></li>
+ </ul>
+
<%= render :partial => 'phone_numbers/phone_numbers', :object => @person.phone_numbers %>
<%= link_to "Add a New Phone Number", new_phone_number_path(:person_id => @person.id ) %>
<%= render :partial => 'email_addresses/email_addresses', :object => @person.email_addresses %>
<%= link_to "Add a New Email Address", new_email_address_path(:person_id => @person.id ), :id => "new_email_address" %>
- <ul class="actions">
- <li><%= link_to "Edit", edit_person_path(@person) %></li>
- <li><%= link_to "Destroy", @person, :confirm => 'Are you sure?', :method => :delete %></li>
- <li><%= link_to "View All", people_path %></li>
- </ul>
-</div>
+</div>
@@ -0,0 +1,9 @@
+<ul class='phone_numbers'>
+ <% list.each do |phone_number| %>
+ <li>
+ <%= phone_number.number%>
+ <%= link_to "edit", edit_phone_number_path(phone_number) %>
+ <%= link_to "delete", phone_number_path(phone_number), :method => :delete, :id => "delete_phone_number_#{phone_number.id}" %>
+ </li>
+ <% end %>
+</ul>
View
@@ -0,0 +1,21 @@
+# Require any additional compass plugins here.
+# Set this to the root of your project when deployed:
+#require "fancy-buttons"
+
+http_path = "/"
+css_dir = "public/stylesheets"
+sass_dir = "public/sass"
+images_dir = "public/images"
+javascripts_dir = "javascripts"
+# You can select your preferred output style here (can be overridden via the command line):
+output_style = :compressed
+# To enable relative paths to assets via compass helper functions. Uncomment:
+# relative_assets = true
+# To disable debugging comments that display the original location of your selectors. Uncomment:
+line_comments = false
+
+# If you prefer the indented syntax, you might want to regenerate this
+# project again passing --syntax sass, or you can uncomment this:
+# preferred_syntax = :sass
+# and then run:
+# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,47 @@
+html {
+ background: $bg;
+ @include background-size(80px 80px);
+ @include background-image(linear-gradient(left top, rgba(#fff, .1) 25%, rgba(#fff, 0) 25%, rgba(#fff, 0) 50%, rgba(#fff, .1) 50%, rgba(#fff, .1) 75%, rgba(#fff, 0) 75%, rgba(#fff, 0)));
+}
+body {
+ font-family: "Helvetica Neue", Helvetica, Arial, sans;
+ background: #fff;
+ margin: 50px auto 30px;
+ color: $text;
+ padding: 20px;
+ width: 85%;
+ min-width: 600px;
+ max-width: 1250px;
+ min-height: 380px;
+ position: relative;
+ line-height: 1.25em;
+ @include box-sizing(border-box);
+ @include border-radius(6px);
+ @include background-clip(padding-box);
+ &:before {
+ content: " ";
+ z-index: -2;
+ position: absolute;
+ left: -4px; right: 8px; top: 8px;
+ height: 260px;
+ background: darken($header, 4);
+ @include border-radius(6px);
+ @include box-shadow(rgba(#000, .15) -2px 3px 3px);
+ @include background-clip(padding-box);
+ @include transform(rotate(-2deg));
+ }
+ &:after {
+ content: " ";
+ @include stretch;
+ bottom: 2px;
+ @include border-radius(6px);
+ background: #000;
+ z-index: -1;
+ @include box-shadow(rgba(#000, .3) 0 2px 5px 1px);
+ }
+}
+
+#container {
+ position: relative;
+ z-index: 1;
+}
@@ -0,0 +1,5 @@
+@mixin gradient-bg($color, $contrast: 5, $color2: false) {
+ $c1: adjust-color($color, $lightness: $contrast);
+ $c2: if($color2, $color2, adjust-color($color, $lightness: -$contrast));
+ @include background-image(linear-gradient($c1, $c2));
+}
@@ -0,0 +1,32 @@
+.people {
+ .person:first-child {
+ &:after {
+ content: " ";
+ background: #fff;
+ position: absolute;
+ left: 0; right: 0;
+ top: 90px; height: 95%;
+ min-height: 270px;
+ display: block;
+ font-size: 1.8em;
+ z-index: -1;
+ }
+ }
+ &:before {
+ content: "No one is here. You should probably fix that :)";
+ text-align: center;
+ line-height: 240px;
+ font-size: 1.8em;
+ position: absolute;
+ top: 100px; left: 0; right: 0;
+ height: 86%;
+ min-height: 260px;
+ @include box-sizing(border-box);
+ z-index: -1;
+ background: #eee;
+ color: #aaa;
+ border: 1px dashed #ddd;
+ @include border-radius(1em);
+ text-shadow: #fff 1px 1px 0;
+ }
+}
@@ -0,0 +1,8 @@
+$bg: adjust-hue(desaturate(#b0dbe8, 10), 10);
+$bg: change-color(#c7e491, $hue: 50);
+$bg: #d3dd8a;
+$header: adjust-color($bg, $lightness: 15, $saturation: -5);
+$header: #324e6a;
+$light: #6c7c9a;
+$text: #2d4159;
+$link: $text;
Oops, something went wrong.

0 comments on commit 62b6bd5

Please sign in to comment.