Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
cefe6fac
Commit
cefe6fac
authored
Sep 18, 2018
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract EE specific code to EE::SortingHelper
parent
cb78be1a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
29 deletions
+29
-29
app/helpers/sorting_helper.rb
app/helpers/sorting_helper.rb
+1
-28
ee/app/helpers/ee/sorting_helper.rb
ee/app/helpers/ee/sorting_helper.rb
+28
-1
No files found.
app/helpers/sorting_helper.rb
View file @
cefe6fac
...
@@ -16,8 +16,6 @@ module SortingHelper
...
@@ -16,8 +16,6 @@ module SortingHelper
sort_value_milestone
=>
sort_title_milestone
,
sort_value_milestone
=>
sort_title_milestone
,
sort_value_milestone_later
=>
sort_title_milestone_later
,
sort_value_milestone_later
=>
sort_title_milestone_later
,
sort_value_milestone_soon
=>
sort_title_milestone_soon
,
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
=>
sort_title_name
,
sort_value_name_desc
=>
sort_title_name_desc
,
sort_value_name_desc
=>
sort_title_name_desc
,
sort_value_oldest_created
=>
sort_title_oldest_created
,
sort_value_oldest_created
=>
sort_title_oldest_created
,
...
@@ -29,8 +27,7 @@ module SortingHelper
...
@@ -29,8 +27,7 @@ module SortingHelper
sort_value_popularity
=>
sort_title_popularity
,
sort_value_popularity
=>
sort_title_popularity
,
sort_value_priority
=>
sort_title_priority
,
sort_value_priority
=>
sort_title_priority
,
sort_value_upvotes
=>
sort_title_upvotes
,
sort_value_upvotes
=>
sort_title_upvotes
,
sort_value_contacted_date
=>
sort_title_contacted_date
,
sort_value_contacted_date
=>
sort_title_contacted_date
sort_value_weight
=>
sort_title_weight
}
}
end
end
...
@@ -143,10 +140,6 @@ module SortingHelper
...
@@ -143,10 +140,6 @@ module SortingHelper
s_
(
'SortOptions|Due date'
)
s_
(
'SortOptions|Due date'
)
end
end
def
sort_title_less_weight
s_
(
'SortOptions|Less weight'
)
end
def
sort_title_due_date_later
def
sort_title_due_date_later
s_
(
'SortOptions|Due later'
)
s_
(
'SortOptions|Due later'
)
end
end
...
@@ -163,10 +156,6 @@ module SortingHelper
...
@@ -163,10 +156,6 @@ module SortingHelper
s_
(
'SortOptions|Largest group'
)
s_
(
'SortOptions|Largest group'
)
end
end
def
sort_title_more_weight
s_
(
'SortOptions|More weight'
)
end
def
sort_title_largest_repo
def
sort_title_largest_repo
s_
(
'SortOptions|Largest repository'
)
s_
(
'SortOptions|Largest repository'
)
end
end
...
@@ -211,10 +200,6 @@ module SortingHelper
...
@@ -211,10 +200,6 @@ module SortingHelper
s_
(
'SortOptions|Oldest created'
)
s_
(
'SortOptions|Oldest created'
)
end
end
def
sort_title_weight
s_
(
'SortOptions|Weight'
)
end
def
sort_title_oldest_joined
def
sort_title_oldest_joined
s_
(
'SortOptions|Oldest joined'
)
s_
(
'SortOptions|Oldest joined'
)
end
end
...
@@ -312,10 +297,6 @@ module SortingHelper
...
@@ -312,10 +297,6 @@ module SortingHelper
'latest_activity_desc'
'latest_activity_desc'
end
end
def
sort_value_less_weight
'weight_asc'
end
def
sort_value_milestone
def
sort_value_milestone
'milestone'
'milestone'
end
end
...
@@ -328,10 +309,6 @@ module SortingHelper
...
@@ -328,10 +309,6 @@ module SortingHelper
'milestone_due_asc'
'milestone_due_asc'
end
end
def
sort_value_more_weight
'weight_desc'
end
def
sort_value_name
def
sort_value_name
'name_asc'
'name_asc'
end
end
...
@@ -395,8 +372,4 @@ module SortingHelper
...
@@ -395,8 +372,4 @@ module SortingHelper
def
sort_value_contacted_date
def
sort_value_contacted_date
'contacted_asc'
'contacted_asc'
end
end
def
sort_value_weight
'weight'
end
end
end
ee/app/helpers/ee/sorting_helper.rb
View file @
cefe6fac
...
@@ -7,7 +7,10 @@ module EE
...
@@ -7,7 +7,10 @@ module EE
def
sort_options_hash
def
sort_options_hash
{
{
sort_value_start_date
=>
sort_title_start_date
,
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
)
}.
merge
(
super
)
end
end
...
@@ -19,6 +22,18 @@ module EE
...
@@ -19,6 +22,18 @@ module EE
s_
(
'SortOptions|Planned finish date'
)
s_
(
'SortOptions|Planned finish date'
)
end
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
def
sort_value_start_date
'start_date_asc'
'start_date_asc'
end
end
...
@@ -26,5 +41,17 @@ module EE
...
@@ -26,5 +41,17 @@ module EE
def
sort_value_end_date
def
sort_value_end_date
'end_date_asc'
'end_date_asc'
end
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
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment