28 Commits
Author SHA1 Message Date
Felipe Artur 0bef4b9764 Implement review suggestions 2016-04-07 10:59:24 -03:00
Felipe Artur 32c7e42b61 Improve code 2016-04-05 11:53:39 -03:00
Felipe Artur 5d42803045 Improve code 2016-04-05 11:53:39 -03:00
Felipe Artur 1ba9a91c6d Fix problem when creating milestones in groups without projects 2016-04-05 11:53:39 -03:00
Rémy Coutable e989d12b07 Use respond_to instead of a conditional to paginate milestones 2016-03-23 12:02:15 +01:00
Douwe Maan 8db1292139 Tweaks, refactoring, and specs 2016-03-20 21:04:07 +01:00
Stan Hu d800a949d2 Fix Error 500 when creating global milestones with Unicode characters
Two issues:

1. The constraints in the resources were incorrect. Here's what it was before:
```
group_milestone  GET /groups/:group_id/milestones/:id(.:format)  groups/milestones#show {:id=>/[a-zA-Z.0-9_\-]+(?<!\.atom)/, :group_id=>/[a-zA-Z.0-9_\-]+(?<!\.atom)/}
```

In this case, id is actually the title of the milestone, which can be anything at the moment.

After:

```
group_milestone  GET /groups/:group_id/milestones/:id(.:format)  groups/milestones#show {:id=>/[^\/]+/, :group_id=>/[a-zA-Z.0-9_\-]+(?<!\.atom)/}
```

2. `parameterize` would strip all Unicode characters, leaving a blank string. Rails would report something like:

ActionView::Template::Error (No route matches {:action=>"show", :controller=>"groups/milestones", :group_id=>#<Group id: 48, name: "ops-dev", path: "ops-dev", owner_id: nil, created_at: "2015-11-15 08:55:30", updated_at: "2015-12-02 06:23:26", type: "Group", description: "", avatar: "sha1.c71e73d51af1865c1bbbf6208e10044d46c9bb93.png", public: false>, :id=>"", :title=>"肯定不是中文的问题"} missing required keys: [:id]):

This change uses the babosa library to create a better slug, which surprisingly
isn't actually used by the global milestone controllers. Instead, they use the
title passed as a query string for some reason.

Closes https://github.com/gitlabhq/gitlabhq/issues/9881

Fix constraints
2015-12-05 00:04:44 -08:00
Dmitriy Zaporozhets 929ab909c8 Group masters should be able to create/close milestones
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-16 16:14:19 +01:00
Dmitriy Zaporozhets 986695e136 Refactor global and group milestones logic
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-16 14:07:38 +01:00
Dmitriy Zaporozhets 05335a3c85 Create milestones in the group
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-16 14:07:38 +01:00
Douwe Maan 26ad250989 Add a page title to every page. 2015-04-30 19:12:15 +02:00
Jeroen van Baarsen 5a4ebfb47a Fixed the Rails/ActionFilter cop
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-04-20 15:39:37 +02:00
Douwe Maan ff3caad4ca Rename manage_group ability to admin_group for consistency with project. 2015-04-14 12:05:49 +02:00
Dmitriy Zaporozhets f0cbbd70bb Use same constant for amount of items per page 2015-03-12 15:37:00 -07:00
Douwe Maan fbc3cb69c3 Add dashboard milestones. 2015-03-03 16:19:37 +01:00
Marin Jankovski 3b5722bca9 Improve performance, ordering and pagination for group milestones. 2014-07-04 11:57:24 +02:00
Marin Jankovski 3e52517da1 Add feature tests for group milestone. 2014-06-30 16:18:26 +02:00
Marin Jankovski d3796b84f8 Show all issues and merge requests that could be considered opened or closed, includes reopened and merged. 2014-06-30 12:41:27 +02:00
Marin Jankovski d145f09cd6 Correct authorization for group milestones. 2014-06-30 11:38:03 +02:00
Marin Jankovski e66a8b4cda Move milestone link in group head, 2 column milestone for MR and issues. 2014-06-30 11:13:24 +02:00
Marin Jankovski c223fb1a96 Start building group milestone show page. 2014-06-30 09:45:16 +02:00
Marin Jankovski b6425f33bc Get one group milestone based on milestone title. 2014-06-30 09:44:30 +02:00
Marin Jankovski f0af302c83 Close and reopen group milestones. 2014-06-30 09:44:30 +02:00
Marin Jankovski 4ca8a175a2 Filter group milestones. 2014-06-30 09:44:30 +02:00
Marin Jankovski 0723bf1afa Move group milestone processing from service to model. 2014-06-30 09:44:30 +02:00
Marin Jankovski 58570880f0 Create group milestones service. 2014-06-30 09:44:30 +02:00
Marin Jankovski e1afea777a Show title of milestone. 2014-06-30 09:44:30 +02:00
Marin Jankovski ca6fd8841e Add group milestones routes and controller. 2014-06-30 09:42:28 +02:00