// Navigation sidebar
#sidebar
  .caption View
  - if current_page? packages_list_path
    .item
      // Switch to grid view
      //a href=url(:package, :index)
      = link_to (packages_grid_path(search: params[:search], show: params[:show]))
        img src="/images/sidebar/grid0.svg" width=40 height=40
    .item.space
      img src="/images/sidebar/list1.svg" width=40 height=40
  - else
    .item
      img src="/images/sidebar/grid1.svg" width=40 height=40
    .item.space
      // Switch to list view
      //a href=url(:package, :index, view: 'list')
      = link_to (packages_list_path(search: params[:search], show: params[:show]))
        img src="/images/sidebar/list0.svg" width=40 height=40

  // Cycling between with/without/any packages filter
  .caption Screenshots
  - if params['show'] == 'with'
    .item
      a href=url_for(show: 'without', search: params[:search])
        img src="/images/sidebar/show-without0.svg" width=40 height=40
    .item
      img src="/images/sidebar/show-with1.svg" width=40 height=40
    .item.space
      a href=url_for(show: 'any', search: params[:search])
        img src="/images/sidebar/show-any0.svg" width=40 height=40
  - elsif params['show'] == 'without'
    .item
      img src="/images/sidebar/show-without1.svg" width=40 height=40
    .item
      a href=url_for(show: 'with', search: params[:search])
        img src="/images/sidebar/show-with0.svg" width=40 height=40
    .item.space
      a href=url_for(show: 'any', search: params[:search])
        img src="/images/sidebar/show-any0.svg" width=40 height=40
  - else    # any
    .item
      a href=url_for(show: 'without', search: params[:search])
        img src="/images/sidebar/show-without0.svg" width=40 height=40
    .item
      a href=url_for(show: 'with', search: params[:search])
        img src="/images/sidebar/show-with0.svg" width=40 height=40
    .item.space
      img src="/images/sidebar/show-any1.svg" width=40 height=40
