post_example.html.haml 3.5 KB
= javascript_include_tag "site/videos"
= form_for(@presenter.upload, :html => {:multipart => true, :class => "horizontal-form"}) do |f|
  .field
    = label_tag :choice, t('videos.video_type'), :class => 'bold'
    %label.radio
      = f.radio_button :closed_caption, '1', :id => "link_cc"
      Closed Caption (legenda embutida)
    %label.radio
      = f.radio_button :closed_caption, '3', :id => "link_recognize"
      Voz
    %label.radio
      = f.radio_button :closed_caption, '2', :id => "link_normal"
      Legenda (.SRT)
  #url
    = f.label :url, t('videos.url'), :class => "bold"
    = f.file_field :url
  #legend
    = f.label :legend, t('videos.subtitle'), :class => "bold"
    = f.file_field :legend, :prompt => "LEGENDA"
  .field
    = f.label :window_size, t('videos.window_size'), :class => "bold"
    = f.select :window_size, [['Pequena', '1'], ['Média', '2'], ['Grande', '3']]
  .field
    %p
      %b
        = f.label :window_position,  t('videos.window_position'), :class => "bold"
  = f.select :window_position, [[t('videos.top_left'), '1'], [t('videos.top_right'), '2'], [t('videos.bottom_right'),'3'], [t('videos.bottom_left'), '4']]
  .field
    = f.label :transparency, t('videos.transparency'), :class => "bold"
    = f.select :transparency, [['Opaco', '0'], ['Transparente', '1']]
  = f.hidden_field :user_id, :value => 1
  = f.submit "Confirmar", :class => "btn btn-primary actions"

%pre.pre-scrollable
  %p
    %b Copie o código abaixo
    %br
    #{"<script src='/assets/site/videos.js' type='text/javascript'></script><form accept-charset='UTF-8' action='/api/videos?locale=pt' enctype='multipart/form-data' method='post'><input name='utf8' type='hidden'  value='&#x2713;'' /><input name='authenticity_token' type='hidden'  value='bM4zQRLAdCVXH0fExn0TOY60E17IRQ2PEMcv68tcbIM='/></div><div class='field'><label class='bold' for='choice'>Entrada</label><label class='radio'><input id='link_cc' name='video[closed_caption]' type='radio' value='1' />Closed Caption (legenda embutida)</label><label class='radio'><input id='link_recognize' name='video[closed_caption]' type='radio' value='3' />Voz</label><label class='radio'><input id='link_normal' name='video[closed_caption]' type='radio' value='2' />Legenda (.SRT)</label></div><div id='url'><label class='bold' for='video_url'>Vídeo</label><input id='video_url' name='video[url]'' type='file' /></div><div id='legend'><label class='bold' for='video_legend'>Legenda</label><input id='video_legend' name='video[legend]' prompt='LEGENDA' type='file' /></div><div class='field'><label class='bold' for='video_window_size'>Tamanho da janela de Libras</label><select id='video_window_size' name='video[window_size]'><option value='1'>Pequena</option><option value='2'>Média</option><option value='3'>Grande</option></select></div><div class='field'><p><b><label class='bold' for='video_window_position'>Posição da janela de Libras</label></b></p></div><select id='video_window_position' name='video[window_position]'><option value='1'>Superior Esquerda</option><option value='2'>Superior Direito</option><option value='3'>Inferior Direito</option><option value='4'>Inferior Esquerdo</option></select><div class='field'><label class='bold' for='video_transparency'>Tipo de Background</label><select id='video_transparency' name='video[transparency]'><option value='0'>Opaco</option><option value='1'>Transparente</option></select></div><input id='video_user_id' name='video[user_id]' type='hidden' value='2' /><input class='btn btn-primary actions' name='commit' type='submit' value='Confirmar'/></form>"}