Sha256: 627ec0f855d7a862d729aeedbfb6116ac4af21e4714d7834c72e97e02232a9c9

Contents?: true

Size: 1.64 KB

Versions: 1

Compression:

Stored size: 1.64 KB

Contents

- videos ||= @videos
- videos = videos.page params[:videos_page]

.row
  .col-sm-12
    %h2
      Videos (#{videos.count})
      = link_to '[+]', new_video_path

    - if @current_user.profile.videos_embed
      Embed?
      .inline
        = form_tag user_profile_path( @current_user.profile ), :method => :patch do 
          = hidden_field_tag 'ish_models_user_profile[videos_embed]', false
          = hidden_field_tag 'redirect_to', videos_path
          = submit_tag 'Preview?'
    - else
      .inline
        = form_tag user_profile_path( @current_user.profile ), :method => :patch do
          = hidden_field_tag 'ish_models_user_profile[videos_embed]', true
          = hidden_field_tag 'redirect_to', videos_path
          = submit_tag 'Embed?'
      Preview?

    %br
    
    = paginate videos, :param_name => :videos_page, :views_prefix => 'ish_manager'
    
    - videos.each do |video|
      .panel
        .panel-content
          .row
            .col-xs-12.col-sm-6
              .center
                = link_to video.name, video_path( video )
                .inline= button_to '[x]', video_path( video ), :method => :delete, :data => { :confirm => 'Are you sure?' }
                = link_to '[~]', edit_video_path( video )
                = render 'meta', :item => video
                .description= video.description
            .col-xs-12.col-sm-6
              .center
                - if @current_user.profile.videos_embed
                  = render 'embed', :video => video
                - else
                  = render 'preview', :video => video
        
    = paginate videos, :param_name => :videos_page, :views_prefix => 'ish_manager'
%hr

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ish_manager-0.1.8.51 app/views/ish_manager/videos/_index.haml