Commit cefe6fac authored by Lin Jen-Shin's avatar Lin Jen-Shin

Extract EE specific code to EE::SortingHelper

parent cb78be1a
......@@ -16,8 +16,6 @@ module SortingHelper
sort_value_milestone => sort_title_milestone,
sort_value_milestone_later => sort_title_milestone_later,
sort_value_milestone_soon => sort_title_milestone_soon,
sort_value_less_weight => sort_title_less_weight,
sort_value_more_weight => sort_title_more_weight,
sort_value_name => sort_title_name,
sort_value_name_desc => sort_title_name_desc,
sort_value_oldest_created => sort_title_oldest_created,
......@@ -29,8 +27,7 @@ module SortingHelper
sort_value_popularity => sort_title_popularity,
sort_value_priority => sort_title_priority,
sort_value_upvotes => sort_title_upvotes,
sort_value_contacted_date => sort_title_contacted_date,
sort_value_weight => sort_title_weight
sort_value_contacted_date => sort_title_contacted_date
}
end
......@@ -143,10 +140,6 @@ module SortingHelper
s_('SortOptions|Due date')
end
def sort_title_less_weight
s_('SortOptions|Less weight')
end
def sort_title_due_date_later
s_('SortOptions|Due later')
end
......@@ -163,10 +156,6 @@ module SortingHelper
s_('SortOptions|Largest group')
end
def sort_title_more_weight
s_('SortOptions|More weight')
end
def sort_title_largest_repo
s_('SortOptions|Largest repository')
end
......@@ -211,10 +200,6 @@ module SortingHelper
s_('SortOptions|Oldest created')
end
def sort_title_weight
s_('SortOptions|Weight')
end
def sort_title_oldest_joined
s_('SortOptions|Oldest joined')
end
......@@ -312,10 +297,6 @@ module SortingHelper
'latest_activity_desc'
end
def sort_value_less_weight
'weight_asc'
end
def sort_value_milestone
'milestone'
end
......@@ -328,10 +309,6 @@ module SortingHelper
'milestone_due_asc'
end
def sort_value_more_weight
'weight_desc'
end
def sort_value_name
'name_asc'
end
......@@ -395,8 +372,4 @@ module SortingHelper
def sort_value_contacted_date
'contacted_asc'
end
def sort_value_weight
'weight'
end
end
......@@ -7,7 +7,10 @@ module EE
def sort_options_hash
{
sort_value_start_date => sort_title_start_date,
sort_value_end_date => sort_title_end_date
sort_value_end_date => sort_title_end_date,
sort_value_less_weight => sort_title_less_weight,
sort_value_more_weight => sort_title_more_weight,
sort_value_weight => sort_title_weight
}.merge(super)
end
......@@ -19,6 +22,18 @@ module EE
s_('SortOptions|Planned finish date')
end
def sort_title_less_weight
s_('SortOptions|Less weight')
end
def sort_title_more_weight
s_('SortOptions|More weight')
end
def sort_title_weight
s_('SortOptions|Weight')
end
def sort_value_start_date
'start_date_asc'
end
......@@ -26,5 +41,17 @@ module EE
def sort_value_end_date
'end_date_asc'
end
def sort_value_less_weight
'weight_asc'
end
def sort_value_more_weight
'weight_desc'
end
def sort_value_weight
'weight'
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment