Sha256: 5afb9f93e9942c89440f9f76d7f4fc9ca251be2482ab59c091e63561e07086fc

Contents?: true

Size: 1.42 KB

Versions: 22

Compression:

Stored size: 1.42 KB

Contents

<%
  load File.dirname(File.dirname(__FILE__)) + '/git.rb'
  git = Daddy::Git.new
  title = ENV['TITLE'].sub(' ', '_').downcase
-%>

<script>
  $(document).ready(function() {
    $('.contents').css('margin-left', $('#menu').width());

    $('.sprint').mouseover(function() {
      $(this).css('background', '#F0F8FF').css('cursor', 'pointer');
    }).mouseout(function() {
      $(this).css('background', '#FFFFFF');
    }).click(function() {
      $(this).nextAll('.sub_menu').toggle(250);
    });

    $('.current').click();
  });
</script>

<% git.branches.each do |b| %>
  <ol>
    <% if b == 'master' %>
      <li class="master">
        <%= '最新' %>
      </li>
      <li class="sub_menu">
        <a href="/<%= title %>/">開発日記</a>
      </li>
      <li class="sub_menu">
        <a href="/<%= title %>/master/spec/">仕様書</a>
      </li>
      <li class="sub_menu">
        <a href="/<%= title %>/master/coverage/rcov/" target="_blank">カバレッジ</a>
      </li>
    <% else %>
      <li class="sprint <%= 'current' if b == git.current_branch %>">
        <%= 'スプリント ' + b.gsub(/[a-zA-Z]*/, '') %>
      </li>
      <li class="sub_menu" style="display: none;">
        <a href="/<%= title %>/<%= b %>/spec/">仕様書</a>
      </li>
      <li class="sub_menu" style="display: none;">
        <a href="/<%= title %>/<%= b %>/coverage/rcov/" target="_blank">カバレッジ</a>
      </li>
    <% end %>
  </ol>
<% end %>

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
daddy-0.2.12 lib/daddy/formatter/menu.html.erb
daddy-0.2.11 lib/daddy/formatter/menu.html.erb
daddy-0.2.10 lib/daddy/formatter/menu.html.erb
daddy-0.2.9 lib/daddy/formatter/menu.html.erb
daddy-0.2.8 lib/daddy/formatter/menu.html.erb
daddy-0.2.7 lib/daddy/formatter/menu.html.erb
daddy-0.2.6 lib/daddy/formatter/menu.html.erb
daddy-0.2.5 lib/daddy/formatter/menu.html.erb
daddy-0.2.4 lib/daddy/formatter/menu.html.erb
daddy-0.2.3 lib/daddy/formatter/menu.html.erb
daddy-0.2.1 lib/daddy/formatter/menu.html.erb
daddy-0.1.26 lib/daddy/formatter/menu.html.erb
daddy-0.1.25 lib/daddy/formatter/menu.html.erb
daddy-0.1.24 lib/daddy/formatter/menu.html.erb
daddy-0.1.23 lib/daddy/formatter/menu.html.erb
daddy-0.1.22 lib/daddy/formatter/menu.html.erb
daddy-0.1.20 lib/daddy/formatter/menu.html.erb
daddy-0.1.18 lib/daddy/formatter/menu.html.erb
daddy-0.1.17 lib/daddy/formatter/menu.html.erb
daddy-0.1.15 lib/daddy/formatter/menu.html.erb