This commit is contained in:
Vokhmin Alexey V 2014-03-21 22:42:03 +04:00
parent f04c1105d3
commit 7df3fd13d6
4 changed files with 16 additions and 9 deletions

View File

@ -13,7 +13,8 @@ RosaABF.factory('ApiCollaborator', ['$resource', function($resource) {
isArray : false
},
find: {
url: '/:owner/:project/collaborators/find.json',
url: '/:owner/:project/collaborators/find',
format: 'json',
method: 'GET',
isArray : true
}

View File

@ -5,27 +5,32 @@ RosaABF.factory("ApiProject", ['$resource', function($resource) {
{owner: '@project.owner.uname', project: '@project.name'},
{
tags: {
url: '/:owner/:project/tags.json',
url: '/:owner/:project/tags',
format: 'json',
method: 'GET',
isArray : false
},
branches: {
url: '/:owner/:project/branches.json',
url: '/:owner/:project/branches',
format: 'json',
method: 'GET',
isArray : false
},
delete_branch: {
url: '/:owner/:project/branches/:ref.json',
url: '/:owner/:project/branches/:ref',
format: 'json',
method: 'DELETE',
isArray : false
},
restore_branch: {
url: '/:owner/:project/branches/:ref.json', // ?sha=<sha>
url: '/:owner/:project/branches/:ref', // ?sha=<sha>
format: 'json',
method: 'PUT',
isArray : false
},
create_branch: {
url: '/:owner/:project/branches.json', // ?new_ref=<new_ref>&from_ref=<from_ref>
url: '/:owner/:project/branches', // ?new_ref=<new_ref>&from_ref=<from_ref>
format: 'json',
method: 'POST',
isArray : false
}

View File

@ -1,7 +1,7 @@
RosaABF.factory("ApiPullRequest", ['$resource', function($resource) {
var PullRequestResource = $resource(
'/:owner/:project/pull_requests/:serial_id.json',
'/:owner/:project/pull_requests/:serial_id?format=json',
{
owner: '@pull_request.to_ref.project.owner_uname',
project: '@pull_request.to_ref.project.name',
@ -13,7 +13,8 @@ RosaABF.factory("ApiPullRequest", ['$resource', function($resource) {
isArray : false
},
merge: {
url: '/:owner/:project/pull_requests/:serial_id/merge.json',
url: '/:owner/:project/pull_requests/:serial_id/merge',
format: 'json',
method: 'PUT',
isArray: false
}

View File

@ -7,7 +7,7 @@
.hr
%h3= t("layout.projects.build_schedule")
%div{ 'ng-controller' => 'ProjectScheduleController', 'ng-init' => "init('#{@project.name_with_owner}')" }
%div{ 'ng-controller' => 'ProjectScheduleController', 'ng-init' => "name_with_owner = '#{@project.name_with_owner}'" }
.leftlist= t('activerecord.attributes.project.autostart_status')
.rightlist