ecm_time_tracking_backend 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/ecm/time_tracking/backend/entries_controller.rb +1 -1
- data/app/controllers/ecm/time_tracking/backend/entry_types_controller.rb +17 -0
- data/app/views/ecm/time_tracking/backend/entries/_form.haml +1 -0
- data/app/views/ecm/time_tracking/backend/entries/_table.haml +1 -0
- data/app/views/ecm/time_tracking/backend/entry_types/_form.haml +2 -0
- data/app/views/ecm/time_tracking/backend/entry_types/_show.haml +4 -0
- data/app/views/ecm/time_tracking/backend/entry_types/_table.haml +3 -0
- data/config/routes.rb +1 -0
- data/lib/ecm/time_tracking/backend/version.rb +1 -1
- data/lib/generators/ecm/time_tracking/backend/install/templates/initializer.rb +4 -2
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cad000cddaef1fe3f0e6e0919a96f4d63813a04
|
4
|
+
data.tar.gz: 111ee356f1d2c3842ea5e46e206916dcec458fd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 615725f2b9fa16f09f45efc13894b62351477d1107ba026506a5bb47e7191aa9d1ac18ebba520ac5e875fb4f620ac7d0a86d40e7365d174adbecdda68a92c473
|
7
|
+
data.tar.gz: d9fb19df0541c3b763c0983f87b7446292681fcee40edb0c73f8e56fa631b9a9fed12e59b0e249f7b9940dc1518de609bc7ca98fb1862b84d7766df0407b7ab7
|
@@ -10,7 +10,7 @@ module Ecm
|
|
10
10
|
|
11
11
|
def permitted_params
|
12
12
|
p = params.dup; p[:entry].merge!(tracker_id: current_user.id)
|
13
|
-
p.require(:entry).permit(:begin_at, :end_at, :tracker_id, :break_length_in_minutes)
|
13
|
+
p.require(:entry).permit(:begin_at, :end_at, :tracker_id, :break_length_in_minutes, :entry_type_id)
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Ecm
|
2
|
+
module TimeTracking
|
3
|
+
module Backend
|
4
|
+
class EntryTypesController < Itsf::Backend::Resource::BaseController
|
5
|
+
def self.resource_class
|
6
|
+
Ecm::TimeTracking::EntryType
|
7
|
+
end
|
8
|
+
|
9
|
+
private
|
10
|
+
|
11
|
+
def permitted_params
|
12
|
+
params.require(:entry_type).permit(:identifier, :due_in_minutes)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
= form.association :entry_type, label_method: :human
|
1
2
|
/= form.input :begin_at, as: :string, input_html: { type: :'datetime-local', value: localize(form.object.begin_at, format: "%d.%m.%Y %H:%I") }
|
2
3
|
= form.input :begin_at, as: :string, input_html: { type: :'datetime-local', value: localize(form.object.begin_at, format: "%Y-%m-%dT%H:%M:%S.00") }
|
3
4
|
/= form.input :end_at, as: :string, input_html: { type: :'datetime-local' }
|
data/config/routes.rb
CHANGED
@@ -2,10 +2,12 @@ Ecm::TimeTracking::Backend.configure do |config|
|
|
2
2
|
# Set the resources, that will be shown in the backend menu.
|
3
3
|
#
|
4
4
|
# Default: config.registered_controllers = -> {[
|
5
|
-
# Ecm::TimeTracking::Backend::
|
6
|
-
#
|
5
|
+
# Ecm::TimeTracking::Backend::EntryTypesController,
|
6
|
+
# Ecm::TimeTracking::Backend::EntriesController
|
7
|
+
# ]}
|
7
8
|
#
|
8
9
|
config.registered_controllers = -> {[
|
10
|
+
Ecm::TimeTracking::Backend::EntryTypesController,
|
9
11
|
Ecm::TimeTracking::Backend::EntriesController
|
10
12
|
]}
|
11
13
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecm_time_tracking_backend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roberto Vasquez Angel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -41,11 +41,15 @@ files:
|
|
41
41
|
- app/assets/stylesheets/ecm/time_tracking/backend/application/dummy.css
|
42
42
|
- app/assets/stylesheets/ecm_time_tracking_backend.css
|
43
43
|
- app/controllers/ecm/time_tracking/backend/entries_controller.rb
|
44
|
+
- app/controllers/ecm/time_tracking/backend/entry_types_controller.rb
|
44
45
|
- app/controllers/ecm/time_tracking/backend/home_controller.rb
|
45
46
|
- app/helpers/ecm/time_tracking/backend/application_helper.rb
|
46
47
|
- app/views/ecm/time_tracking/backend/entries/_form.haml
|
47
48
|
- app/views/ecm/time_tracking/backend/entries/_show.haml
|
48
49
|
- app/views/ecm/time_tracking/backend/entries/_table.haml
|
50
|
+
- app/views/ecm/time_tracking/backend/entry_types/_form.haml
|
51
|
+
- app/views/ecm/time_tracking/backend/entry_types/_show.haml
|
52
|
+
- app/views/ecm/time_tracking/backend/entry_types/_table.haml
|
49
53
|
- app/views/layouts/ecm/time_tracking/backend/application.html.erb
|
50
54
|
- config/initializers/assets.rb
|
51
55
|
- config/locales/de.yml
|