#237: sorted repositories in top of list in new build list page
This commit is contained in:
parent
0868bbc9b3
commit
95cdb1cc04
|
@ -19,6 +19,11 @@ module BuildListsHelper
|
|||
.joins(:repositories).uniq
|
||||
end
|
||||
|
||||
def platform_repositories(platform)
|
||||
repositories = platform.repositories.order(:name)
|
||||
repositories.select{ |r| %w(main base).include?(r.name) } | repositories
|
||||
end
|
||||
|
||||
def save_to_repositories(project)
|
||||
project.repositories.collect do |r|
|
||||
[
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
- platform.repositories.each do |repo|
|
||||
- platform_repositories(platform).each do |repo|
|
||||
.both
|
||||
= check_box_tag "build_list[include_repos][]", repo.id, repo.name == 'main' || @project.repositories.map(&:id).include?(repo.id), :id => "include_repos_#{repo.id}", :rep_name => repo.name
|
||||
= label_tag "include_repos_#{repo.id}", repo.name
|
||||
|
|
Loading…
Reference in New Issue