Merge pull request #611 from warpc/590-build_list_page_change
[refs #590] Dirty hack to fix BuildList#index
This commit is contained in:
commit
e535ff2fed
|
@ -25,8 +25,10 @@ class Projects::BuildListsController < Projects::BaseController
|
|||
def index
|
||||
@action_url = @project ? search_project_build_lists_path(@project) : search_build_lists_path
|
||||
@filter = BuildList::Filter.new(@project, current_user, params[:filter] || {})
|
||||
@build_lists = @filter.find.includes [:save_to_platform, :save_to_repository, :arch, :user => [:groups], :project => [:owner]]
|
||||
@build_lists = @build_lists.recent.paginate :page => params[:page]
|
||||
|
||||
@bls = @filter.find.recent.paginate :page => params[:page]
|
||||
@build_lists = BuildList.where(:id => @bls.pluck("#{BuildList.table_name}.id")).recent
|
||||
@build_lists = @build_lists.includes [:save_to_platform, :save_to_repository, :arch, :user, :project => [:owner]]
|
||||
|
||||
@build_server_status = begin
|
||||
BuildServer.get_status
|
||||
|
|
|
@ -5,8 +5,11 @@
|
|||
- if BuildList::HUMAN_STATUSES[build_list.status].in? [:build_pending, :build_started, :build_publish]
|
||||
%time.js-relative-date{:datetime => build_list.updated_at.strftime("%FT%T%:z"), :title => build_list.updated_at.strftime("%F %T")}
|
||||
= build_list.updated_at.strftime "%F %T"
|
||||
%td= link_to build_list.project.name_with_owner, build_list.project
|
||||
%td= build_list_version_link(build_list)
|
||||
- if build_list.project.present?
|
||||
%td= link_to build_list.project.name_with_owner, build_list.project
|
||||
%td= build_list_version_link(build_list)
|
||||
- else
|
||||
%td.centered{:colspan => 2}= t("layout.projects.unexisted_project")
|
||||
%td= link_to "#{build_list.save_to_platform.name}/#{build_list.save_to_repository.name}", [build_list.save_to_platform, build_list.save_to_repository]
|
||||
%td= build_list.arch.name
|
||||
%td= build_list.arch.try(:name) || t("layout.arches.unexisted_arch")
|
||||
%td= link_to build_list.user.try(:fullname), build_list.user
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
|
||||
});
|
||||
|
||||
= will_paginate @build_lists
|
||||
= will_paginate @bls
|
||||
|
||||
= render 'filter'
|
||||
= render @project ? 'projects/base/submenu' : 'projects/build_lists/submenu'
|
||||
|
|
|
@ -164,7 +164,6 @@ en:
|
|||
can_have_less_or_equal: You cannot have more than %{count} projects.
|
||||
|
||||
models:
|
||||
arch: Arch
|
||||
private_user: Private user
|
||||
product_build_list: Product build list
|
||||
|
||||
|
@ -183,9 +182,3 @@ en:
|
|||
private_user:
|
||||
login: Login
|
||||
password: Password
|
||||
|
||||
arch:
|
||||
name: Name
|
||||
created_at: Created
|
||||
updated_at: Updated
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
en:
|
||||
layout:
|
||||
arches:
|
||||
unexisted_arch: Unexisted arch
|
||||
|
||||
flash:
|
||||
arches:
|
||||
|
||||
activerecord:
|
||||
models:
|
||||
arch: Arch
|
||||
attributes:
|
||||
arch:
|
||||
name: Name
|
||||
created_at: Created
|
||||
updated_at: Updated
|
|
@ -0,0 +1,16 @@
|
|||
ru:
|
||||
layout:
|
||||
arches:
|
||||
unexisted_arch: Несуществующая архитектура
|
||||
|
||||
flash:
|
||||
arches:
|
||||
|
||||
activerecord:
|
||||
models:
|
||||
arch: Архитектура
|
||||
attributes:
|
||||
arch:
|
||||
name: Название
|
||||
created_at: Создана
|
||||
updated_at: Обновлена
|
|
@ -7,6 +7,7 @@ en:
|
|||
fork_to: Fork to %{to}
|
||||
fork_modal_header: Where do you want to fork this project?
|
||||
already_exists: Project already exists
|
||||
unexisted_project: Project not exists
|
||||
list: List
|
||||
list_header: Projects
|
||||
edit_header: Edit project
|
||||
|
|
|
@ -7,6 +7,7 @@ ru:
|
|||
fork_to: Клонировать в %{to}
|
||||
fork_modal_header: Куда Вы хотите клонировать проект?
|
||||
already_exists: Проект уже существует
|
||||
unexisted_project: Проект не существует
|
||||
list: Список
|
||||
list_header: Проекты
|
||||
edit_header: Редактировать проект
|
||||
|
|
|
@ -164,7 +164,6 @@ ru:
|
|||
can_have_less_or_equal: Нельзя иметь больше, чем %{count} проектов.
|
||||
|
||||
models:
|
||||
arch: Arch
|
||||
private_user: Приватный пользователь
|
||||
product_build_list: Сборочный лист продукта
|
||||
auto_build_list: Автоматическая пересборка пакетов
|
||||
|
@ -184,9 +183,3 @@ ru:
|
|||
private_user:
|
||||
login: Логин
|
||||
password: Пароль
|
||||
|
||||
arch:
|
||||
name: Название
|
||||
created_at: Создана
|
||||
updated_at: Обновлена
|
||||
|
||||
|
|
Loading…
Reference in New Issue