faalis 0.15.1 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/faalis/dashboard/modules/modules.js +2 -2
- data/app/assets/javascripts/faalis/dashboard/variables.js.erb +0 -5
- data/app/controllers/faalis/api/v1/conversations_controller.rb +1 -1
- data/app/controllers/faalis/api/v1/groups_controller.rb +2 -2
- data/app/controllers/faalis/api/v1/logs_controller.rb +1 -1
- data/app/controllers/faalis/api/v1/permissions_controller.rb +1 -1
- data/app/controllers/faalis/api/v1/profiles_controller.rb +1 -1
- data/app/controllers/faalis/api/v1/users_controller.rb +1 -1
- data/app/views/faalis/api/v1/groups/index.json.jbuilder +1 -1
- data/lib/faalis/version.rb +1 -1
- data/lib/generators/faalis/js_scaffold_generator.rb +8 -0
- data/lib/generators/faalis/templates/angularjs/module.js.erb +7 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6cb432bbaba6c1a12a581c9acdd3814d89be3d0a
|
4
|
+
data.tar.gz: 93eae05d5c3b2be637c518425199ddd6909dd522
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b6df7c4975998f16542761762fa7bf68ea5a38be13d1c991fe0daa8aa326b9c7b3e2259f6da96e97e36fc0c35ac8df2e3e44734eecdb497a10d276eeecad2bb
|
7
|
+
data.tar.gz: f791ceaf0a0874ae4d754950fdd7bce0839a7c7c3beb5777af267b96003d4f29d1e2be3b1d2f8ce5f9ed26e14f369f7b40b708eb6af58b93aa250a213cbc4e57
|
@@ -27,11 +27,11 @@ Modules.controller("ModulesController", ["$location", "$scope", "$controller", "
|
|
27
27
|
}
|
28
28
|
// Check if user can pass the permission
|
29
29
|
if (User.can(menu.permission.action, menu.permission.model)) {
|
30
|
-
debug("You have " + menu.permission.action + " permission on " + menu.permission.model);
|
30
|
+
console.debug("You have " + menu.permission.action + " permission on " + menu.permission.model);
|
31
31
|
module.menu_items.push(menu);
|
32
32
|
}
|
33
33
|
else {
|
34
|
-
debug("User don't have " + menu.permission.action + " permission on " + menu.permission.model);
|
34
|
+
console.debug("User don't have " + menu.permission.action + " permission on " + menu.permission.model);
|
35
35
|
}
|
36
36
|
}
|
37
37
|
else {
|
@@ -17,8 +17,3 @@ window.templates_path = "/templates/";
|
|
17
17
|
// Any element of this queue will be appear as error after load event
|
18
18
|
window.ErrorQueue = [];
|
19
19
|
window.DashboardURL = "<%= url.dashboard_path %>";
|
20
|
-
<% if Rails.env == "development" %>
|
21
|
-
window.debug = true;
|
22
|
-
<% else %>
|
23
|
-
window.debug = false;
|
24
|
-
<% end %>
|
@@ -1,13 +1,13 @@
|
|
1
1
|
require_dependency "faalis/api_controller"
|
2
2
|
|
3
3
|
module Faalis
|
4
|
-
class API::V1::GroupsController < APIController
|
4
|
+
class API::V1::GroupsController < ::APIController
|
5
5
|
# TODO: Use strong params
|
6
6
|
# TODO: implement authorization
|
7
7
|
|
8
8
|
# GET /api/v1/groups
|
9
9
|
def index
|
10
|
-
@groups = Group.includes(:permissions).
|
10
|
+
@groups = Group.includes(:permissions).to_a
|
11
11
|
authorize! :read, Faalis::Group
|
12
12
|
respond_with(@groups)
|
13
13
|
end
|
data/lib/faalis/version.rb
CHANGED
@@ -128,6 +128,14 @@ module Faalis
|
|
128
128
|
# PRIVATES --------------------------------------------
|
129
129
|
private
|
130
130
|
|
131
|
+
# check for parent
|
132
|
+
def parent?
|
133
|
+
if options[:parent] != ""
|
134
|
+
return true
|
135
|
+
end
|
136
|
+
false
|
137
|
+
end
|
138
|
+
|
131
139
|
# Path to the resource
|
132
140
|
def resource_path
|
133
141
|
path_parts = resource_name.split("/")
|
@@ -27,15 +27,15 @@ var <%= resource.pluralize %> = angular.module("<%= resource %>", ["ListView", "
|
|
27
27
|
|
28
28
|
// Add any route you need here
|
29
29
|
$routeProvider.
|
30
|
-
when("<% if
|
30
|
+
when("<% if parent? %>/<%= options[:parent] %>/:<%= options[:parent] %>_id<% end %>/<%= resource_url %>", {
|
31
31
|
templateUrl: template("<%= resource_path %>/index"),
|
32
32
|
controller: "<%= resource %>Controller"
|
33
33
|
}).
|
34
|
-
when("<% if
|
34
|
+
when("<% if parent? %>/<%= options[:parent] %>/:<%= options[:parent] %>_id<% end %>/<%= resource_url %>/new",{
|
35
35
|
templateUrl: template("<%= resource_path %>/new"),
|
36
36
|
controller: "Add<%= resource %>Controller"
|
37
37
|
}).
|
38
|
-
when("<% if
|
38
|
+
when("<% if parent? %>/<%= options[:parent] %>/:<%= options[:parent] %>_id<% end %>/<%= resource_url %>/:id/edit",{
|
39
39
|
templateUrl: template("<%= resource_path %>/new"),
|
40
40
|
controller: "Add<%= resource %>Controller"
|
41
41
|
});
|
@@ -47,7 +47,7 @@ var <%= resource.pluralize %> = angular.module("<%= resource %>", ["ListView", "
|
|
47
47
|
<%= resource.pluralize %>.controller("<%= resource %>Controller", ["$scope", "gettext", "Restangular", "catch_error", "$location", "$routeParams",
|
48
48
|
function($scope, gettext, API, catch_error, $location, $routeParams){
|
49
49
|
|
50
|
-
<% if
|
50
|
+
<% if parent? %>
|
51
51
|
var <%= options[:parent] %>_id = $routeParams.<%= options[:parent] %>_id;
|
52
52
|
<% end %>
|
53
53
|
<% unless options[:no_filter] %>$scope.filter_config = {
|
@@ -98,7 +98,7 @@ var <%= resource.pluralize %> = angular.module("<%= resource %>", ["ListView", "
|
|
98
98
|
name: "create",
|
99
99
|
model: "<%= resource.classify %>"
|
100
100
|
},
|
101
|
-
route: "#<% if
|
101
|
+
route: "#<% if parent? %>/<%= options[:parent] %>/" + <%= options[:parent] %>_id + "<% end %>/<%= resource_url %>/new"
|
102
102
|
|
103
103
|
},<% unless options[:no_bulk] %>
|
104
104
|
{
|
@@ -228,7 +228,7 @@ var <%= resource.pluralize %> = angular.module("<%= resource %>", ["ListView", "
|
|
228
228
|
|
229
229
|
<%= resource.pluralize %>.controller("Add<%= resource %>Controller", ["Restangular", "$scope", "$location", "$routeParams", "gettext", "catch_error", function(API, $scope, $location, $routeParams, gettext, catch_error){
|
230
230
|
|
231
|
-
<% if
|
231
|
+
<% if parent? %>
|
232
232
|
var <%= options[:parent] %>_id = $routeParams.<%= options[:parent] %>_id;
|
233
233
|
<% end %>
|
234
234
|
|
@@ -281,7 +281,7 @@ var <%= resource.pluralize %> = angular.module("<%= resource %>", ["ListView", "
|
|
281
281
|
|
282
282
|
$scope.cancel = function(){
|
283
283
|
$(".form input").val("");
|
284
|
-
$location.path("#<% if
|
284
|
+
$location.path("#<% if parent? %>/<%= options[:parent] %>/" + <%= options[:parent] %>_id + "<% end %>/<%= resource_url %>");
|
285
285
|
};
|
286
286
|
|
287
287
|
$scope.save = function(save_another){
|