Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues for displaying and configuring #8

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 36 additions & 20 deletions app/views/hooks/redmine_tint_issues/_tint_issues_css.html.erb
Original file line number Diff line number Diff line change
@@ -1,96 +1,112 @@
<%= content_for :header_tags do -%>
<%# stylesheet_link_tag "redmine_tint_issues.css", :plugin => "redmine_tint_issues" %>
<style>

/* current */
table.list tbody tr.current:nth-child(odd) { background-color:<%= Setting['plugin_redmine_tint_issues']['current_issue_age_color'] %>; }
table.list tbody tr.current:nth-child(even) { background-color:<%= rti_lighten_css_color( Setting['plugin_redmine_tint_issues']['current_issue_age_color'], 0.05) %>; }
table.list tbody tr.current:nth-child(even) { background-color:<%= rti_lighten_css_color( Setting['plugin_redmine_tint_issues']['current_issue_age_color'], -0.05) %>; }
table.list tbody tr.current:nth-child(odd):hover { background-color:<%= rti_contrast_css_color( Setting['plugin_redmine_tint_issues']['current_issue_age_color']) %>; }
table.list tbody tr.current:nth-child(even):hover { background-color:<%= rti_contrast_css_color( Setting['plugin_redmine_tint_issues']['current_issue_age_color']) %>; }

/* old */
table.list tbody tr.old:nth-child(odd) { background-color:<%= Setting['plugin_redmine_tint_issues']['old_issue_age_color'] %>; }
table.list tbody tr.old:nth-child(even) { background-color:<%= rti_lighten_css_color( Setting['plugin_redmine_tint_issues']['old_issue_age_color'], 0.05) %>; }
table.list tbody tr.old:nth-child(even) { background-color:<%= rti_lighten_css_color( Setting['plugin_redmine_tint_issues']['old_issue_age_color'], -0.05) %>; }
table.list tbody tr.old:nth-child(odd):hover { background-color:<%= rti_contrast_css_color( Setting['plugin_redmine_tint_issues']['old_issue_age_color']) %>; }
table.list tbody tr.old:nth-child(even):hover { background-color:<%= rti_contrast_css_color( Setting['plugin_redmine_tint_issues']['old_issue_age_color']) %>; }

/* older */
table.list tbody tr.older:nth-child(odd) { background-color:<%= Setting['plugin_redmine_tint_issues']['older_issue_age_color'] %>; }
table.list tbody tr.older:nth-child(even) { background-color:<%= rti_lighten_css_color( Setting['plugin_redmine_tint_issues']['older_issue_age_color'], 0.05) %>; }
table.list tbody tr.older:nth-child(even) { background-color:<%= rti_lighten_css_color( Setting['plugin_redmine_tint_issues']['older_issue_age_color'], -0.05) %>; }
table.list tbody tr.older:nth-child(odd):hover { background-color:<%= rti_contrast_css_color( Setting['plugin_redmine_tint_issues']['older_issue_age_color']) %>; }
table.list tbody tr.older:nth-child(even):hover { background-color:<%= rti_contrast_css_color( Setting['plugin_redmine_tint_issues']['older_issue_age_color']) %>; }

/* veryold */
table.list tbody tr.veryold:nth-child(odd) { background-color:<%= Setting['plugin_redmine_tint_issues']['veryold_issue_age_color'] %>; }
table.list tbody tr.veryold:nth-child(even) { background-color:<%= rti_lighten_css_color( Setting['plugin_redmine_tint_issues']['veryold_issue_age_color'], 0.05) %>; }
table.list tbody tr.veryold:nth-child(even) { background-color:<%= rti_lighten_css_color( Setting['plugin_redmine_tint_issues']['veryold_issue_age_color'], -0.05) %>; }
table.list tbody tr.veryold:nth-child(odd):hover { background-color:<%= rti_contrast_css_color( Setting['plugin_redmine_tint_issues']['veryold_issue_age_color']) %>; }
table.list tbody tr.veryold:nth-child(even):hover { background-color:<%= rti_contrast_css_color( Setting['plugin_redmine_tint_issues']['veryold_issue_age_color']) %>; }

/* ancient */
table.list tbody tr.ancient:nth-child(odd) { background-color:<%= Setting['plugin_redmine_tint_issues']['ancient_issue_age_color'] %>; }
table.list tbody tr.ancient:nth-child(even) { background-color:<%= rti_lighten_css_color( Setting['plugin_redmine_tint_issues']['ancient_issue_age_color'], 0.05) %>; }
table.list tbody tr.ancient:nth-child(even) { background-color:<%= rti_lighten_css_color( Setting['plugin_redmine_tint_issues']['ancient_issue_age_color'], -0.05) %>; }
table.list tbody tr.ancient:nth-child(odd):hover { background-color:<%= rti_contrast_css_color( Setting['plugin_redmine_tint_issues']['ancient_issue_age_color']) %>; }
table.list tbody tr.ancient:nth-child(even):hover { background-color:<%= rti_contrast_css_color( Setting['plugin_redmine_tint_issues']['ancient_issue_age_color']) %>; }

/* hasduedate */
table.list tbody tr:nth-child(odd).hasduedate,
table.list tbody tr:nth-child(even).hasduedate
table.list tbody tr.hasduedate td:first-of-type
{
border-left-style: solid;
border-right-style: solid;
border-left-width: 5px;
border-left-color: <%= Setting['plugin_redmine_tint_issues']['hasduedate_color'] %>;
border-collapse: separate;
}
table.list tbody tr.hasduedate td:last-of-type
{
border-right-style: solid;
border-right-width: 5px;
border-right-color:<%= Setting['plugin_redmine_tint_issues']['hasduedate_color'] %>;
border-collapse: separate;
}

/* due */
table.list tbody tr:nth-child(odd).due,
table.list tbody tr:nth-child(even).due
table.list tbody tr.due td:first-of-type
{
border-left-style: solid;
border-right-style: solid;
border-left-width: 5px;
border-left-color: <%= Setting['plugin_redmine_tint_issues']['due_since_color'] %>;
border-collapse: separate;
}
table.list tbody tr.due td:last-of-type
{
border-right-style: solid;
border-right-width: 5px;
border-right-color: <%= Setting['plugin_redmine_tint_issues']['due_since_color'] %>;
border-collapse: separate;
}

/* moredue */
table.list tbody tr:nth-child(odd).moredue,
table.list tbody tr:nth-child(even).moredue
table.list tbody tr.moredue td:first-of-type
{
border-left-style: solid;
border-right-style: solid;
border-left-width: 5px;
border-left-color: <%= Setting['plugin_redmine_tint_issues']['moredue_since_color'] %>;
border-collapse: separate;
}
table.list tbody tr.moredue td:last-of-type
{
border-right-style: solid;
border-right-width: 5px;
border-right-color: <%= Setting['plugin_redmine_tint_issues']['moredue_since_color'] %>;
border-collapse: separate;
}

/* verydue */
table.list tbody tr:nth-child(odd).verydue,
table.list tbody tr:nth-child(even).verydue
table.list tbody tr.verydue td:first-of-type
{
border-left-style: solid;
border-right-style: solid;
border-left-width: 5px;
border-left-color: <%= Setting['plugin_redmine_tint_issues']['verydue_since_color'] %>;
border-collapse: separate;
}
table.list tbody tr.verydue td:last-of-type
{
border-right-style: solid;
border-right-width: 5px;
border-right-color: <%= Setting['plugin_redmine_tint_issues']['verydue_since_color'] %>;
border-collapse: separate;
}

/* overdue */
table.list tbody tr:nth-child(odd).overdue,
table.list tbody tr:nth-child(even).overdue
table.list tbody tr.overdue td:first-of-type
{
border-left-style: solid;
border-right-style: solid;
border-left-width: 5px;
border-left-color: <%= Setting['plugin_redmine_tint_issues']['overdue_color'] %>;
border-collapse: separate;
}
table.list tbody tr.overdue td:last-of-type
{
border-right-style: solid;
border-right-width: 5px;
border-right-color: <%= Setting['plugin_redmine_tint_issues']['overdue_color'] %>;
border-collapse: separate;
Expand Down
34 changes: 19 additions & 15 deletions app/views/redmine_tint_issues_plugin_settings/_settings.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
<fieldset class="box"><legend><%= l('redmine_tint_issues.label_issue_age_base') %></legend>
<p>
<label>
<%= l('redmine_tint_issues.label_age_by_creation_date') %>
<%= radio_button_tag( 'settings[age_by_creation_date]', '1', settings['age_by_creation_date'] == '1') %>
</label>
<%= content_tag(:a, l(:label_help), :href => "#", :class => "icon icon-help", :title => l(:label_help), :onclick => "$('#help_settings_age_by_creation_date').toggle(); return false;" ) %>
<%= content_tag(:span, l('redmine_tint_issues.help_settings_age_by_creation_date'), :id => 'help_settings_age_by_creation_date', :style => 'display:none;') %>
</p>
<p>
<label>
<%= l('redmine_tint_issues.label_age_by_update_date') %>
<%= radio_button_tag( 'settings[age_by_creation_date]', '0', settings['age_by_creation_date'] == '0') %>
</label>
<%= content_tag(:a, l(:label_help), :href => "#", :class => "icon icon-help", :title => l(:label_help), :onclick => "$('#help_settings_age_by_update_date').toggle(); return false;" ) %>
<%= content_tag(:span, l('redmine_tint_issues.help_settings_age_by_update_date'), :id => 'help_settings_age_by_update_date', :style => 'display:none;') %>
</p>
</fieldset>

<table class="list issues">
<tr class="issue current">
<td align="left" width="33%" style="text-align:left;width=33%;">
Expand Down Expand Up @@ -141,21 +160,6 @@
</tr>
</table>

<fieldset class="box"><legend><%= l('redmine_tint_issues.label_issue_age_base') %></legend>
<p>
<%= label_tag( 'settings[age_by_creation_date]', l('redmine_tint_issues.label_age_by_creation_date')) %>
<%= radio_button_tag( 'settings[age_by_creation_date]', '1', settings['age_by_creation_date'] == '1') %>
<%= content_tag(:a, l(:label_help), :href => "#", :class => "icon icon-help", :title => l(:label_help), :onclick => "$('#help_settings_age_by_creation_date').toggle(); return false;" ) %>
<%= content_tag(:span, l('redmine_tint_issues.help_settings_age_by_creation_date'), :id => 'help_settings_age_by_creation_date', :style => 'display:none;') %>
</p>
<p>
<%= label_tag( 'settings[age_by_creation_date]', l('redmine_tint_issues.label_age_by_update_date')) %>
<%= radio_button_tag( 'settings[age_by_creation_date]', '0', settings['age_by_creation_date'] == '0') %>
<%= content_tag(:a, l(:label_help), :href => "#", :class => "icon icon-help", :title => l(:label_help), :onclick => "$('#help_settings_age_by_update_date').toggle(); return false;" ) %>
<%= content_tag(:span, l('redmine_tint_issues.help_settings_age_by_update_date'), :id => 'help_settings_age_by_update_date', :style => 'display:none;') %>
</p>
</fieldset>

<%= javascript_include_tag "jscolor.js", :plugin => "redmine_tint_issues" %>

<%= content_for :header_tags do -%>
Expand Down
6 changes: 3 additions & 3 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ en:
settings_label_weeks: 'weeks'
settings_label_months: 'months'

settings_label_hasduedate: 'has due date'
settings_label_hasduedate: 'Has due date'
settings_label_due: '"due" is closer than'
settings_label_moredue: '"more due" is closer than'
settings_label_verydue: '"very due" is closer than'
settings_label_overdue: 'overdue '
settings_label_overdue: 'Overdue'
settings_label_nochoice: 'no possible choice'

label_issue_age_base: "Issue age base"
label_issue_age_base: "Issue age base (without start date)"
label_age_by_creation_date: "Age by creation date"
help_settings_age_by_creation_date: "Calculate issue age by creation date."
label_age_by_update_date: "Age by update date"
Expand Down