Merge pull request #861 from sonalkr132/admin-proposal-overflow
Fix overflow of proposal edit in admin area
This commit is contained in:
commit
18645081ac
2 changed files with 46 additions and 46 deletions
|
|
@ -1,45 +1,42 @@
|
||||||
.container
|
.tabbable
|
||||||
.row
|
%ul.nav.nav-tabs
|
||||||
.col-md-12
|
%li.active
|
||||||
.tabbable
|
= link_to 'Proposal', '#proposal-content', 'data-toggle' => 'tab'
|
||||||
%ul.nav.nav-tabs
|
%li
|
||||||
%li.active
|
= link_to 'Commercials', '#commercials-content', 'data-toggle' => 'tab'
|
||||||
= link_to 'Proposal', '#proposal-content', 'data-toggle' => 'tab'
|
.tab-content
|
||||||
%li
|
#proposal-content.tab-pane.active
|
||||||
= link_to 'Commercials', '#commercials-content', 'data-toggle' => 'tab'
|
= render 'proposal/proposal_form'
|
||||||
.tab-content
|
#commercials-content.tab-pane
|
||||||
#proposal-content.tab-pane.active
|
%p.text-muted
|
||||||
= render 'proposal/proposal_form'
|
You can add commercials for your proposal. These commercials will be displayed on the
|
||||||
#commercials-content.tab-pane
|
= link_to 'public proposal page.', conference_program_proposal_path(@conference.short_title, @event)
|
||||||
%p.text-muted
|
If you don't add a commercial, the conference commercial will be displayed!
|
||||||
You can add commercials for your proposal. These commercials will be displayed on the
|
- if can? :create, @event.commercials.new
|
||||||
= link_to 'public proposal page.', conference_program_proposal_path(@conference.short_title, @event)
|
.row
|
||||||
If you don't add a commercial, the conference commercial will be displayed!
|
.col-md-6
|
||||||
- if can? :create, @event.commercials.new
|
#resource-content
|
||||||
.row
|
#resource-placeholder{ style: 'background-color:#d3d3d3; float: left; width: 400px; height: 250px; margin: 5px; border-width: 1px; border-style: solid; border-color: rgba(0,0,0,.2);' }
|
||||||
.col-md-6
|
.row
|
||||||
#resource-content
|
.col-md-6
|
||||||
#resource-placeholder{ style: 'background-color:#d3d3d3; float: left; width: 400px; height: 250px; margin: 5px; border-width: 1px; border-style: solid; border-color: rgba(0,0,0,.2);' }
|
= semantic_form_for(@event.commercials.build, url: conference_program_proposal_commercials_path(conference_id: @conference.short_title, proposal_id: @event)) do |f|
|
||||||
.row
|
= f.input :url, label: 'URL', as: :string, input_html: { required: 'required', type: 'url' },
|
||||||
.col-md-6
|
hint: 'Just paste the url of your video/photo provider. Currently supported: YouTube, Vimeo, SpeakerDeck, SlideShare, Instagram, Flickr.'
|
||||||
= semantic_form_for(@event.commercials.build, url: conference_program_proposal_commercials_path(conference_id: @conference.short_title, proposal_id: @event)) do |f|
|
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary pull-right', disabled: true }
|
||||||
= f.input :url, label: 'URL', as: :string, input_html: { required: 'required', type: 'url' },
|
%hr
|
||||||
hint: 'Just paste the url of your video/photo provider. Currently supported: YouTube, Vimeo, SpeakerDeck, SlideShare, Instagram, Flickr.'
|
- @event.commercials.each_slice(3) do |slice|
|
||||||
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary pull-right', disabled: true }
|
.row
|
||||||
%hr
|
- slice.each do |commercial|
|
||||||
- @event.commercials.each_slice(3) do |slice|
|
- if commercial.persisted?
|
||||||
.row
|
.col-md-4
|
||||||
- slice.each do |commercial|
|
.thumbnail
|
||||||
- if commercial.persisted?
|
.flexvideo{ id: "resource-content-#{commercial.id}"}
|
||||||
.col-md-4
|
= render partial: 'shared/media_item', locals: { commercial: commercial }
|
||||||
.thumbnail
|
.caption
|
||||||
.flexvideo{ id: "resource-content-#{commercial.id}"}
|
- if can? :update, commercial
|
||||||
= render partial: 'shared/media_item', locals: { commercial: commercial }
|
= semantic_form_for commercial, url: conference_program_proposal_commercial_path(conference_id: @conference.short_title, proposal_id: @event, id: commercial) do |f|
|
||||||
.caption
|
= f.input :url, label: 'URL', as: :string, input_html: { id: "commercial_url_#{commercial.id}", required: 'required', type: 'url' }
|
||||||
- if can? :update, commercial
|
= f.action :submit, as: :button, button_html: { class: 'btn btn-success' }, label: 'Update'
|
||||||
= semantic_form_for commercial, url: conference_program_proposal_commercial_path(conference_id: @conference.short_title, proposal_id: @event, id: commercial) do |f|
|
- if can? :destroy, commercial
|
||||||
= f.input :url, label: 'URL', as: :string, input_html: { id: "commercial_url_#{commercial.id}", required: 'required', type: 'url' }
|
= link_to 'Delete', conference_program_proposal_commercial_path(@conference.short_title, @event.id, commercial.id),
|
||||||
= f.action :submit, as: :button, button_html: { class: 'btn btn-success' }, label: 'Update'
|
:method => :delete, :data => { :confirm => 'Are you sure?' }, class: 'btn btn-danger'
|
||||||
- if can? :destroy, commercial
|
|
||||||
= link_to 'Delete', conference_program_proposal_commercial_path(@conference.short_title, @event.id, commercial.id),
|
|
||||||
:method => :delete, :data => { :confirm => 'Are you sure?' }, class: 'btn btn-danger'
|
|
||||||
|
|
|
||||||
|
|
@ -1 +1,4 @@
|
||||||
= render 'form'
|
.container
|
||||||
|
.row
|
||||||
|
.col-md-12
|
||||||
|
= render 'form'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue