Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed subdomains

  • Loading branch information...
commit 96cab777aa91455481647f6a1ec959be910ff09d 1 parent a3b1db4
@schadenfred authored
View
6 Gemfile
@@ -85,11 +85,11 @@ group :test do
end
-platforms :ruby do
- gem 'rb-readline'
+# platforms :ruby do
+ # gem 'rb-readline'
# notification support
# gem 'rb-inotify'
# gem 'libnotify'
-end
+# end
View
20 Gemfile.lock
@@ -36,7 +36,7 @@ GEM
jquery-rails
rails (~> 3.1)
bootstrap-forms (0.0.4)
- bootstrap-sass (2.0.1)
+ bootstrap-sass (2.0.2)
bourbon (1.4.0)
sass (>= 3.1)
builder (3.0.0)
@@ -88,10 +88,10 @@ GEM
eventmachine (0.12.10)
execjs (1.3.0)
multi_json (~> 1.0)
- factory_girl (3.0.0)
+ factory_girl (3.1.0)
activesupport (>= 3.0.0)
- factory_girl_rails (3.0.0)
- factory_girl (~> 3.0.0)
+ factory_girl_rails (3.1.0)
+ factory_girl (~> 3.1.0)
railties (>= 3.0.0)
faker (1.0.1)
i18n (~> 0.4)
@@ -119,7 +119,7 @@ GEM
guard-sass (0.5.4)
guard (>= 0.4.0)
sass (>= 3.1)
- guard-spork (0.5.2)
+ guard-spork (0.6.0)
guard (>= 0.10.0)
spork (>= 0.8.4)
haml (3.1.4)
@@ -128,8 +128,8 @@ GEM
activesupport (~> 3.0)
haml (~> 3.0)
railties (~> 3.0)
- headless (0.2.2)
- heroku (2.23.0)
+ headless (0.3.1)
+ heroku (2.24.0)
launchy (>= 0.3.2)
netrc (~> 0.7.1)
rest-client (~> 1.6.1)
@@ -138,7 +138,7 @@ GEM
hpricot (0.8.6)
i18n (0.6.0)
journey (1.0.3)
- jquery-rails (2.0.1)
+ jquery-rails (2.0.2)
railties (>= 3.2.0, < 5.0)
thor (~> 0.14)
json (1.6.6)
@@ -184,7 +184,6 @@ GEM
rdoc (~> 3.4)
thor (~> 0.14.6)
rake (0.9.2.2)
- rb-readline (0.4.2)
rdoc (3.12)
json (~> 1.4)
rest-client (1.6.7)
@@ -194,7 +193,7 @@ GEM
rspec-expectations (~> 2.9.0)
rspec-mocks (~> 2.9.0)
rspec-core (2.9.0)
- rspec-expectations (2.9.0)
+ rspec-expectations (2.9.1)
diff-lcs (~> 1.1.3)
rspec-mocks (2.9.0)
rspec-rails (2.9.0)
@@ -307,7 +306,6 @@ DEPENDENCIES
launchy
pg (= 0.12.2)
rails (= 3.2.3)
- rb-readline
rspec-rails
ruby-debug19
ruby-prof
View
206 app/assets/stylesheets/custom.css.scss
@@ -33,212 +33,6 @@ header {
}
}
}
-/*footer {
- text-align: left;
- margin-top: 10px;
- width: 710px;
- margin-left: auto;
- margin-right: auto;
- nav {
- float: none;
- }
-}*/
-
-
-/*nav {
- float: right;
- display: inline-block;
- padding: 0 0.7em;
- padding: 10px;
- white-space: nowrap;
- font-weight: bold;
-
- ul {
- margin: 0;
- padding: 0;
- background: white;
-
- li {
- list-style-type: none;
- display: inline-block;
- padding: 0 5px;
- font-weight: bold;
- color: grey;
-
- a {
- color: #09c;
- opacity: .6;
- -moz-transition: height 1s ease-out, opacity 2s ease;
- -webkit-transition: height 2s ease-out, opacity 2s ease;
- -o-transition: height 1s ease-out, opacity 1s ease;
- transition: height 1s ease-out, opacity 1s ease;
-
- &:hover {
- text-decoration: none;
- opacity: 1;
- }
-
- &:visited {
- color: #09c;
- }
- }
- }
- }
-}
-*/
-/* links */
-
-/*a {
- color: #09c;
- text-decoration: none;
-
- &:hover {
- color: #09c;
- text-decoration: none;
- }
-
- &:visited {
- color: #09c;
- }
-}
-*/
-/*ul {
- margin-top: 2em;
- margin-bottom: 1em;
-
- li {
- list-style: none;
- }
-}
-*/
-// User show page
-
-.profile {
- width: 100%;
- margin-bottom: 0;
-}
-
-td {
- width: 710px;
-
- &.main {
- width: 65%;
- padding-right: 1em;
- }
-
- &.sidebar {
- width: 35%;
- padding: 1em;
- vertical-align: top;
- background: #ffc;
- }
-}
-
-.profile {
- img.gravatar {
- border: 1px solid #999;
- margin-bottom: -15;
- }
- td {
- margin-bottom: 15px;
- }
-}
-
-div {
- &.field, &.actions {
- margin-bottom: 10px;
- }
-}
-
-h1.thankyou {
- margin-bottom: 0.3em;
-}
-
- Thankyous
-
-table.thankyous {
- margin-top: 1em;
- tr {
- height: 70px;
- td {
- &.gravatar {
- border-top: 1px solid #ccc;
- vertical-align: top;
- width: 50px;
- }
- &.thankyou {
- border-top: 1px solid #ccc;
- vertical-align: top;
- padding-top: 10px;
-
- &.span.timestamp {
- display: block;
- font-size: 85%;
- }
- &.span.content {
- #gravatar {
- margin-bottom: -5em;
- }
- }
- }
- }
- }
-}
-
-div.user_info {
- img {
- padding-right: 0.1em;
- }
-
- a {
- text-decoration: none;
- }
-
- span {
- .user_name {
- position: absolute;
- }
-
- .thankyous {
- font-size: 80%;
- }
- }
-}
-
-form.thankyou {
- margin-bottom: 2em;
-
- textarea {
- height: 4em;
- margin-bottom: 0;
- }
-}
-
-/* Round corners */
-
-.round {
- -moz-border-radius: 10px;
- -webkit-border-radius: 10px;
- border-radius: 10px;
-}
-
-#flash_notice, #flash_alert {
- padding: 5px 8px;
- margin: 10px 0;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- border-radius: 5px;
-}
-
-#flash_notice {
- background-color: #CFC;
-}
-
-#flash_alert {
- background-color: #FCC;
-}
-
-/* Login and Signup buttons -- override Twitter bootstrap defaults */
View
13 app/controllers/thankyous_controller.rb
@@ -33,19 +33,6 @@ def delete
redirect_to thankyous_url, :flash => { :notice => "Thankyou destroyed." }
end
- def thankyous
- @user = current_user
- @thankyous = @user.thankyous.page(params[:page])
- @title = "Thankyous"
-# @thankyou = Thankyou.new if signed_in?
- end
-
- def welcomes
- @user = current_user
- @welcomes = @user.welcomes.page(params[:page])
- @title = "welcomes"
-# @welcome = Welcome.new if signed_in?
- end
def show_thankyous
@user = current_user
View
2  app/views/layouts/application.html.haml
@@ -9,4 +9,6 @@
= render 'shared/flash_messages', :locals => {:flash => flash}
= yield
= render 'layouts/footer'
+ = debug(params) if Rails.env.development?
+
View
24 app/views/thankyous/_thankyou.html.haml
@@ -1,17 +1,11 @@
%tr
- %td.thankyou
- %span.content
- #{gravatar_for thankyou.welcomer, :size => 15}
- | You wrote about #{link_to thankyou.welcomer.name, thankyou.thanker} &mdash;
- %strong
- = thankyou.headline
- "#{thankyou.content}"
- %span.timestamp
- Posted #{time_ago_in_words(thankyou.created_at)} ago.
- - thankyou.attachments.each do |attachment|
- = link_to(attachment.filename, attachment, :target => '_blank')
- |
- = link_to "edit", thankyou_edit_url(thankyou)
- |
- = link_to "delete", thankyou_delete_url(thankyou), :confirm => 'Not feeling it any more, huh?', :method => :delete
+ %td
+ #{gravatar_for thankyou.thanker, :size => 15} | You wrote about #{link_to thankyou.welcomer.name, root_url(subdomain: thankyou.welcomer.subdomain) } &mdash; #{thankyou.headline} #{thankyou.content} "Posted"
+ = time_ago_in_words(thankyou.created_at)
+ ago.
+ - thankyou.attachments.each do |attachment|
+ = link_to(attachment.filename, attachment, :target => '_blank')
+ %td
+ = link_to "edit", thankyou_edit_url(thankyou), class: "btn btn-mini btn-inverse"
+ = link_to "delete", thankyou_delete_url(thankyou), :confirm => 'Not feeling it any more, huh?', :method => :delete, class: "btn btn-mini btn-warning"
View
56 app/views/thankyous/sample.html.haml
@@ -0,0 +1,56 @@
+%table.table.table-bordered.table-striped
+ %colgroup
+ %col.span1
+ %col.span7
+ %thead
+ %tr
+ %th Tag
+ %th Description
+ %tbody
+ %tr
+ %td
+ %code <table>
+ %td
+ Wrapping element for displaying data in a tabular format
+ %tr
+ %td
+ %code <thead>
+ %td
+ Container element for table header rows (
+ %code> <tr>
+ ) to label table columns
+ %tr
+ %td
+ %code <tbody>
+ %td
+ Container element for table rows (
+ %code> <tr>
+ ) in the body of the table
+ %tr
+ %td
+ %code <tr>
+ %td
+ Container element for a set of table cells (
+ %code <td>
+ or
+ = succeed ")" do
+ %code <th>
+ that appears on a single row
+ %tr
+ %td
+ %code <td>
+ %td
+ Default table cell
+ %tr
+ %td
+ %code <th>
+ %td
+ Special table cell for column (or row, depending on scope and placement) labels
+ %br
+ Must be used within a
+ %code <thead>
+ %tr
+ %td
+ %code <caption>
+ %td
+ Description or summary of what the table holds, especially useful for screen readers
View
19 app/views/thankyous/show_thankyous.html.haml
@@ -1,5 +1,5 @@
-.row
- .span3.well
+.row.span12
+ .span2.well
= render 'shared/left_sidebar'
.span8
%h1
@@ -10,11 +10,16 @@
= render 'shared/thankyou_steps'
= render 'shared/thankyou_tips'
- else
- %p
- #{@user.thankyou_phrase}
- %table.thankyous{:summary => "User thankyous"}
- = render @thankyous
- = paginate @thankyous
+ %table.table.table-striped
+ %colgroup
+ %col.span6
+ %col.span2
+ %thead
+ %tr
+ %th= @user.thankyou_phrase
+ %th
+ %tbody
+ = render @thankyous
.span5
= render 'shared/user_info'
%strong Name
View
13 app/views/welcomes/show.html.haml
@@ -9,16 +9,5 @@
- else
%table.welcomes{:summary => "welcomes"}
= render 'thankyou'
- %td.sidebar.round
- %strong Name
- = @user.name
- %br/
- %strong URL
- = link_to user_path(@user), @user
- %br/
- %strong Thankyous
- = @user.thankyous.count
- %br/
- %strong Welcomes
- = @user.thankyous.count
+
View
72 app/views/welcomes/show_welcomes.html.haml
@@ -1,41 +1,33 @@
-%table.profile{:summary => "Profile information"}
- %tr
- %td.main
- %h1
- = gravatar_for @user
- = @user.name
- - if @user.welcomes.empty?
- Nobody has thanked #{you_or_user(@user)} yet.
- = render 'shared/thankyou_steps'
- = render 'shared/thankyou_tips'
- - else
- %p
- #{@user.welcome_phrase}
- %table.thankyous{:summary => "User thankyous"}
- - @welcomes.each do |thankyou|
- %tr
- %td.thankyou
- %span.content
- #{gravatar_for welcome.thanker, :size => 15}
- |
- #{link_to welcome.thanker.name, welcome.thanker} wrote --
- %em
- = welcome.headline
- "#{welcome.content}"
- %span.timestamp
- Thankyou sent #{time_ago_in_words(welcome.created_at)} ago
- %td.sidebar.round
- %strong Name
- = @user.name
- %br/
- %strong URL
- = link_to user_path(@user), @user
- %br/
- %strong
- Thankyous
- = @user.thankyous.count
- %br/
- %strong
- Welcomes
- = @user.welcomes.count
+= gravatar_for @user
+%h1= @user.name
+- if @user.welcomes.empty?
+ Nobody has thanked #{you_or_user(@user)} yet.
+ = render 'shared/thankyou_steps'
+ = render 'shared/thankyou_tips'
+- else
+ %p @user.welcome_phrase
+ %table.table.table-bordered.table-striped
+ %colgroup
+ %col.span1
+ something
+ %col.span7
+ %thead
+ %tr
+ %th
+ %th
+ %tbody
+ %tr
+
+ - @welcomes.each do |thankyou|
+ %tr
+ %td.thankyou
+ %span.content
+ #{gravatar_for welcome.thanker, :size => 15}
+ |
+ #{link_to welcome.thanker.name, welcome.thanker} wrote --
+ %em
+ = welcome.headline
+ "#{welcome.content}"
+ %span.timestamp
+ Thankyou sent #{time_ago_in_words(welcome.created_at)} ago
View
4 lib/tasks/sample_data.rake
@@ -29,8 +29,8 @@ namespace :db do
end
def sample_admin
- admin = User.new( :name => "admin",
- :email => "admin@merciboq.com",
+ admin = User.new( :name => "Fred Schoeneman",
+ :email => "fred.schoeneman@gmail.com",
:password => "password" )
admin.save!
admin.confirm!
Please sign in to comment.
Something went wrong with that request. Please try again.