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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d66bce35ed479b9e4f6a1c410ecc6a20f8e80447
4
- data.tar.gz: 7f57ae1423b10ca733de57b136f208fd445ac39b
3
+ metadata.gz: 2cad000cddaef1fe3f0e6e0919a96f4d63813a04
4
+ data.tar.gz: 111ee356f1d2c3842ea5e46e206916dcec458fd0
5
5
  SHA512:
6
- metadata.gz: 72d5e6047fb7c8be4701ca3c7a8f690f701e53928ccf46b0f967e0d5dfa8a773d0fd50376be6020e10d6488d7595d6f375ac759568c43de02669f2536ff60e7c
7
- data.tar.gz: b4a142a2c4f8ea4dc7e820240f774cea64053bc4a3e819efd411ad8731a7f448b7450a60652ef07a681fc94f7b9547ebc7d0ea268fd51b2c9cda72545b7821fc
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' }
@@ -1,3 +1,4 @@
1
+ = table.association :entry_type, label_method: :human
1
2
  = table.column :begin_at
2
3
  = table.column :end_at
3
4
  = table.column :length do |resource|
@@ -0,0 +1,2 @@
1
+ = form.input :identifier
2
+ = form.input :due_in_minutes
@@ -0,0 +1,4 @@
1
+ = table.row :identifier
2
+ = table.row :due_in_hours
3
+ = table.row :created_at
4
+ = table.row :updated_at
@@ -0,0 +1,3 @@
1
+ = table.column :identifier
2
+ = table.column :due_in_hours
3
+ = table.timestamps
data/config/routes.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  Ecm::TimeTracking::Backend::Engine.routes.draw do
2
+ resources :entry_types
2
3
  resources :entries
3
4
 
4
5
  root to: 'home#index'
@@ -1,7 +1,7 @@
1
1
  module Ecm
2
2
  module TimeTracking
3
3
  module Backend
4
- VERSION = "0.0.1"
4
+ VERSION = "0.0.2"
5
5
  end
6
6
  end
7
7
  end
@@ -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::Entriesontroller
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.1
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-06 00:00:00.000000000 Z
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