Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions app/assets/stylesheets/organizations.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
3 changes: 2 additions & 1 deletion app/models/organization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion app/views/organizations/_form.html.erb
Original file line number Diff line number Diff line change
@@ -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 %>
Expand All @@ -11,6 +11,9 @@
<%= f.input :published, as: :boolean, checked_value: true, unchecked_value: false %>
<% end %>
<%= f.association :technologies, input_html: {class: "chosen-select"} %>
<label>Upload Organization Logo</label>
<%= f.file_field :logo %><br>
<label>Add Your Organization's Photos</label>
<%= f.file_field :image %>
<%= f.file_field :image2 %>
<%= f.file_field :image3 %>
Expand Down
8 changes: 8 additions & 0 deletions app/views/organizations/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
<div class="company-name col-lg-9 col-md-9 col-sm-12 col-xs-12">
<h1><%= @organization.name %></h1>
<div class="company-name col-lg-9 col-md-9 col-sm-9 col-xs-9">
<div class="organization-logo">
<% if @organization.logo_url.present? %>
<%= image_tag @organization.logo_url(:thumb), {alt: "Logo"} %>
<% elsif @organization.logo.present? %>
<%= image_tag @organization.logo.url(:thumb), {alt: "Logo"} %>
<% end %>
</div>
<p><%= @organization.address %></p>
<p><%= @organization.overview %></p>

Expand Down
Binary file added dump.rdb
Binary file not shown.