diff --git a/app/models/user.rb b/app/models/user.rb index 7f696ff6..f59a7328 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -152,6 +152,8 @@ class User < ActiveRecord::Base has_one :political_notebook has_many :notebook_items, :through => :political_notebook + + has_many :contact_congress_letters # has_many :bill_comments def self.human_attribute_name(attr, options = {}) diff --git a/app/views/contact_congress_letters/show.html.haml b/app/views/contact_congress_letters/show.html.haml index 644e7183..5619e678 100644 --- a/app/views/contact_congress_letters/show.html.haml +++ b/app/views/contact_congress_letters/show.html.haml @@ -5,11 +5,16 @@ .contact_congress_letter - if @contact_congress_letter.bill #bill - This letter was sent regarding: - %strong= link_to truncate("#{@contact_congress_letter.bill.typenumber} #{@contact_congress_letter.bill.title_common}", :length => 170), bill_path(@contact_congress_letter.bill) - - if @contact_congress_letter.formageddon_threads.first.formageddon_sender - by - = link_to @contact_congress_letter.formageddon_threads.first.formageddon_sender.login, user_profile_path(@contact_congress_letter.formageddon_threads.first.formageddon_sender.login) + This letter was sent by OpenCongress user + = link_to @contact_congress_letter.formageddon_threads.first.formageddon_sender.login, user_profile_path(@contact_congress_letter.formageddon_threads.first.formageddon_sender.login) + on + = @contact_congress_letter.formageddon_threads.first.created_at.strftime('%B %d, %Y') + = case @contact_congress_letter.disposition when 'support': 'in support of' when 'oppose': 'in opposition to' else 'tracking' end + %strong + = "#{link_to(truncate(@contact_congress_letter.bill.typenumber + ' ' + @contact_congress_letter.bill.title_common, :length => 170), bill_path(@contact_congress_letter.bill))}.".html_safe + Privacy setting: + = @contact_congress_letter.formageddon_threads.first.privacy + #recipients{ :class => "num#{@contact_congress_letter.formageddon_threads.size}" } .to To: %ul diff --git a/app/views/profile/actions.html.erb b/app/views/profile/actions.html.erb index 630940f2..422d87fb 100644 --- a/app/views/profile/actions.html.erb +++ b/app/views/profile/actions.html.erb @@ -19,6 +19,40 @@
+ +

<%= user_name("My","'s") %> Letters to Congress

+<% if @user.contact_congress_letters.empty? %> +

No letters to Congress written yet.

+<% else %> + + + +<% end %> +

<%= user_name("My","'s") %> Comments

<%= will_paginate(@my_comments) %>

<% if @my_comments.empty? %> diff --git a/public/stylesheets/contact_congress_letters.css b/public/stylesheets/contact_congress_letters.css index c3453991..5ff41161 100644 --- a/public/stylesheets/contact_congress_letters.css +++ b/public/stylesheets/contact_congress_letters.css @@ -1101,10 +1101,11 @@ padding-bottom: 0px; text-align: center; font-size: 16px; height: 30px; +line-height: 1.5em; padding-top: 20px ; padding-bottom: 40px ; - -width: 100%; +margin: 0 auto; +width: 60%; } #comments-container{