Refactoring Admin menu #384

This commit is contained in:
Chrisbr 2014-07-30 12:03:16 +02:00
parent 518e1cc62b
commit d1f5b1e3cc
30 changed files with 865 additions and 190 deletions

View file

@ -0,0 +1,13 @@
.row
.col-md-8
= semantic_form_for(@conference, :url => admin_conference_conference_basics_path(@conference.short_title),:html => {:multipart => true}) do |f|
= f.inputs :name => 'Contact' do
= 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 => 'Social Media' do
= f.input :include_social_media_in_splash, hint: 'On setting this true you will enable the social media links to be displayed on the splash page'
= f.input :social_tag, hint: "The hashtag you'll use on Twitter and Google+. Don't include the '#' sign!'"
= f.input :facebook_url, hint: 'This will appear in the social media section as link to the Facebook page of your Conference'
= f.input :google_url, label: 'Google+ Url', hint: 'This will appear in the social media section as the link to the Google+ Page of your Conference'
= f.input :twitter_url, hint: 'This will appear in the social media section as the link to the Twitter Page of your Conference'
= f.input :instagram_url, hint: 'This will appear in the social media section as the link to the Instagram Page of your Conference'
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }

View file

@ -0,0 +1,31 @@
%ul.list-unstyled
- unless @conference.contact_email.blank?
%li
= link_to "#{ @conference.contact_email }" do
%i.fa.fa-envelope.fa-3x
= @conference.contact_email
- unless @conference.social_tag.blank?
%li
= link_to "#{ @conference.social_tag }" do
%i.fa.fa-thumbs-o-up.fa-3x
= "##{@conference.social_tag}"
- unless @conference.facebook_url.blank?
%li
= link_to "#{ @conference.facebook_url }" do
%i.fa.fa-facebook-square.fa-3x
= @conference.facebook_url
- unless @conference.twitter_url.blank?
%li
= link_to "#{ @conference.twitter_url }" do
%i.fa.fa-twitter.fa-3x
= @conference.twitter_url
- unless @conference.instagram_url.blank?
%li
= link_to "#{ @conference.instagram_url }" do
%i.fa.fa-instagram.fa-3x
= @conference.instagram_url
- unless @conference.google_url.blank?
%li
= link_to "#{ @conference.google_url }" do
%i.fa.fa-google.fa-3x
= @conference.google_url

View 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'