- @title = "Spot.us - Fund A Story"
.block-spacer

#equalize
  .box_white
    .span-4.colborder
      = link_to 'All Networks', news_items_path(:subdomain => false)
      %br/
      - @networks.each do |network|
        = link_to network.display_name, news_items_path(:subdomain => network.name)
        %br/
    - form_tag(:search_news_items, :method => :get) do
      .span-3
        %h4 Search
      .span-7.search-check-box.colborder
        .div
          %label Type
          = select_tag "news_item_type", options_for_select([["Pitches", "pitches"],["Tips","tips"],["All", "news_items"]], params.fetch(:news_item_type, "pitches"))
        .div
          = label_tag     :sort_by, "Sort By"
          %select{:name => "sort_by"}
            = options_for_sorting(params.fetch(:news_item_type, "pitches"), params.fetch(:sort_by,"desc"))
      .span-4.search_field_button
        = image_submit_tag image_path('search_button.png')
    %hr.space
    .double_content_border.clear
        
    = render :partial => @news_items

    = will_paginate @news_items

.clear
.block-spacer

- @title = "Spot.us - Fund A Story"
.block-spacer

#equalize
  .box_white
    .span-4.colborder
      = link_to 'All Networks', news_items_path(:subdomain => false)
      %br/
      - @networks.each do |network|
        = link_to network.display_name, news_items_path(:subdomain => network.name)
        %br/
    - form_tag(:search_news_items, :method => :get) do
      .span-3
        %h4 Search
      .span-7.search-check-box.colborder
        .div
          %label Type
          = select_tag "news_item_type", options_for_select([["Pitches", "pitches"],["Tips","tips"],["All", "news_items"]], params.fetch(:news_item_type, "pitches"))
        .div
          = label_tag     :sort_by, "Sort By"
          %select{:name => "sort_by"}
            = options_for_sorting(params.fetch(:news_item_type, "pitches"), params.fetch(:sort_by,"desc"))
      .span-4.search_field_button
        = image_submit_tag image_path('search_button.png')
    %hr.space
    .double_content_border.clear

    - if @news_items.blank?
      .box_white
        %p
          There were no results for your search.  Try different search terms.
    = render :partial => @news_items

    = will_paginate @news_items

.clear
.block-spacer

Add friendly error text when no news items are returned
Add friendly error text when no news items are returned
