187 |
187 |
"t+" => :label_in,
|
188 |
188 |
"t" => :label_today,
|
189 |
189 |
"ld" => :label_yesterday,
|
|
190 |
"nw" => :label_next_week,
|
190 |
191 |
"w" => :label_this_week,
|
191 |
192 |
"lw" => :label_last_week,
|
192 |
193 |
"l2w" => [:label_last_n_weeks, {:count => 2}],
|
... | ... | |
210 |
211 |
:list_status => [ "o", "=", "!", "c", "*" ],
|
211 |
212 |
:list_optional => [ "=", "!", "!*", "*" ],
|
212 |
213 |
:list_subprojects => [ "*", "!*", "=" ],
|
213 |
|
:date => [ "=", ">=", "<=", "><", "<t+", ">t+", "><t+", "t+", "t", "ld", "w", "lw", "l2w", "m", "lm", "y", ">t-", "<t-", "><t-", "t-", "!*", "*" ],
|
214 |
|
:date_past => [ "=", ">=", "<=", "><", ">t-", "<t-", "><t-", "t-", "t", "ld", "w", "lw", "l2w", "m", "lm", "y", "!*", "*" ],
|
|
214 |
:date => [ "=", ">=", "<=", "><", "<t+", ">t+", "><t+", "t+", "t", "ld", "nw", "w", "lw", "l2w", "m", "lm", "y", ">t-", "<t-", "><t-", "t-", "!*", "*" ],
|
|
215 |
:date_past => [ "=", ">=", "<=", "><", ">t-", "<t-", "><t-", "t-", "t", "ld", "nw", "w", "lw", "l2w", "m", "lm", "y", "!*", "*" ],
|
215 |
216 |
:string => [ "=", "~", "!", "!~", "!*", "*" ],
|
216 |
217 |
:text => [ "~", "!~", "!*", "*" ],
|
217 |
218 |
:integer => [ "=", ">=", "<=", "><", "!*", "*" ],
|
... | ... | |
277 |
278 |
# filter requires one or more values
|
278 |
279 |
(values_for(field) and !values_for(field).first.blank?) or
|
279 |
280 |
# filter doesn't require any value
|
280 |
|
["o", "c", "!*", "*", "t", "ld", "w", "lw", "l2w", "m", "lm", "y"].include? operator_for(field)
|
|
281 |
["o", "c", "!*", "*", "t", "ld", "nw", "w", "lw", "l2w", "m", "lm", "y"].include? operator_for(field)
|
281 |
282 |
end if filters
|
282 |
283 |
end
|
283 |
284 |
|
... | ... | |
745 |
746 |
when "ld"
|
746 |
747 |
# = yesterday
|
747 |
748 |
sql = relative_date_clause(db_table, db_field, -1, -1)
|
|
749 |
when "nw"
|
|
750 |
# = next week
|
|
751 |
first_day_of_week = l(:general_first_day_of_week).to_i
|
|
752 |
day_of_week = Date.today.cwday
|
|
753 |
days_ago = (day_of_week >= first_day_of_week ? day_of_week - first_day_of_week : day_of_week + 7 - first_day_of_week)
|
|
754 |
sql = relative_date_clause(db_table, db_field, - days_ago + 7, - days_ago + 6 + 7)
|
748 |
755 |
when "w"
|
749 |
756 |
# = this week
|
750 |
757 |
first_day_of_week = l(:general_first_day_of_week).to_i
|