Conflicts: app/assets/javascripts/angular/directives/work_packages/options-dropdown-directive.js app/assets/javascripts/angular/models/query.js app/views/work_packages/index.html.erbpull/1318/head
commit
76b6860105
@ -0,0 +1,47 @@ |
||||
//-- copyright
|
||||
// OpenProject is a project management system.
|
||||
// Copyright (C) 2012-2014 the OpenProject Foundation (OPF)
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License version 3.
|
||||
//
|
||||
// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
|
||||
// Copyright (C) 2006-2013 Jean-Philippe Lang
|
||||
// Copyright (C) 2010-2013 the ChiliProject Team
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
// See doc/COPYRIGHT.rdoc for more details.
|
||||
//++
|
||||
|
||||
angular.module('openproject.workPackages.controllers') |
||||
|
||||
.controller('WorkPackageDetailsController', [ |
||||
'$scope', |
||||
'$stateParams', |
||||
function($scope, $stateParams) { |
||||
|
||||
$scope.workPackageId = $stateParams.workPackageId |
||||
|
||||
$scope.$watch('rows', function(rows) { |
||||
if (rows && rows.length > 0) { |
||||
var row = $scope.rows.find(function(row) { |
||||
return row.object.id == $scope.workPackageId; |
||||
}); |
||||
$scope.workPackage = row ? row.object : {}; |
||||
} |
||||
}); |
||||
} |
||||
]); |
@ -0,0 +1,52 @@ |
||||
//-- copyright
|
||||
// OpenProject is a project management system.
|
||||
// Copyright (C) 2012-2014 the OpenProject Foundation (OPF)
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License version 3.
|
||||
//
|
||||
// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
|
||||
// Copyright (C) 2006-2013 Jean-Philippe Lang
|
||||
// Copyright (C) 2010-2013 the ChiliProject Team
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
// See doc/COPYRIGHT.rdoc for more details.
|
||||
//++
|
||||
|
||||
openprojectApp.config([ |
||||
'$stateProvider', |
||||
'$urlRouterProvider', |
||||
function($stateProvider, $urlRouterProvider) { |
||||
|
||||
$urlRouterProvider.otherwise("/wp"); |
||||
|
||||
$stateProvider |
||||
.state('work-packages', { |
||||
url: "/wp", |
||||
abstract: true, |
||||
templateUrl: "/templates/work_packages.html", |
||||
controller: 'WorkPackagesController' |
||||
}) |
||||
.state('work-packages.list', { |
||||
url: "", |
||||
templateUrl: "/templates/work_packages.list.html" |
||||
}) |
||||
.state('work-packages.list.details', { |
||||
url: "/:workPackageId", |
||||
templateUrl: "/templates/work_packages.list.details.html", |
||||
controller: 'WorkPackageDetailsController' |
||||
}) |
||||
}]); |
@ -1 +1,13 @@ |
||||
# Headings |
||||
|
||||
``` |
||||
<h1>Headline H1</h1> |
||||
<span class="sample-text">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.<br /><br /></span> |
||||
<h2>Headline H2</h2> |
||||
<span class="sample-text">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.<br /><br /></span> |
||||
<h3>Headline H3</h3> |
||||
<span class="sample-text">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.<br /><br /></span> |
||||
<h4>Headline H4</h4> |
||||
<span class="sample-text">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.<br /><br /></span> |
||||
|
||||
``` |
||||
|
@ -1 +1,17 @@ |
||||
# Modal |
||||
|
||||
``` |
||||
<div id="content-behind-modal">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras |
||||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Crasdapibus. Vivamus elementum semper</div> |
||||
|
||||
<div id="modal-dark-overlay"> |
||||
</div> |
||||
|
||||
<div class="modal-container"> |
||||
<div class="modal-header"><i class="icon-close"></i></div> |
||||
<div class="modal-content"> |
||||
<h3>Modal Headline</h3> |
||||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper |
||||
</div> |
||||
</div> |
||||
``` |
||||
|
@ -0,0 +1,143 @@ |
||||
<%#-- copyright |
||||
OpenProject is a project management system. |
||||
Copyright (C) 2012-2014 the OpenProject Foundation (OPF) |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License version 3. |
||||
|
||||
OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
Copyright (C) 2006-2013 Jean-Philippe Lang |
||||
Copyright (C) 2010-2013 the ChiliProject Team |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License |
||||
as published by the Free Software Foundation; either version 2 |
||||
of the License, or (at your option) any later version. |
||||
|
||||
This program is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License |
||||
along with this program; if not, write to the Free Software |
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
|
||||
See doc/COPYRIGHT.rdoc for more details. |
||||
|
||||
++#%><!DOCTYPE html> |
||||
<% show_decoration = params["layout"].nil? %> |
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="<%= I18n.locale.to_s %>" xml:lang="<%= I18n.locale.to_s %>" class="<%= 'in_modal' unless show_decoration %>"> |
||||
<head> |
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> |
||||
<title><%= html_title %></title> |
||||
<meta name="description" content="<%= OpenProject::Info.app_name %>" /> |
||||
<meta name="keywords" content="issue,bug,type" /> |
||||
<meta name="app_base_path" content="<%= OpenProject::Configuration['rails_relative_url_root'] || '' %>" /> |
||||
<meta name="current_menu_item" content="<%= current_menu_item %>" /> |
||||
<meta name="accessibility-mode" content="<%= current_user.impaired? %>" /> |
||||
<%= csrf_meta_tags %> |
||||
<%= favicon_link_tag 'favicon.ico' %> |
||||
<%= stylesheet_link_tag current_theme.stylesheet_manifest, :media => "all" %> |
||||
<% if User.current.impaired? && accessibility_css_enabled? %> |
||||
<%= stylesheet_link_tag 'accessibility' %> |
||||
<% end %> |
||||
|
||||
<%= javascript_include_tag 'application' %> |
||||
<%= javascript_include_tag 'angular-i18n/angular-locale_de-de' if I18n.locale == :de %> |
||||
<!-- user specific tags --> |
||||
<%= user_specific_javascript_includes %> |
||||
<!-- project specific tags --> |
||||
<%= call_hook :view_layouts_base_html_head %> |
||||
<!-- page specific tags --> |
||||
<%= content_for(:header_tags) if content_for?(:header_tags) %> |
||||
</head> |
||||
<body class="<%= body_css_classes %>" ng-app="openproject"> |
||||
<noscript> |
||||
<div class="top-shelf icon icon-warning"> |
||||
<h1><%=l(:noscript_heading)%></h1> |
||||
<p> |
||||
<%=l(:noscript_description)%> |
||||
</p> |
||||
<h2> |
||||
<a href="http://www.enable-javascript.com/" target="_blank"><%=l(:noscript_learn_more) %></a> |
||||
</h2> |
||||
</div> |
||||
</noscript> |
||||
<% main_menu = render_main_menu(@project) %> |
||||
<% side_displayed = content_for?(:sidebar) || content_for?(:main_menu) || !main_menu.blank? %> |
||||
|
||||
<div id="wrapper" class="<%= (side_displayed) ? '' : "nosidebar" %><%= (show_decoration) ? '' : 'nomenus' %>"> |
||||
<% if show_decoration %> |
||||
<div id="top-menu"> |
||||
<div id="header"> |
||||
<div id="logo"> |
||||
<%= link_to(I18n.t('label_home'), home_url, :class => 'home-link') %> |
||||
</div> |
||||
<div id="top-menu-items"> |
||||
<%= render_top_menu_left %> |
||||
<div class="top-menu-items-right"> |
||||
<%= render :partial => 'search/mini_form' %> |
||||
|
||||
<h1 class="hidden-for-sighted"> |
||||
<%= l(:label_top_menu) %> |
||||
</h1> |
||||
|
||||
<%= render_top_menu_right %> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<% end %> |
||||
|
||||
<div id="main" class="<%= side_displayed ? '' : "nosidebar" %><%= (show_decoration) ? '' : 'nomenus' %>"> |
||||
<% if (side_displayed && show_decoration) %> |
||||
<div id="main-menu"> |
||||
<h1 class="hidden-for-sighted"><%= l(:label_main_menu) %></h1> |
||||
<div id="toggle-project-menu"> |
||||
<a href="javascript:;" title="<%= l(:show_hide_project_menu) %>" class="navigation-toggler icon4 icon-double-arrow-left"></a> |
||||
</div> |
||||
<div id="menu-sidebar"> |
||||
<%= main_menu %> |
||||
<%= content_for :main_menu %> |
||||
<!-- Sidebar --> |
||||
<div id="sidebar"> |
||||
<%= content_for :sidebar %> |
||||
<%= call_hook :view_layouts_base_sidebar %> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<% end %> |
||||
|
||||
<% if show_decoration %> |
||||
<div id="breadcrumb" class="<%= (side_displayed) ? '' : "nosidebar" %><%= (show_decoration) ? '' : 'nomenus' %>"> |
||||
<h1> |
||||
<%= you_are_here_info %> |
||||
<%= full_breadcrumb %> |
||||
</h1> |
||||
</div> |
||||
<% end %> |
||||
|
||||
<div class="<%= (side_displayed) ? '' : "nosidebar" %><%= (show_decoration) ? '' : 'nomenus' %>" id="content"> |
||||
|
||||
<div ui-view></div> |
||||
|
||||
<%= call_hook :view_layouts_base_content %> |
||||
<div style="clear:both;"> </div> |
||||
</div> |
||||
</div> |
||||
|
||||
<% if (show_decoration) %> |
||||
<div id="footer"> |
||||
<div class="footer-content"> |
||||
<%= footer_content %> |
||||
</div> |
||||
</div> |
||||
<% end %> |
||||
|
||||
<div id="ajax-indicator" style="display:none;"><span><%= l(:label_loading) %></span></div> |
||||
|
||||
</div> |
||||
<%= call_hook :view_layouts_base_body_bottom %> |
||||
</body> |
||||
</html> |
@ -1,62 +0,0 @@ |
||||
<%#-- copyright |
||||
OpenProject is a project management system. |
||||
Copyright (C) 2012-2014 the OpenProject Foundation (OPF) |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License version 3. |
||||
|
||||
OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
Copyright (C) 2006-2013 Jean-Philippe Lang |
||||
Copyright (C) 2010-2013 the ChiliProject Team |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License |
||||
as published by the Free Software Foundation; either version 2 |
||||
of the License, or (at your option) any later version. |
||||
|
||||
This program is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License |
||||
along with this program; if not, write to the Free Software |
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
|
||||
See doc/COPYRIGHT.rdoc for more details. |
||||
|
||||
++#%> |
||||
|
||||
<%= form_tag({}) do -%> |
||||
<back-url></back-url> |
||||
<div class="autoscroll"> |
||||
|
||||
<work-packages-table ng-if="rows && columns" |
||||
project-identifier="projectIdentifier" |
||||
columns="columns" |
||||
rows="rows" |
||||
query="query" |
||||
group-by="query.groupBy" |
||||
group-by-column="groupByColumn" |
||||
count-by-group="workPackageCountByGroup" |
||||
display-sums="query.displaySums" |
||||
total-sums="totalSums" |
||||
group-sums="groupSums" |
||||
class="list issues" |
||||
update-results="updateResults()" |
||||
with-loading="withLoading" |
||||
update-back-url="updateBackUrl"> |
||||
</work-packages-table> |
||||
|
||||
<table-pagination total-entries="totalEntries" |
||||
update-results="updateResults()"> |
||||
</table-pagination> |
||||
|
||||
<modal-loading> |
||||
</modal-loading> |
||||
|
||||
<work-package-context-menu></work-package-context-menu> |
||||
<column-context-menu></column-context-menu> |
||||
|
||||
</div> |
||||
<% end -%> |
@ -1,43 +0,0 @@ |
||||
<%#-- copyright |
||||
OpenProject is a project management system. |
||||
Copyright (C) 2012-2014 the OpenProject Foundation (OPF) |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License version 3. |
||||
|
||||
OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
Copyright (C) 2006-2013 Jean-Philippe Lang |
||||
Copyright (C) 2010-2013 the ChiliProject Team |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License |
||||
as published by the Free Software Foundation; either version 2 |
||||
of the License, or (at your option) any later version. |
||||
|
||||
This program is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License |
||||
along with this program; if not, write to the Free Software |
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
|
||||
See doc/COPYRIGHT.rdoc for more details. |
||||
|
||||
++#%> |
||||
|
||||
<%= form_tag({ controller: '/queries', action: 'new' }, id: 'query_form', name: 'queryForm', novalidate: true) do %> |
||||
<%= hidden_field_tag('project_id', project.to_param) if project %> |
||||
|
||||
<work-packages-options></work-packages-options> |
||||
|
||||
<p class="buttons hide-when-print"> |
||||
<filter-clear query="query"> |
||||
</filter-clear> |
||||
|
||||
<% if query.new_record? && User.current.allowed_to?(:save_queries, project, :global => true) %> |
||||
<a href="" ng-click="submitQueryForm()" class="icon icon-save1">Save</a> |
||||
<% end %> |
||||
</p> |
||||
<% end %> |
@ -0,0 +1,56 @@ |
||||
//-- copyright
|
||||
// OpenProject is a project management system.
|
||||
// Copyright (C) 2012-2014 the OpenProject Foundation (OPF)
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License version 3.
|
||||
//
|
||||
// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
|
||||
// Copyright (C) 2006-2013 Jean-Philippe Lang
|
||||
// Copyright (C) 2010-2013 the ChiliProject Team
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
// See doc/COPYRIGHT.rdoc for more details.
|
||||
//++
|
||||
|
||||
/*jshint expr: true*/ |
||||
|
||||
describe('WorkPackageDetailsController', function() { |
||||
var scope; |
||||
var buildController; |
||||
|
||||
beforeEach(module('openproject.workPackages.controllers')); |
||||
beforeEach(inject(function($rootScope, $controller, $timeout) { |
||||
scope = $rootScope.$new(); |
||||
|
||||
buildController = function() { |
||||
ctrl = $controller("WorkPackageDetailsController", { |
||||
$scope: scope, |
||||
$stateParams: { workPackageId: 99 } |
||||
}); |
||||
|
||||
// $timeout.flush();
|
||||
}; |
||||
|
||||
})); |
||||
|
||||
describe('initialisation', function() { |
||||
it('should initialise', function() { |
||||
buildController(); |
||||
}); |
||||
}); |
||||
|
||||
}); |
@ -0,0 +1,83 @@ |
||||
//-- copyright
|
||||
// OpenProject is a project management system.
|
||||
// Copyright (C) 2012-2014 the OpenProject Foundation (OPF)
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License version 3.
|
||||
//
|
||||
// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
|
||||
// Copyright (C) 2006-2013 Jean-Philippe Lang
|
||||
// Copyright (C) 2010-2013 the ChiliProject Team
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
// See doc/COPYRIGHT.rdoc for more details.
|
||||
//++
|
||||
|
||||
/*jshint expr: true*/ |
||||
|
||||
describe('ProjectService', function() { |
||||
|
||||
var $httpBackend, ProjectService; |
||||
beforeEach(module('openproject.services', 'openproject.models')); |
||||
|
||||
beforeEach(inject(function(_$httpBackend_, _ProjectService_) { |
||||
$httpBackend = _$httpBackend_; |
||||
ProjectService = _ProjectService_; |
||||
})); |
||||
|
||||
afterEach(function() { |
||||
$httpBackend.verifyNoOutstandingExpectation(); |
||||
$httpBackend.verifyNoOutstandingRequest(); |
||||
}); |
||||
|
||||
describe('getProject', function() { |
||||
beforeEach(function() { |
||||
$httpBackend.when('GET', '/api/v3/projects/superProject') |
||||
.respond({ |
||||
"project": { |
||||
"id": 99, |
||||
"name": "Super-Duper Project", |
||||
"parent_id": null, |
||||
"leaf?": true |
||||
} |
||||
}); |
||||
}) |
||||
|
||||
it('sends a successful get request', function() { |
||||
$httpBackend.expectGET('/api/v3/projects/superProject'); |
||||
|
||||
var callback = sinon.spy(), |
||||
project = ProjectService.getProject('superProject').then(callback); |
||||
|
||||
$httpBackend.flush(); |
||||
expect(callback).to.have.been.calledWith(sinon.match({ |
||||
name: "Super-Duper Project" |
||||
})); |
||||
}); |
||||
|
||||
it('sends a unsuccessful get request', function() { |
||||
$httpBackend.expectGET('/api/v3/projects/superProject').respond(401); |
||||
|
||||
var success = sinon.spy(), |
||||
error = sinon.spy(), |
||||
project = ProjectService.getProject('superProject').then(success, error); |
||||
|
||||
$httpBackend.flush(); |
||||
expect(success).not.to.have.been.called; |
||||
expect(error).to.have.been.called; |
||||
}); |
||||
}); |
||||
}); |
@ -0,0 +1,68 @@ |
||||
<div id="work-packages-index"> |
||||
|
||||
<div class="toolbar-container"> |
||||
<toolbar> |
||||
<selectable-title selected-title="selectedTitle" |
||||
reload-method="reloadQuery" |
||||
data-groups="dataGroups" |
||||
groups="groups"> |
||||
</selectable-title> |
||||
|
||||
<ul> |
||||
<li><button class="button_highlight" with-dropdown dropdown-id="tasksDropdown"><i class="icon-add icon4"></i>New Task<i class="icon-pulldown-arrow1 icon-dropdown"></i></button></li> |
||||
<li> |
||||
<button class="button" |
||||
ng-click="showFiltersOptions = !showFiltersOptions" |
||||
ng-class="{active: showFiltersOptions}"> |
||||
<i class="icon-pin icon-buttons"></i>Filter |
||||
</button> |
||||
</li> |
||||
<li> |
||||
<button class="button" ui-sref="work-packages.list" ui-sref-active="active">List</button> |
||||
<button class="button" ui-sref="work-packages.list.details({})" ui-sref-active="active">Details</button> |
||||
</li> |
||||
<li><button class="button last" with-dropdown dropdown-id="settingsDropdown"><i class="icon-settings"></i><i class="icon-pulldown-arrow1 icon-dropdown"></i></button></li> |
||||
</ul> |
||||
</toolbar> |
||||
</div> |
||||
|
||||
<div class="dropdown dropdown-relative dropdown-anchor-right" id="tasksDropdown"> |
||||
<ul class="dropdown-menu"> |
||||
<li><a ng-href="work_packages/new?work_package[type_id]={{type.id}}" ng-repeat="type in availableTypes">{{type.name}}</a></li> |
||||
</ul> |
||||
</div> |
||||
|
||||
<div options-dropdown class="dropdown dropdown-relative dropdown-anchor-right" id="settingsDropdown"> |
||||
<ul class="dropdown-menu"> |
||||
<li><a href ng-click="showColumnsModal()">Columns…</a></li> |
||||
<li><a href ng-click="showSortingModal()">Sorting…</a></li> |
||||
<li><a href ng-click="toggleDisplaySums()">Display sums</a></li> |
||||
<li class="dropdown-divider"></li> |
||||
<li><a href ng-click="showSaveModal()">Save</a></li> |
||||
<li><a href ng-click="showSaveModal(true)">Save as</a></li> |
||||
<li><a href ng-click="showExportModal()">Export</a></li> |
||||
<li ng-show="!query.isNew()"><a href ng-click="showShareModal()">Share</a></li> |
||||
</ul> |
||||
</div> |
||||
|
||||
<div class="title-bar" ng-show="showFiltersOptions"> |
||||
<div class="title-bar-extras"> |
||||
<work-packages-options></work-packages-options> |
||||
|
||||
<p class="buttons hide-when-print"> |
||||
<filter-clear query="query"> |
||||
</filter-clear> |
||||
|
||||
<!-- TODO: serialize permission checks --> |
||||
<!-- User.current.allowed_to?(:save_queries, project, :global => true) --> |
||||
<a href="" ng-click="submitQueryForm()" class="icon icon-save1">Save</a> |
||||
<!-- end --> |
||||
</p> |
||||
</div> |
||||
</div> |
||||
|
||||
<back-url></back-url> |
||||
|
||||
<div ui-view></div> |
||||
|
||||
</div> |
@ -0,0 +1,12 @@ |
||||
<hr> |
||||
|
||||
<h3>{{ workPackage.type.name }}</h3> |
||||
<h2>{{ workPackage.subject }}</h2> |
||||
<p>TODO: details panel goes here</p> |
||||
|
||||
<h3>Debug</h3> |
||||
<pre> |
||||
{{ workPackage | json }} |
||||
</pre> |
||||
|
||||
<button class="button" ui-sref="work-packages.list">Close details</button> |
@ -0,0 +1,31 @@ |
||||
<div class="autoscroll"> |
||||
|
||||
<work-packages-table ng-if="rows && columns" |
||||
project-identifier="projectIdentifier" |
||||
columns="columns" |
||||
rows="rows" |
||||
query="query" |
||||
group-by="query.groupBy" |
||||
group-by-column="groupByColumn" |
||||
count-by-group="workPackageCountByGroup" |
||||
display-sums="query.displaySums" |
||||
total-sums="totalSums" |
||||
group-sums="groupSums" |
||||
update-results="updateResults()" |
||||
with-loading="withLoading" |
||||
update-back-url="updateBackUrl"> |
||||
</work-packages-table> |
||||
|
||||
<table-pagination total-entries="totalEntries" |
||||
update-results="updateResults()"> |
||||
</table-pagination> |
||||
|
||||
<modal-loading> |
||||
</modal-loading> |
||||
|
||||
<work-package-context-menu></work-package-context-menu> |
||||
<column-context-menu></column-context-menu> |
||||
|
||||
</div> |
||||
|
||||
<div ui-view></div> |
@ -1,8 +1,8 @@ |
||||
<div class="ng-modal-window"> |
||||
<div class="ng-modal-inner"> |
||||
<a href class="ng-modal-close" ng-click="modal.closeMe()"> </a> |
||||
<div class="modal-header"><i class="icon-close" ng-click="modal.closeMe()"></i></div> |
||||
|
||||
<h1>Settings</h1> |
||||
<h3>Settings</h3> |
||||
|
||||
</div> |
||||
</div> |
||||
|
@ -1,8 +1,24 @@ |
||||
<div class="ng-modal-window"> |
||||
<div class="ng-modal-inner"> |
||||
<a href class="ng-modal-close" ng-click="modal.closeMe()"> </a> |
||||
<div class="ng-modal-inner modal-content"> |
||||
<div class="modal-header"><i class="icon-close" ng-click="modal.closeMe()"></i></div> |
||||
|
||||
<h1>Sorting</h1> |
||||
<h3>Sorting</h3> |
||||
|
||||
<div ng-repeat="element in sortElements"> |
||||
<input type="hidden" |
||||
ui-select2-sortable="sortByOptions" |
||||
simple-query="getAvailableColumnsData" |
||||
ng-model="element[0]"></input> |
||||
<input type="hidden" |
||||
ui-select2-sortable="sortDirectionOptions" |
||||
simple-query="getDirectionsData" |
||||
ng-model="element[1]"></input> |
||||
</div> |
||||
|
||||
<div> |
||||
<button ng-click="updateSortation()">Apply</button> |
||||
<button ng-click="modal.closeMe()">Cancel</button> |
||||
</div> |
||||
|
||||
</div> |
||||
</div> |
||||
|
Loading…
Reference in new issue