<table class="list">
<% @checklist.each do |label, result| %>
- <tr class="<%= cycle 'odd', 'even' %>">
+ <tr>
<td class="name"><%= label.is_a?(Symbol) ? l(label) : label %></td>
<td class="tick"><span class="icon-only <%= (result ? 'icon-ok' : 'icon-error') %>"></span></td>
</tr>
<% if @plugins.any? %>
<table class="list plugins">
<% @plugins.each do |plugin| %>
- <tr id="plugin-<%= plugin.id %>" class="<%= cycle('odd', 'even') %>">
+ <tr id="plugin-<%= plugin.id %>">
<td class="name"><span class="name"><%= plugin.name %></span>
<%= content_tag('span', plugin.description, :class => 'description') unless plugin.description.blank? %>
<%= content_tag('span', link_to(plugin.url, plugin.url), :class => 'url') unless plugin.url.blank? %>
</tr></thead>
<tbody>
<% project_tree(@projects, :init_level => true) do |project, level| %>
- <tr class="<%= cycle("odd", "even") %> <%= project.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
+ <tr class="<%= project.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
<td class="name"><span><%= link_to_project_settings(project, {}, :title => project.short_description) %></span></td>
<td><%= checked_image project.is_public? %></td>
<td><%= format_date(project.created_on) %></td>
</tr></thead>
<tbody>
<% for source in @auth_sources %>
- <tr id="auth-source-<%= source.id %>" class="<%= cycle("odd", "even") %>">
+ <tr id="auth-source-<%= source.id %>">
<td class="name"><%= link_to(source.name, :action => 'edit', :id => source)%></td>
<td><%= source.auth_method_name %></td>
<td><%= source.host %></td>
</tr></thead>
<tbody>
<% Board.board_tree(@boards) do |board, level| %>
- <tr class="<%= cycle 'odd', 'even' %>">
+ <tr>
<td class="name" style="padding-left: <%= level * 18 %>px;">
<%= link_to board.name, project_board_path(board.project, board), :class => "board" %><br />
<%=h board.description %>
</tr></thead>
<tbody>
<% @topics.each do |topic| %>
- <tr id="message-<%= topic.id %>" class="message <%= cycle 'odd', 'even' %> <%= topic.sticky? ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>">
+ <tr id="message-<%= topic.id %>" class="message <%= topic.sticky? ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>">
<td class="subject icon <%= 'icon-sticky' if topic.sticky? %> <%= 'icon-locked' if topic.locked? %>"><%= link_to topic.subject, board_message_path(@board, topic) %></td>
<td class="author"><%= link_to_user(topic.author) %></td>
<td class="created_on"><%= format_time(topic.created_on) %></td>
<tbody>
<% (@custom_fields_by_type[tab[:name]] || []).sort.each do |custom_field| -%>
<% back_url = custom_fields_path(:tab => tab[:name]) %>
- <tr class="<%= cycle("odd", "even") %>">
+ <tr>
<td class="name"><%= link_to custom_field.name, edit_custom_field_path(custom_field) %></td>
<td><%= l(custom_field.format.label) %></td>
<td><%= checked_image custom_field.is_required? %></td>
<% if @addresses.present? %>
<table class="list email_addresses">
<% @addresses.each do |address| %>
- <tr class="<%= cycle("odd", "even") %>">
+ <tr>
<td class="email"><%= address.address %></td>
<td class="buttons">
<%= toggle_email_address_notify_link(address) %>
<th></th>
</tr></thead>
<% enumerations.each do |enumeration| %>
-<tr class="<%= cycle('odd', 'even') %>">
+<tr>
<td class="name"><%= link_to enumeration, edit_enumeration_path(enumeration) %></td>
<td class="tick"><%= checked_image enumeration.is_default? %></td>
<td class="tick"><%= checked_image enumeration.active? %></td>
</tr>
<% end -%>
<% container.attachments.each do |file| %>
- <tr class="file <%= cycle("odd", "even") %>">
+ <tr class="file">
<td class="filename"><%= link_to_attachment file, :download => true, :title => file.description %></td>
<td class="created_on"><%= format_time(file.created_on) %></td>
<td class="filesize"><%= number_to_human_size(file.filesize) %></td>
</tr></thead>
<tbody>
<% @group.users.sort.each do |user| %>
- <tr id="user-<%= user.id %>" class="<%= cycle 'odd', 'even' %>">
+ <tr id="user-<%= user.id %>">
<td class="name"><%= link_to_user user %></td>
<td class="buttons">
<%= delete_link group_user_path(@group, :user_id => user), :remote => true %>
</tr></thead>
<tbody>
<% @groups.each do |group| %>
- <tr id="group-<%= group.id %>" class="<%= cycle 'odd', 'even' %> <%= "builtin" if group.builtin? %>">
+ <tr id="group-<%= group.id %>" class="<%= "builtin" if group.builtin? %>">
<td class="name"><%= link_to group, edit_group_path(group) %></td>
<td class="user_count"><%= (@user_count_by_group_id[group.id] || 0) unless group.builtin? %></td>
<td class="buttons"><%= delete_link group unless group.builtin? %></td>
</tr></thead>
<tbody>
<% for status in @issue_statuses %>
- <tr class="<%= cycle("odd", "even") %>">
+ <tr>
<td class="name"><%= link_to status.name, edit_issue_status_path(status) %></td>
<% if Issue.use_status_for_done_ratio? %>
<td><%= status.default_done_ratio %></td>
<% changesets.each do |changeset| %>
- <div class="changeset <%= cycle('odd', 'even') %>">
+ <div class="changeset">
<p><%= link_to_revision(changeset, changeset.repository,
:text => "#{l(:label_revision)} #{changeset.format_identifier}") %>
<% if changeset.filechanges.any? && User.current.allowed_to?(:browse_repository, changeset.project) %>
</td>
</tr>
<% end %>
- <tr id="issue-<%= issue.id %>" class="hascontextmenu <%= cycle('odd', 'even') %> <%= issue.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
+ <tr id="issue-<%= issue.id %>" class="hascontextmenu <%= issue.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
<td class="checkbox hide-when-print"><%= check_box_tag("ids[]", issue.id, false, :id => nil) %></td>
<%= raw query.inline_columns.map {|column| "<td class=\"#{column.css_classes}\">#{column_content(column, issue)}</td>"}.join %>
</tr>
</tr></thead>
<tbody>
<% for issue in issues %>
- <tr id="issue-<%= h(issue.id) %>" class="hascontextmenu <%= cycle('odd', 'even') %> <%= issue.css_classes %>">
+ <tr id="issue-<%= h(issue.id) %>" class="hascontextmenu <%= issue.css_classes %>">
<td class="id">
<%= check_box_tag("ids[]", issue.id, false, :style => 'display:none;', :id => nil) %>
<%= link_to("#{issue.tracker} ##{issue.id}", issue_path(issue)) %>
<tbody>
<% principal.memberships.preload(:member_roles => :role).each do |membership| %>
<% next if membership.new_record? %>
- <tr id="member-<%= membership.id %>" class="<%= cycle 'odd', 'even' %> class">
+ <tr id="member-<%= membership.id %>" class="class">
<td class="project name">
<%= link_to_project membership.project %>
</td>
<% @project.activities(true).each do |enumeration| %>
<%= fields_for "enumerations[#{enumeration.id}]", enumeration do |ff| %>
- <tr class="<%= cycle('odd', 'even') %>">
+ <tr>
<td class="name">
<%= ff.hidden_field :parent_id, :value => enumeration.id unless enumeration.project %>
<%= enumeration %>
<div class="table-list-cell"><%= l(:label_board) %></div>
</div>
<%= render_boards_tree(@project.boards) do |board, level| %>
- <div class="table-list-row <%= cycle 'odd', 'even' %>">
+ <div class="table-list-row">
<div class="table-list-cell name" style="padding-left: <%= 2 + level * 16 %>px">
<%= link_to board.name, project_board_path(@project, board) %>
</div>
<tbody>
<% for category in @project.issue_categories %>
<% unless category.new_record? %>
- <tr class="<%= cycle 'odd', 'even' %>">
+ <tr>
<td class="name"><%= category.name %></td>
<td><%= category.assigned_to.name if category.assigned_to %></td>
<td class="buttons">
<tbody>
<% members.each do |member| %>
<% next if member.new_record? %>
- <tr id="member-<%= member.id %>" class="<%= cycle 'odd', 'even' %> member">
+ <tr id="member-<%= member.id %>" class="member">
<td class="name icon icon-<%= member.principal.class.name.downcase %>"><%= link_to_user member.principal %></td>
<td class="roles">
<span id="member-<%= member.id %>-roles"><%= member.roles.sort.collect(&:to_s).join(', ') %></span>
</thead>
<tbody>
<% @project.repositories.sort.each do |repository| %>
- <tr class="<%= cycle 'odd', 'even' %>">
+ <tr>
<td class="name">
- <%= link_to repository.identifier,
+ <%= link_to repository.identifier,
{:controller => 'repositories', :action => 'show',:id => @project, :repository_id => repository.identifier_param} if repository.identifier.present? %>
</td>
<td><%= checked_image repository.is_default? %></td>
</tr></thead>
<tbody>
<% @versions.sort.each do |version| %>
- <tr class="version <%= cycle 'odd', 'even' %> <%=h version.status %> <%= 'shared' if version.project != @project %>">
+ <tr class="version <%=h version.status %> <%= 'shared' if version.project != @project %>">
<td class="name <%= 'icon icon-shared' if version.project != @project %>"><%= link_to_version version %></td>
<td class="date"><%= format_date(version.effective_date) %></td>
<td class="description"><%= version.description %></td>
</thead>
<tbody>
<% @trackers.each do |tracker| %>
- <tr class="<%= cycle("odd", "even") %>">
+ <tr>
<td class="name">
<%= link_to tracker.name, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id) %>
</td>
<% else %>
<table class="list">
<% @queries.each do |query| %>
- <tr class="<%= cycle('odd', 'even') %>">
+ <tr>
<td class="name">
<%= link_to query.name, :controller => 'issues', :action => 'index', :project_id => @project, :query_id => query %>
</td>
</tr></thead>
<tbody>
<% for row in rows %>
-<tr class="<%= cycle("odd", "even") %>">
+<tr>
<td class="name"><%= link_to row.name, aggregate_path(@project, field_name, row) %></td>
<% for status in @statuses %>
<td><%= aggregate_link data, { field_name => row.id, "status_id" => status.id }, aggregate_path(@project, field_name, row, :status_id => status.id) %></td>
</tr></thead>
<tbody>
<% for row in rows %>
-<tr class="<%= cycle("odd", "even") %>">
+<tr>
<td class="name"><%= link_to row.name, aggregate_path(@project, field_name, row) %></td>
<td><%= aggregate_link data, { field_name => row.id, "closed" => 0 }, aggregate_path(@project, field_name, row, :status_id => "o") %></td>
<td><%= aggregate_link data, { field_name => row.id, "closed" => 1 }, aggregate_path(@project, field_name, row, :status_id => "c") %></td>
<% show_diff = revisions.size > 1 %>
<% line_num = 1 %>
<% revisions.each do |changeset| %>
-<tr class="changeset <%= cycle 'odd', 'even' %>">
+<tr class="changeset">
<% id_style = (show_revision_graph ? "padding-left:#{(graph_space + 1) * 20}px" : nil) %>
<%= content_tag(:td, :class => 'id', :style => id_style) do %>
<%= link_to_revision(changeset, @repository) %>
<tbody>
<% i = 0 -%>
<% @committers.each do |committer, user_id| -%>
- <tr class="<%= cycle 'odd', 'even' %>">
+ <tr>
<td><%= committer %></td>
<td>
<%= hidden_field_tag "committers[#{i}][]", committer, :id => nil %>
<% end %>
</tr>
<% Tracker.sorted.all.each do |tracker| %>
- <tr class="<%= cycle("odd", "even") %>">
+ <tr>
<td class="name"><%= tracker.name %></td>
<% permissions.each do |permission| %>
<td class="<%= "#{permission}_shown" %>"><%= check_box_tag "role[permissions_tracker_ids][#{permission}][]",
</tr></thead>
<tbody>
<% for role in @roles %>
- <tr class="<%= cycle("odd", "even") %> <%= role.builtin? ? "builtin" : "givable" %>">
+ <tr class="<%= role.builtin? ? "builtin" : "givable" %>">
<td class="name"><%= content_tag(role.builtin? ? 'em' : 'span', link_to(role.name, edit_role_path(role))) %></td>
<td class="buttons">
<%= reorder_handle(role) unless role.builtin? %>
</tr>
<% end %>
<% perms_by_module[mod].each do |permission| %>
- <tr class="<%= cycle('odd', 'even') %> permission-<%= permission.name %>">
+ <tr class="permission-<%= permission.name %>">
<td class="name">
<%= link_to_function('',
"toggleCheckboxesBySelector('.permission-#{permission.name} input')",
</td>
</tr>
<% end %>
- <tr id="time-entry-<%= entry.id %>" class="time-entry <%= cycle("odd", "even") %> hascontextmenu">
+ <tr id="time-entry-<%= entry.id %>" class="time-entry hascontextmenu">
<td class="checkbox hide-when-print"><%= check_box_tag("ids[]", entry.id, false, :id => nil) %></td>
<%= raw @query.inline_columns.map {|column| "<td class=\"#{column.css_classes}\">#{column_content(column, entry)}</td>"}.join %>
<td class="buttons">
<% @report.hours.collect {|h| h[criterias[level]].to_s}.uniq.each do |value| %>
<% hours_for_value = select_hours(hours, criterias[level], value) -%>
<% next if hours_for_value.empty? -%>
-<tr class="<%= cycle('odd', 'even') %> <%= criterias.length > level+1 ? 'subtotal' : 'last-level' %>">
+<tr class="<%= criterias.length > level+1 ? 'subtotal' : 'last-level' %>">
<%= ("<td></td>" * level).html_safe %>
<td class="name"><%= format_criteria_value(@report.available_criteria[criterias[level]], value) %></td>
<%= ("<td></td>" * (criterias.length - level - 1)).html_safe -%>
</td>
</tr>
<% Tracker::CORE_FIELDS.each do |field| %>
- <tr class="<%= cycle("odd", "even") %>">
+ <tr>
<td class="name">
<%= link_to_function('', "toggleCheckboxesBySelector('input.core-field-#{field}')",
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}",
</td>
</tr>
<% @custom_fields.each do |field| %>
- <tr class="<%= cycle("odd", "even") %>">
+ <tr>
<td class="name">
<%= link_to_function('', "toggleCheckboxesBySelector('input.custom-field-#{field.id}')",
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}",
</tr></thead>
<tbody>
<% for tracker in @trackers %>
- <tr class="<%= cycle("odd", "even") %>">
+ <tr>
<td class="name"><%= link_to tracker.name, edit_tracker_path(tracker) %></td>
<td>
<% unless tracker.workflow_rules.count > 0 %>
</tr></thead>
<tbody>
<% for user in @users -%>
- <tr class="<%= user.css_classes %> <%= cycle("odd", "even") %>">
+ <tr class="<%= user.css_classes %>">
<td class="username"><%= avatar(user, :size => "14") %><%= link_to user.login, edit_user_path(user) %></td>
<td class="firstname"><%= user.firstname %></td>
<td class="lastname"><%= user.lastname %></td>
<% show_diff = @versions.size > 1 %>
<% line_num = 1 %>
<% @versions.each do |ver| %>
-<tr class="wiki-page-version <%= cycle("odd", "even") %>">
+<tr class="wiki-page-version">
<td class="id"><%= link_to ver.version, :action => 'show', :id => @page.title, :project_id => @page.project, :version => ver.version %></td>
<td class="checkbox"><%= radio_button_tag('version', ver.version, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('#cbto-#{line_num+1}').prop('checked', true);") if show_diff && (line_num < @versions.size) %></td>
<td class="checkbox"><%= radio_button_tag('version_from', ver.version, (line_num==2), :id => "cbto-#{line_num}") if show_diff && (line_num > 1) %></td>
<tbody>
<% for old_status in [nil] + @statuses %>
<% next if old_status.nil? && name != 'always' %>
- <tr class="<%= cycle("odd", "even") %>">
+ <tr>
<td class="name">
<%= link_to_function('', "toggleCheckboxesBySelector('table.transitions-#{name} input.old-status-#{old_status.try(:id) || 0}')",
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}",
</thead>
<tbody>
<% @trackers.each do |tracker| -%>
-<tr class="<%= cycle('odd', 'even') %>">
+<tr>
<td class="name"><%= tracker.name %></td>
<% @roles.each do |role| -%>
<% count = @workflow_counts[[tracker.id, role.id]] || 0 %>
</td>
</tr>
<% @fields.each do |field, name| %>
- <tr class="<%= cycle("odd", "even") %>">
+ <tr>
<td class="name">
<%= name %> <%= content_tag('span', '*', :class => 'required') if field_required?(field) %>
</td>
</td>
</tr>
<% @custom_fields.each do |field| %>
- <tr class="<%= cycle("odd", "even") %>">
+ <tr>
<td class="name">
<%= field.name %> <%= content_tag('span', '*', :class => 'required') if field_required?(field) %>
</td>
type: 'put',
dataType: 'script',
data: data,
- success: function(data){
- sortable.children(":even").removeClass("even").addClass("odd");
- sortable.children(":odd").removeClass("odd").addClass("even");
- },
error: function(jqXHR, textStatus, errorThrown){
alert(jqXHR.status);
sortable.sortable("cancel");
tr.wiki-page-version td.updated_on, tr.wiki-page-version td.author {text-align:center;}
+div.mypage-box table.time-entries tr.time-entry { background-color: #fff; }
+div.mypage-box table.time-entries tr.odd { background-color:#f6f7f8; }
tr.time-entry { text-align: center; white-space: nowrap; }
tr.time-entry td.issue, tr.time-entry td.comments, tr.time-entry td.subject, tr.time-entry td.activity { text-align: left; white-space: normal; }
td.hours { text-align: right; font-weight: bold; padding-right: 0.5em; }
table.list.enumerations {table-layout: fixed;}
-tr.group td { padding: 0.8em 0 0.5em 0.3em; border-bottom: 1px solid #ccc; text-align:left; }
+tr.group td { padding: 0.8em 0 0.5em 0.3em; border-bottom: 1px solid #ccc; text-align:left; background-color: #fff;}
tr.group span.name {font-weight:bold;}
tr.group span.count {font-weight:bold; position:relative; top:-1px; color:#fff; font-size:10px; background:#9DB9D5; padding:0px 6px 1px 6px; border-radius:3px; margin-left:4px;}
tr.group span.totals {color: #aaa; font-size: 80%;}
table.list tbody tr.group:hover { background-color:inherit; }
table td {padding:2px;}
table p {margin:0;}
-.odd {background-color:#f6f7f8;}
-.even {background-color: #fff;}
+table.list tbody tr:nth-child(odd), #issue-changesets div.changeset:nth-child(odd) {background-color:#f6f7f8;}
+table.list tbody tr:nth-child(even), #issue-changesets div.changeset:nth-child(even) {background-color: #fff;}
tr.builtin td.name {font-style:italic;}