Bugfixes: filters in build lists, link to project

This commit is contained in:
Wedge 2016-05-22 16:00:02 +03:00
parent 1b0356f39f
commit 9b7be45157
7 changed files with 15 additions and 7 deletions

View File

@ -100,7 +100,15 @@ function($scope, BuildListsService, $location, $interval, $uibModal) {
size: 'lg', size: 'lg',
resolve: { resolve: {
params: function() { params: function() {
return $location.search(); var ls = $location.search();
var res = {};
for(var i in ls) {
if(ls.hasOwnProperty(i)) {
res[i] = ls[i].toString();
}
}
return res;
} }
} }
}); });

View File

@ -1,4 +1,4 @@
json.project_link project_path(project_name_with_owner) json.project_link project_build_lists_path(project_name_with_owner)
json.build_list do json.build_list do
json.id item.data[:build_list_id] json.id item.data[:build_list_id]
json.link build_list_path(item.data[:build_list_id]) json.link build_list_path(item.data[:build_list_id])

View File

@ -29,7 +29,7 @@
td td
= link_to item[0], build_list_path(item[0]) = link_to item[0], build_list_path(item[0])
td td
= link_to item[1], project_path(item[1]) = link_to item[1], project_build_lists_path(item[1])
td td
= item[2] = item[2]
td td

View File

@ -42,7 +42,7 @@
td td
= t('activerecord.attributes.product_build_list.project') = t('activerecord.attributes.product_build_list.project')
td td
= link_to pbl.project.name_with_owner, project_path(pbl.project) = link_to pbl.project.name_with_owner, project_build_lists_path(pbl.project)
tr tr
td td

View File

@ -1,6 +1,6 @@
json.projects @projects do |project| json.projects @projects do |project|
json.visibility_class fa_visibility_icon(project) json.visibility_class fa_visibility_icon(project)
json.path project_path(project.name_with_owner) json.path project_build_lists_path(project.name_with_owner)
json.name project.name_with_owner json.name project.name_with_owner
json.add_path url_for(controller: :repositories, action: :add_project, project_id: project.id) json.add_path url_for(controller: :repositories, action: :add_project, project_id: project.id)
end end

View File

@ -3,7 +3,7 @@ json.total_items @total_items
json.projects @projects do |project| json.projects @projects do |project|
json.id project.id json.id project.id
json.visibility_class fa_visibility_icon(project) json.visibility_class fa_visibility_icon(project)
json.path project_path(project.name_with_owner) json.path project_build_lists_path(project.name_with_owner)
json.name project.name_with_owner json.name project.name_with_owner
if policy(@repository).remove_project? if policy(@repository).remove_project?
json.remove_path remove_project_platform_repository_path(@platform, @repository, project_id: project.id) json.remove_path remove_project_platform_repository_path(@platform, @repository, project_id: project.id)

View File

@ -1,6 +1,6 @@
json.projects @projects do |project| json.projects @projects do |project|
json.(project, :name) json.(project, :name)
json.path project_path(project) json.path project_build_lists_path(project)
json.public project.public? json.public project.public?
json.updated_at project.updated_at json.updated_at project.updated_at
json.updated_at_utc project.updated_at.strftime('%Y-%m-%d %H:%M:%S UTC') json.updated_at_utc project.updated_at.strftime('%Y-%m-%d %H:%M:%S UTC')