app/views/photos/index.html.haml in community_engine-2.3.2 vs app/views/photos/index.html.haml in community_engine-3.0.0

- old
+ new

@@ -1,28 +1,28 @@ -.yui-b - = render :partial => 'posts/author_profile', :locals => {:user => @user} +-@page_title=:users_photos.l(:user=>@user.login) += render :partial => 'posts/author_profile', :locals => {:user => @user} - -box :class => 'yui-u first' do +-if @tags.any? + -widget do %h3=:tags.l - %ul.tags + %ul.list-unstyled - @tags.each do |tag| %li - if (tag.name.eql?(params[:tag_name]) ) - = link_to tag.name, user_photos_path(@user), :class => "selected" + %a.active.label.label-info{:href => user_photos_path(@user)} + =fa_icon "tag inverse", :text => tag.name - else - = link_to tag.name, user_photos_path(:user_id => @user, :tag_name => tag.name) - + %a.label.label-info{:href => user_photos_path(:user_id => @user, :tag_name => tag.name)} + =fa_icon "tag inverse", :text => tag.name -#yui-main - .yui-b - - -box :id => "photos" do - %h3= link_to :users_photos.l(:user=>@user.login), user_photos_path(@user) - = link_to( :new_photo.l, new_user_photo_path(@user), {:class => 'right'}) if @is_current_user +%ul.list-unstyled.thumbnails + - @photos.each do |photo| + %li.col-sm-3 + = link_to image_tag(photo.photo.url(:medium)), user_photo_path(@user, photo), :class => 'thumbnail' + -if @is_current_user + =link_to :show.l, user_photo_path(@user, photo), :class => 'btn btn-xs btn-default' + =link_to :edit.l, edit_user_photo_path(@user, photo), :class => 'btn btn-xs btn-warning' + =link_to :delete.l, user_photo_path(@user, photo), :method => 'delete', data: { confirm: :are_you_sure.l }, :class => 'btn btn-xs btn-danger' - .clear - - @photos.each do |photo| - = link_to tag('img', :src => photo.photo.url(:thumb), :class => "polaroid"), user_photo_path(@user, photo) - - .pagination=paginating_links @photos if @photos.total_count > 1 - - +=paginate @photos, :theme => 'bootstrap' +-if @is_current_user + = link_to :new_photo.l, new_user_photo_path(@user), :class => 'btn btn-success'