Sponsor dashboard added, with sponsor component for splash page

This commit is contained in:
Gopesh Tulsyan 2014-05-26 13:51:03 +05:30
parent 643b8b173a
commit ea119a8158
36 changed files with 549 additions and 12 deletions

View file

@ -1,3 +1,33 @@
.row
.col-md-8
%h1 Dashboard for #{@conference.title}
%h1 Dashboard for #{@conference.title}
.col-md-9
= semantic_form_for(@conference, :url => admin_conference_path(@conference.short_title),:html => {:multipart => true}) do |f|
= f.input :title, :hint => "The full name of the conference, such as 'OpenSUSE Conference 2013'"
= f.input :short_title, :hint => "A short title, such as 'osc2013', to be used in URLs"
= f.input :social_tag, :hint => "The hashtag you'll use on Twitter and Google+. Don't include the '#' sign!'"
= f.input :contact_email, :hint => "Contact email address for your conference. Will be used as reply-to address in emails sent out by the system."
= f.inputs :name => "Scheduling" do
= f.input :timezone, :as => :time_zone, :hint => "The conference time zone"
= f.input :start_date, :as => :string, :input_html => { :id => "conference-start-datepicker", :readonly => "readonly" }
= f.input :end_date, :as => :string, :input_html => { :id => "conference-end-datepicker", :readonly => "readonly" }
= f.input :registration_start_date, :as => :string, :input_html => { :id => "conference-reg-start-datepicker", :readonly => "readonly" }
= f.input :registration_end_date, :as => :string, :input_html => { :id => "conference-reg-end-datepicker", :readonly => "readonly" }
= f.inputs :name => "Media" do
- if !@conference.logo.blank?
= image_tag @conference.logo(:thumb)
= f.input :logo, :label => "Conference Logo", :hint => "This will be displayed on the front page."
= f.input :media_type, :as => :select, :label => "Conference Promo Media Type", :class=>"form-control", :collection => Conference.media_types.values, :include_blank => false, :hint => "This media-item will be used to represent this conference at various places in OSEM."
= f.input :media_id, :label => "Conference Promo Media ID", :as => :string
%p{:class => "help-block media-type", :id => "youtube-help"} Go to your YouTube video, click on "share" and copy everything behind http://youtu.be/"
%p{:class => "help-block media-type", :id => "slideshare-help", :style => "display:none"} Go to your SlideShare, click on "share" -> "embed" and copy the id
%p{:class => "help-block media-type", :id => "flickr-help", :style => "display:none"} Go to your flickr image, click on "Grab the link" -> "Show short url" and copy everything behind https://flic.kr/p/
%p{:class => "help-block media-type", :id => "vimeo-help", :style => "display:none"} Go to your vimeo video, click on "share" and copy everything behind http://vimeo.com/
%p{:class => "help-block media-type", :id => "speakerdeck-help", :style => "display:none"} Go to your SpeakerDeck, click on "share" -> "embed" and copy the data-id
%p{:class => "help-block media-type", :id => "instagram-help", :style => "display:none"} Go to your Instagram photo page and copy everything behind instagram.com/p/ (without trailing /# hash symbol)
= f.input :sponsor_email, hint: 'This mail id is used by sponsors to contact organizers'
= f.input :sponsor_description, hint: 'This description will be displayed in sponsor section of splash page'
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
>>>>>>> Sponsor dashboard added, with sponsor component for splash page

View file

@ -0,0 +1,11 @@
= semantic_form_for [:admin, @organization] do |f|
= f.inputs "Basic Information" do
= f.input :title, as: :string
= f.input :email_id, as: :string
= f.input :website_url, as: :string
= f.input :description
- if !@organization.photo.blank?
= image_tag @organization.photo(:thumb)
= f.input :photo
= f.actions do
= f.action :submit, :button_html => {:class => "btn primary"}

View file

@ -0,0 +1,36 @@
.row
.col-md-12
.page-header
%h1
Organizations
- if @organizations
= "(#{@organizations.length})"
= link_to "New Organization", new_admin_organization_path, :class => "btn btn-success pull-right"
.row
.col-md-12
.well
%table.table.table-striped.table-bordered.table-hover#organization
%thead
%th
%b Title
%th
%b Email
%th
%th
%th
- @organizations.each do |organization|
%tr
%td= organization.title
%td= organization.email_id
%td= link_to "Edit", edit_admin_organization_path(organization)
%td= link_to "View", admin_organization_path(organization)
%td=link_to 'Delete',admin_organization_path(organization), :method=> :delete , :data=> {:confirm => 'Are you sure ?'},:class => "btn btn-primary btn-danger"
:javascript
$(document).ready(function() {
$('#organization').dataTable( {
"bPaginate": false,
"bLengthChange": false
} );
} );

View file

@ -0,0 +1,26 @@
%table.table
%tr
%td
%b Title
%td
= @organization.title
%tr
%td
%b Email
%td
= @organization.email_id
%tr
%td
%b Logo
%td
= image_tag(@organization.photo(:thumb), class: 'img-responsive') if @organization.photo?
%tr
%td
%b Description
%td
= @organization.description
%tr
%td
%b Website Url
%td
= @organization.website_url

View file

@ -0,0 +1,7 @@
<div class="nested-fields">
<%= f.inputs do %>
<%= f.input :title %>
<%= f.input :description %>
<%= remove_association_link :sponsorship_level, f %>
<% end %>
</div>

View file

@ -0,0 +1,4 @@
.col-md-9
= semantic_form_for(@conference, :url => admin_conference_sponsorship_level_path(@conference.short_title, @conference.sponsorship_levels)) do |f|
= dynamic_association :sponsorship_levels, "Sponsorship Levels", f
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}

View file

@ -0,0 +1,45 @@
#new-sponsorship-dialog
= semantic_form_for :sponsorship_registration, :html => {:id => "sponsorship-add-form"} do |f|
= f.input :name, :label => "Sponsorship Name"
= f.input :email_id, :label => "Sponsorship Email"
= f.input :organization_id, as: :select, collection: Organization.all
= f.input :sponsorship_level_id, :as => :select, :collection => @conference.sponsorship_levels
= f.input :contact_no, :label => "Phone Number"
= f.input :amount_donated
= f.input :method_of_donation
= f.action :submit, :button_html => { :value => "Save", :class => "btn btn-primary" }
.row
.col-md-12
.pull-right{:style=>"margin-top:20px; margin-bottom:20px;"}
= link_to "New Sponsorship", "#", :id => "new-sponsorship-button", :class => "btn btn-success"
.row
.col-md-12
%h2 Sponsorships
.well
%table.table.table-striped#sponsorships
%thead
%th
Name
%th
Email
%th
Level
%th
Organization
%th
Phone Number
%th
Amount Donated
%th
Method of Donation
%tbody
- @conference.sponsorship_registrations.each do |u|
%tr
%td= u.name
%td= u.email_id
%td= u.sponsorship_level.title if u.sponsorship_level
%td= u.organization.title
%td= u.contact_no
%td= u.amount_donated
%td= u.method_of_donation