From 56df3707d99f9c8aabe893ea1d9057db9fa2e766 Mon Sep 17 00:00:00 2001 From: Kenan Philips Date: Thu, 28 Jul 2016 11:29:13 -0700 Subject: [PATCH 1/2] commit --- app/assets/stylesheets/organizations.scss | 14 ++++++++++++++ app/models/organization.rb | 3 ++- app/views/organizations/_form.html.erb | 7 ++++++- app/views/organizations/show.html.erb | 8 ++++++++ dump.rdb | Bin 0 -> 2276 bytes 5 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 dump.rdb diff --git a/app/assets/stylesheets/organizations.scss b/app/assets/stylesheets/organizations.scss index a6cc171..777d845 100644 --- a/app/assets/stylesheets/organizations.scss +++ b/app/assets/stylesheets/organizations.scss @@ -126,4 +126,18 @@ div.container { #twitter-feed { padding-left: 0; padding-right: 0; + +.organization-logo img { + float: left; + margin-right: 20px; + +} + +.organization-logo h1 { + position: relative; + margin-top: 20px; +} + +.organization-logo { + margin-bottom: 30px; } diff --git a/app/models/organization.rb b/app/models/organization.rb index 7514137..08cb6e1 100644 --- a/app/models/organization.rb +++ b/app/models/organization.rb @@ -21,8 +21,9 @@ class Organization < ActiveRecord::Base after_validation :geocode # Company Avatar - mount_uploader :image, ImageUploader + mount_uploader :logo, ImageUploader # Company Pictures + mount_uploader :image, ImageUploader mount_uploader :image2, ImageUploader mount_uploader :image3, ImageUploader mount_uploader :image4, ImageUploader diff --git a/app/views/organizations/_form.html.erb b/app/views/organizations/_form.html.erb index 751109c..854b6cf 100644 --- a/app/views/organizations/_form.html.erb +++ b/app/views/organizations/_form.html.erb @@ -1,4 +1,4 @@ -<%= simple_form_for @organization do |f| %> +<%= simple_form_for @organization, html: { multipart: true } do |f| %> <%= f.input :name, input_html: {class: "abc"}, label_html: {class: "hey"} %> <%= f.input :address %> <%= f.input :overview %> @@ -11,6 +11,11 @@ <%= f.input :published, as: :boolean, checked_value: true, unchecked_value: false %> <% end %> <%= f.association :technologies, input_html: {class: "chosen-select"} %> + <%= f.input :remote_logo_url, {label: "Upload Logo URL"} %> + + <%= f.file_field :logo %> + <%= f.check_box :remove_logo %> Remove Logo

+ <%= f.file_field :image %> <%= f.file_field :image2 %> <%= f.file_field :image3 %> diff --git a/app/views/organizations/show.html.erb b/app/views/organizations/show.html.erb index df967cb..24bf5cc 100644 --- a/app/views/organizations/show.html.erb +++ b/app/views/organizations/show.html.erb @@ -1,5 +1,13 @@

<%= @organization.name %>

+
+

<%= @organization.address %>

<%= @organization.overview %>

diff --git a/dump.rdb b/dump.rdb new file mode 100644 index 0000000000000000000000000000000000000000..86895ed1b5952507a4713e100f5aefda6d6b8ae4 GIT binary patch literal 2276 zcma)-?{6GO9meO*=X1{S*|?1zC8>LJYbQ~I_dGK@JF|1*#o5k}Hc~=LfFKaMo1L9K zUwl98y}MX$Vq}^k5<5y%A@PD2)O}MDBoHrXg%B@H@=x%hNOv|WDiTPD7l^bZj2)*+ zN+po?&Fru5?mW-)dA@e)Z*kztU=M79RGhR;8xz z4+lTK^l)FhsRO&FYxfu49|VuUCn+$PUTo{O&evq6s-tG?!A#G|bYD6FKq?LZjAy1l zy=tkdY&NaDHErH?MW1c>`TXlUPfZ7MVW4Fm%jYjv0zF?@-1t%~pNHf9mm;~apd)M2 zS}LVLuu~VMuLJ+KO4HxT;C2R7k zRg{;Di1w>KjcRO<`=Ue0S2SHk7OuHe$M7 z8cIgG6)jtNsDXxmFP%9kJ$F_bM@4<{qEA|q%i4KKLeIMH%quQoUfR)b#^O(wJO8?&a zZTz4cBFeQu9(OsR9O)2a-(w-%+DgTHsmEB(wc;`AY^CEJ0DA;kc^pqIL=B~zP2G&0 zXe{Y^(>^EFOrtSxUx*sH-5<@nm?560+9LsSLq!>RYNtSlvR!S(9?X7x_QTAF{Q#Ux z0ni7)^vy4@)4^x_^#9li77m=&Ej9Pms4VN1H)N~QsGrwMP55OvVJvk4TFJc+*fUk@ zsi`*K?7T2tIA%Ph2OY)&j+AE;#2lN#3&Xb06|p5z+;szijn`nYw7BP~D|?>0I%1VC z&j-zN7?iC^B0iISsz=wY6*y$_w=2Byl!mLNl^7B5d%%IQK_7+Gr#=Z~s5BLD@xO$} z#6b+@kf6+?JHnTKv?II`ZspOfSoRM1LHF*R4BFXntU{YP92xPoXA9|KTO&vEKs!C5 zk7#zR^htO0PGbIY7|c!I0$%o7_wcQR)_&k*KTQPMmn?g$k0VzKS0Y&Nrf&5U?iq+6 zf;sIDtZ!!GE_2>p2iLoI*E7_YNFu>(>_}rd>@eG-p=%@0crge?Tq(AlITD}K%i|+} zcgJoFU`IHf!->y1R@v_-HRcGDaQ0u_{u?R8NlsA8xag*DY-Ez0c*fpqvm@PmH}^?O zU5>SDXNP;4O&Jp7BPnK5?|RBpXyWHFk zoj@bz`+rJr^kXL692b~kw>z-b0U5w1-jO%KTibVE-0ue{l#;l%!rrkdASUjmJ)iqF z#}2~M#Odh$?#nk%p8#QY4Y+2~u;U>=b2D<%gF&B@IB#5Ah{5k!Bi7%kp_3{Vchue2YlZZ$x zyx^6u#3l77HUTy=a3B=+j}HOY`b+nv^~7wWQH8JkGkY80?%3^7;)x&(wGggD zH6ww>uBVav>hW&h?X-atbG@8Ln9K0w$ElN@nE6FU4K$LwWzvlI?bS)&UJSu#vn5;k zaHnK~JVBV*$Q*dH5A1*Didi1oT|Q;cbN7yd!RIe-j`sBKW-az$`u!Q2`2w;$2bTW- zT~x5Je^%BOWTjj`(~wnY!6ODJXW*gF0cHL(pe%P%USZ4t Date: Tue, 26 Jul 2016 11:18:58 -0700 Subject: [PATCH 2/2] able to upload a file of your logo --- app/views/organizations/_form.html.erb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/views/organizations/_form.html.erb b/app/views/organizations/_form.html.erb index 854b6cf..0e9017f 100644 --- a/app/views/organizations/_form.html.erb +++ b/app/views/organizations/_form.html.erb @@ -11,10 +11,8 @@ <%= f.input :published, as: :boolean, checked_value: true, unchecked_value: false %> <% end %> <%= f.association :technologies, input_html: {class: "chosen-select"} %> - <%= f.input :remote_logo_url, {label: "Upload Logo URL"} %> - - <%= f.file_field :logo %> - <%= f.check_box :remove_logo %> Remove Logo

+ + <%= f.file_field :logo %>
<%= f.file_field :image %> <%= f.file_field :image2 %>