secured Ux
This commit is contained in:
parent
7bbb0da17a
commit
5186dfcb12
1 changed files with 16 additions and 15 deletions
|
|
@ -22,8 +22,21 @@
|
||||||
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
|
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
|
||||||
|
|
||||||
#commercials-content.tab-pane
|
#commercials-content.tab-pane
|
||||||
- if can? :create, @venue.commercial
|
- if can? :create, @venue.commercial and @venue.id
|
||||||
- if @venue.commercial
|
- if @venue.commercial.nil?
|
||||||
|
.row
|
||||||
|
.col-md-6
|
||||||
|
#resource-content
|
||||||
|
#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);' }
|
||||||
|
|
||||||
|
.row
|
||||||
|
.col-md-6
|
||||||
|
= semantic_form_for(Commercial.new,as: :commercial, url: admin_conference_venue_venue_commercial_path(conference_id: @conference.short_title)) do |f|
|
||||||
|
= f.input :url, label: 'URL', as: :string, input_html: { required: 'required', type: 'url' },
|
||||||
|
hint: 'Just paste the url of your video/photo provider. Currently supported: YouTube, Vimeo, SpeakerDeck, SlideShare, Instagram, Flickr.'
|
||||||
|
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary pull-right', disabled: true }
|
||||||
|
%hr
|
||||||
|
- else
|
||||||
- if @venue.commercial.persisted?
|
- if @venue.commercial.persisted?
|
||||||
.col-md-4
|
.col-md-4
|
||||||
.thumbnail
|
.thumbnail
|
||||||
|
|
@ -38,18 +51,6 @@
|
||||||
= link_to 'Delete', admin_conference_venue_venue_commercial_path(conference_id: @conference.short_title, id: @venue.commercial.id),
|
= link_to 'Delete', admin_conference_venue_venue_commercial_path(conference_id: @conference.short_title, id: @venue.commercial.id),
|
||||||
method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger'
|
method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger'
|
||||||
%hr
|
%hr
|
||||||
- else
|
|
||||||
.row
|
|
||||||
.col-md-6
|
|
||||||
#resource-content
|
|
||||||
#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);' }
|
|
||||||
.row
|
|
||||||
.col-md-6
|
|
||||||
= semantic_form_for(Commercial.new,as: :commercial, url: admin_conference_venue_venue_commercial_path(conference_id: @conference.short_title)) do |f|
|
|
||||||
= f.input :url, label: 'URL', as: :string, input_html: { required: 'required', type: 'url' },
|
|
||||||
hint: 'Just paste the url of your video/photo provider. Currently supported: YouTube, Vimeo, SpeakerDeck, SlideShare, Instagram, Flickr.'
|
|
||||||
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary pull-right', disabled: true }
|
|
||||||
%hr
|
|
||||||
|
|
||||||
- else
|
- else
|
||||||
hint: 'First Create Venue, then update commercial'
|
First Create Venue, then update commercial
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue