Refactoring Admin menu #384
This commit is contained in:
parent
518e1cc62b
commit
d1f5b1e3cc
30 changed files with 865 additions and 190 deletions
30
app/views/admin/conference_basics/_form.html.haml
Normal file
30
app/views/admin/conference_basics/_form.html.haml
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
.row
|
||||
.col-md-8
|
||||
= semantic_form_for(@conference, url: admin_conference_conference_basics_path(@conference.short_title), html: { multipart: true }) do |f|
|
||||
= f.input :make_conference_public, hint: 'This will enable the visitors to view the splash page(the "View Conference" button will be visible now on the home page), it is recommended to enable this after you have finished setting up all the components for display'
|
||||
= f.input :include_program_in_splash, hint: 'On setting this true you will enable the program component to be displayed on the splash page.This component includes tracks, keynote speakers and the schedule'
|
||||
= 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"
|
||||
%p{'style'=>'color: red;'} Attention: If you alter the short title of the conference, all URLs will also change!
|
||||
- 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 :color, hint: 'The color will be used on the dashboard (e.g. line / pie charts).', input_html: { size: 6, type: 'color' }
|
||||
= f.inputs name: 'Banner for Splash' do
|
||||
= f.input :include_banner_in_splash, hint: 'This enable the Banner Photo with description to be displayed on the splash'
|
||||
= f.input :banner_photo, hint: 'This will be the top most component of the splash.This background cover will contain start_date and end_date of the conference and the description'
|
||||
= f.input :description, hint: markdown_hint('This description will be shown at the bottom of the banner photo of the Splash.'), input_html: { rows: 5, data: { provide: '"markdown-editable" '} }
|
||||
= 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.inputs name: 'Media' do
|
||||
= 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.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
|
||||
82
app/views/admin/conference_basics/_show.html.haml
Normal file
82
app/views/admin/conference_basics/_show.html.haml
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
.row{'style'=>'padding-top: 15px;'}
|
||||
.col-md-6
|
||||
%dl.dl-horizontal
|
||||
%dt
|
||||
Title
|
||||
%dd
|
||||
= @conference.title
|
||||
%dt
|
||||
Short Title
|
||||
%dd
|
||||
= @conference.short_title
|
||||
%dt
|
||||
Description
|
||||
%dd
|
||||
- unless @conference.description.blank?
|
||||
= markdown(@conference.description)
|
||||
- else
|
||||
Not set!
|
||||
%dt
|
||||
Date
|
||||
%dd
|
||||
= date_string(@conference.start_date, @conference.end_date)
|
||||
%dt
|
||||
Color
|
||||
%dd
|
||||
%div.text-center{'style'=>"width: 25px; height: 25px; background: #{@conference.color};"}
|
||||
.row.row-flex.row-flex-wrap
|
||||
.col-md-4
|
||||
.thumbnail.flex-col
|
||||
%h3.text-center
|
||||
Conference Logo
|
||||
- if @conference.logo?
|
||||
= image_tag(@conference.logo(:large), class: 'img-responsive')
|
||||
.caption.flex-grow
|
||||
.caption
|
||||
%p
|
||||
%dl.dl-horizontal
|
||||
%dt
|
||||
Filename
|
||||
%dd
|
||||
= @conference.logo_file_name
|
||||
-else
|
||||
%h4.text-center
|
||||
Not set!
|
||||
.col-md-4
|
||||
.thumbnail.flex-col
|
||||
%h3.text-center
|
||||
Conference Banner
|
||||
- if @conference.banner_photo?
|
||||
= image_tag(@conference.banner_photo(:large), class: 'img-responsive')
|
||||
.caption.flex-grow
|
||||
.caption
|
||||
%p
|
||||
%dl.dl-horizontal
|
||||
%dt
|
||||
Filename
|
||||
%dd
|
||||
= @conference.banner_photo_file_name
|
||||
- else
|
||||
%h4.text-center
|
||||
Not set!
|
||||
.col-md-4
|
||||
.thumbnail
|
||||
%h3.text-center
|
||||
Media
|
||||
- unless @conference.media_id.blank?
|
||||
.flexvideo
|
||||
= render partial: 'shared/media_item', locals: { media_type: @conference.media_type, media_id: @conference.media_id }
|
||||
.caption
|
||||
%p
|
||||
%dl.dl-horizontal
|
||||
%dt
|
||||
Media Type
|
||||
%dd
|
||||
= @conference.media_type
|
||||
%dt
|
||||
Media ID
|
||||
%dd
|
||||
= @conference.media_id
|
||||
- else
|
||||
%h4.text-center
|
||||
Not set!
|
||||
16
app/views/admin/conference_basics/edit.html.haml
Normal file
16
app/views/admin/conference_basics/edit.html.haml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
.row
|
||||
.col-md-12
|
||||
%ul.nav.nav-tabs{'role'=>'tablist'}
|
||||
%li.active
|
||||
%a{'href'=> '#show', 'role'=>'tab', 'data-toggle'=>'tab'}
|
||||
Show
|
||||
%li
|
||||
%a{'href'=> '#edit', 'role'=>'tab', 'data-toggle'=>'tab'}
|
||||
Edit
|
||||
.row
|
||||
.col-md-12
|
||||
.tab-content
|
||||
.tab-pane.active#show
|
||||
= render partial: 'show'
|
||||
.tab-pane#edit
|
||||
= render partial: 'form'
|
||||
Loading…
Add table
Add a link
Reference in a new issue