Skip to content

Instantly share code, notes, and snippets.

@riklomas
Forked from anonymous/gist:1408742
Created November 30, 2011 11:22

Revisions

  1. riklomas revised this gist Nov 30, 2011. 1 changed file with 7 additions and 5 deletions.
    12 changes: 7 additions & 5 deletions gistfile1.erb
    Original file line number Diff line number Diff line change
    @@ -3,12 +3,14 @@
    <ul class="weeks">
    <li>Week</li>
    <% navigation_weeks.each do |w| %>
    <li class="<%= (controller_name == "posts" || controller_name == "things") && params[:action]=="index" && params[:week].present? && params[:year].present? && params[:week]==w.week.to_s && params[:year]==w.year.to_s ? 'active' : '' %>"><%= link_to posts_path(:week => w.week, :year => w.year), :class => 'tip', :title => week_dates(w.week, w.year) do %>
    <%= w.week %>
    <% if nmonth != week_month(w.week, w.year) %>
    <span class="<%= week_month(w.week, w.year).downcase %>"><%= week_month(w.week, w.year) %></span>
    <li class="<%= (controller_name == "posts" || controller_name == "things") && params[:action]=="index" && params[:week].present? && params[:year].present? && params[:week]==w.week.to_s && params[:year]==w.year.to_s ? 'active' : '' %>">
    <%= link_to posts_path(:week => w.week, :year => w.year), :class => 'tip', :title => week_dates(w.week, w.year) do %>
    <%= w.week %>
    <% if nmonth != week_month(w.week, w.year) %>
    <span class="<%= week_month(w.week, w.year).downcase %>"><%= week_month(w.week, w.year) %></span>
    <% end %>
    <% end %>
    <% end %></li>
    </li>
    <% nmonth = week_month(w.week, w.year) %>
    <% end %>
    </ul>
  2. riklomas revised this gist Nov 30, 2011. 1 changed file with 9 additions and 2 deletions.
    11 changes: 9 additions & 2 deletions gistfile1.erb
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,15 @@
    <% nmonth = "" %>
    <li>
    <ul class="weeks">
    <li>Week</li>
    <% navigation_weeks.each do |w| %>
    <li class="<%= (controller_name == "posts" || controller_name == "things") && params[:action]=="index" && params[:week].present? && params[:year].present? && params[:week]==w.week.to_s && params[:year]==w.year.to_s ? 'active' : '' %>"><%= link_to "#{w.week} <span class='#{week_month(w.week, w.year).downcase}'>#{week_month(w.week, w.year)}</span>".html_safe, posts_path(:week => w.week, :year => w.year), :class => 'tip', :title => week_dates(w.week, w.year) %></li>
    <li class="<%= (controller_name == "posts" || controller_name == "things") && params[:action]=="index" && params[:week].present? && params[:year].present? && params[:week]==w.week.to_s && params[:year]==w.year.to_s ? 'active' : '' %>"><%= link_to posts_path(:week => w.week, :year => w.year), :class => 'tip', :title => week_dates(w.week, w.year) do %>
    <%= w.week %>
    <% if nmonth != week_month(w.week, w.year) %>
    <span class="<%= week_month(w.week, w.year).downcase %>"><%= week_month(w.week, w.year) %></span>
    <% end %>
    <% end %></li>
    <% nmonth = week_month(w.week, w.year) %>
    <% end %>
    </ul>
    </li>
    </li>
  3. @invalid-email-address Anonymous renamed this gist Nov 30, 2011. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. @invalid-email-address Anonymous created this gist Nov 30, 2011.
    8 changes: 8 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    <li>
    <ul class="weeks">
    <li>Week</li>
    <% navigation_weeks.each do |w| %>
    <li class="<%= (controller_name == "posts" || controller_name == "things") && params[:action]=="index" && params[:week].present? && params[:year].present? && params[:week]==w.week.to_s && params[:year]==w.year.to_s ? 'active' : '' %>"><%= link_to "#{w.week} <span class='#{week_month(w.week, w.year).downcase}'>#{week_month(w.week, w.year)}</span>".html_safe, posts_path(:week => w.week, :year => w.year), :class => 'tip', :title => week_dates(w.week, w.year) %></li>
    <% end %>
    </ul>
    </li>