diff --git a/app/components/base_component.rb b/app/components/base_component.rb
new file mode 100644
index 0000000..59c9e97
--- /dev/null
+++ b/app/components/base_component.rb
@@ -0,0 +1,14 @@
+class BaseComponent < ViewComponent::Base
+ attr_reader :ability, :current_user
+
+ def initialize(current_user:)
+ @current_user = current_user
+ @ability = Ability.new(current_user)
+ end
+
+ def can?(action, klass)
+ return if action.blank? || klass.blank?
+
+ ability.can?(action, klass)
+ end
+end
diff --git a/app/components/pagination_component.rb b/app/components/pagination_component.rb
new file mode 100644
index 0000000..5dffaeb
--- /dev/null
+++ b/app/components/pagination_component.rb
@@ -0,0 +1,5 @@
+class PaginationComponent < BaseComponent
+ def initialize(data:)
+ @data = data
+ end
+end
diff --git a/app/components/pagination_component/pagination_component.html.erb b/app/components/pagination_component/pagination_component.html.erb
new file mode 100644
index 0000000..2ee82ea
--- /dev/null
+++ b/app/components/pagination_component/pagination_component.html.erb
@@ -0,0 +1,17 @@
+
+
+
diff --git a/app/components/sidenav_component.rb b/app/components/sidenav_component.rb
new file mode 100644
index 0000000..554e4d1
--- /dev/null
+++ b/app/components/sidenav_component.rb
@@ -0,0 +1,4 @@
+class SidenavComponent < BaseComponent
+ def initialize(current_user:)
+ end
+end
diff --git a/app/components/sidenav_component/sidenav_component.html.erb b/app/components/sidenav_component/sidenav_component.html.erb
new file mode 100644
index 0000000..5c3d676
--- /dev/null
+++ b/app/components/sidenav_component/sidenav_component.html.erb
@@ -0,0 +1,10 @@
+
diff --git a/app/controllers/case_doctrines_controller.rb b/app/controllers/case_doctrines_controller.rb
new file mode 100644
index 0000000..5b04f2b
--- /dev/null
+++ b/app/controllers/case_doctrines_controller.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class CaseDoctrinesController < ApplicationController
+ def index; end
+
+ def new; end
+
+ def edit; end
+
+ def show; end
+
+ def create; end
+
+ def update; end
+
+ def destroy; end
+end
diff --git a/app/controllers/decisions_controller.rb b/app/controllers/decisions_controller.rb
new file mode 100644
index 0000000..3df557b
--- /dev/null
+++ b/app/controllers/decisions_controller.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class DecisionsController < ApplicationController
+ def index; end
+
+ def new; end
+
+ def edit; end
+
+ def show; end
+
+ def create; end
+
+ def update; end
+
+ def destroy; end
+end
diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb
index 95f2992..5463418 100644
--- a/app/controllers/home_controller.rb
+++ b/app/controllers/home_controller.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class HomeController < ApplicationController
def index
end
diff --git a/app/controllers/subject_indexes_controller.rb b/app/controllers/subject_indexes_controller.rb
new file mode 100644
index 0000000..7fa9863
--- /dev/null
+++ b/app/controllers/subject_indexes_controller.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class SubjectIndexesController < ApplicationController
+ def index; end
+
+ def new; end
+
+ def edit; end
+
+ def show; end
+
+ def create; end
+
+ def update; end
+
+ def destroy; end
+end
diff --git a/app/javascript/src/application.scss b/app/javascript/src/application.scss
new file mode 100644
index 0000000..f5b5997
--- /dev/null
+++ b/app/javascript/src/application.scss
@@ -0,0 +1,9 @@
+@import "~bootstrap/scss/bootstrap";
+@import "./application/sidenav";
+
+.main-layout {
+ padding-bottom: 10px !important;
+ position: absolute;
+ right: 0 !important;
+ top: 0 !important;
+}
diff --git a/app/javascript/src/application/sidenav.scss b/app/javascript/src/application/sidenav.scss
new file mode 100644
index 0000000..a21d2cc
--- /dev/null
+++ b/app/javascript/src/application/sidenav.scss
@@ -0,0 +1,13 @@
+.sidenav {
+ font-feature-settings: 'liga';
+ height: 100%;
+ height: -moz-calc(100%);
+ left: 0 !important;
+ position: fixed;
+ padding-top: 120px;
+ margin-top: 0;
+ overflow: auto;
+ text-rendering: optimizeLegibility;
+ width: inherit;
+ top: 0;
+}
diff --git a/app/models/ability.rb b/app/models/ability.rb
new file mode 100644
index 0000000..79728a8
--- /dev/null
+++ b/app/models/ability.rb
@@ -0,0 +1,25 @@
+
+class Ability
+ include CanCan::Ability
+
+ def initialize(user)
+ clear_aliased_actions
+
+ user ||= User.new
+ end
+
+ def clear_aliased_actions
+ super
+
+ # override cancan default aliasing (we don't want to differentiate
+ # between read and index)
+ alias_action :destroy, to: :delete
+ alias_action :edit, to: :update
+ alias_action :new, to: :create
+ alias_action :show, to: :read
+ alias_action :search, to: :index
+ alias_action :index, :read, to: :display
+ alias_action :create, :update, to: :modify
+ alias_action :display, :modify, to: :basic_manage
+ end
+end
\ No newline at end of file
diff --git a/app/views/case_doctrines/edit.html.erb b/app/views/case_doctrines/edit.html.erb
new file mode 100644
index 0000000..e69de29
diff --git a/app/views/case_doctrines/index.html.erb b/app/views/case_doctrines/index.html.erb
new file mode 100644
index 0000000..e69de29
diff --git a/app/views/case_doctrines/new.html.erb b/app/views/case_doctrines/new.html.erb
new file mode 100644
index 0000000..e69de29
diff --git a/app/views/case_doctrines/show.html.erb b/app/views/case_doctrines/show.html.erb
new file mode 100644
index 0000000..e69de29
diff --git a/app/views/decisions/edit.html.erb b/app/views/decisions/edit.html.erb
new file mode 100644
index 0000000..e69de29
diff --git a/app/views/decisions/index.html.erb b/app/views/decisions/index.html.erb
new file mode 100644
index 0000000..e69de29
diff --git a/app/views/decisions/new.html.erb b/app/views/decisions/new.html.erb
new file mode 100644
index 0000000..e69de29
diff --git a/app/views/decisions/show.html.erb b/app/views/decisions/show.html.erb
new file mode 100644
index 0000000..e69de29
diff --git a/app/views/kaminari/_first_page.html.erb b/app/views/kaminari/_first_page.html.erb
new file mode 100644
index 0000000..0cc83b9
--- /dev/null
+++ b/app/views/kaminari/_first_page.html.erb
@@ -0,0 +1,11 @@
+<%# Link to the "First" page
+ - available local variables
+ url: url to the first page
+ current_page: a page object for the currently displayed page
+ total_pages: total number of pages
+ per_page: number of items to fetch per page
+ remote: data-remote
+-%>
+
+ <%= link_to_unless current_page.first?, t('views.pagination.first').html_safe, url, remote: remote %>
+
diff --git a/app/views/kaminari/_gap.html.erb b/app/views/kaminari/_gap.html.erb
new file mode 100644
index 0000000..bbb0f98
--- /dev/null
+++ b/app/views/kaminari/_gap.html.erb
@@ -0,0 +1,8 @@
+<%# Non-link tag that stands for skipped pages...
+ - available local variables
+ current_page: a page object for the currently displayed page
+ total_pages: total number of pages
+ per_page: number of items to fetch per page
+ remote: data-remote
+-%>
+<%= t('views.pagination.truncate').html_safe %>
diff --git a/app/views/kaminari/_last_page.html.erb b/app/views/kaminari/_last_page.html.erb
new file mode 100644
index 0000000..bc777b4
--- /dev/null
+++ b/app/views/kaminari/_last_page.html.erb
@@ -0,0 +1,11 @@
+<%# Link to the "Last" page
+ - available local variables
+ url: url to the last page
+ current_page: a page object for the currently displayed page
+ total_pages: total number of pages
+ per_page: number of items to fetch per page
+ remote: data-remote
+-%>
+
+ <%= link_to_unless current_page.last?, t('views.pagination.last').html_safe, url, remote: remote %>
+
diff --git a/app/views/kaminari/_next_page.html.erb b/app/views/kaminari/_next_page.html.erb
new file mode 100644
index 0000000..3b0d054
--- /dev/null
+++ b/app/views/kaminari/_next_page.html.erb
@@ -0,0 +1,11 @@
+<%# Link to the "Next" page
+ - available local variables
+ url: url to the next page
+ current_page: a page object for the currently displayed page
+ total_pages: total number of pages
+ per_page: number of items to fetch per page
+ remote: data-remote
+-%>
+
+ <%= link_to_unless current_page.last?, t('views.pagination.next').html_safe, url, rel: 'next', remote: remote %>
+
diff --git a/app/views/kaminari/_page.html.erb b/app/views/kaminari/_page.html.erb
new file mode 100644
index 0000000..393bfc4
--- /dev/null
+++ b/app/views/kaminari/_page.html.erb
@@ -0,0 +1,12 @@
+<%# Link showing page number
+ - available local variables
+ page: a page object for "this" page
+ url: url to this page
+ current_page: a page object for the currently displayed page
+ total_pages: total number of pages
+ per_page: number of items to fetch per page
+ remote: data-remote
+-%>
+
+ <%= link_to_unless page.current?, page, url, {remote: remote, rel: page.rel} %>
+
diff --git a/app/views/kaminari/_paginator.html.erb b/app/views/kaminari/_paginator.html.erb
new file mode 100644
index 0000000..5525f48
--- /dev/null
+++ b/app/views/kaminari/_paginator.html.erb
@@ -0,0 +1,25 @@
+<%# The container tag
+ - available local variables
+ current_page: a page object for the currently displayed page
+ total_pages: total number of pages
+ per_page: number of items to fetch per page
+ remote: data-remote
+ paginator: the paginator that renders the pagination tags inside
+-%>
+<%= paginator.render do -%>
+
+<% end -%>
diff --git a/app/views/kaminari/_prev_page.html.erb b/app/views/kaminari/_prev_page.html.erb
new file mode 100644
index 0000000..0f32af4
--- /dev/null
+++ b/app/views/kaminari/_prev_page.html.erb
@@ -0,0 +1,11 @@
+<%# Link to the "Previous" page
+ - available local variables
+ url: url to the previous page
+ current_page: a page object for the currently displayed page
+ total_pages: total number of pages
+ per_page: number of items to fetch per page
+ remote: data-remote
+-%>
+
+ <%= link_to_unless current_page.first?, t('views.pagination.previous').html_safe, url, rel: 'prev', remote: remote %>
+
diff --git a/app/views/subject_indexes/edit.html.erb b/app/views/subject_indexes/edit.html.erb
new file mode 100644
index 0000000..e69de29
diff --git a/app/views/subject_indexes/index.html.erb b/app/views/subject_indexes/index.html.erb
new file mode 100644
index 0000000..e69de29
diff --git a/app/views/subject_indexes/new.html.erb b/app/views/subject_indexes/new.html.erb
new file mode 100644
index 0000000..e69de29
diff --git a/app/views/subject_indexes/show.html.erb b/app/views/subject_indexes/show.html.erb
new file mode 100644
index 0000000..e69de29
diff --git a/config/initializers/kaminari_config.rb b/config/initializers/kaminari_config.rb
new file mode 100644
index 0000000..4ba6ee3
--- /dev/null
+++ b/config/initializers/kaminari_config.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+Kaminari.configure do |config|
+ # config.default_per_page = 25
+ # config.max_per_page = nil
+ # config.window = 4
+ # config.outer_window = 0
+ # config.left = 0
+ # config.right = 0
+ # config.page_method_name = :page
+ # config.param_name = :page
+ # config.max_pages = nil
+ # config.params_on_first_page = false
+end
diff --git a/config/routes.rb b/config/routes.rb
index 8e5abfe..b0f7dd2 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,5 +1,9 @@
Rails.application.routes.draw do
- root to: "home#index"
-
devise_for :users
+
+ root to: "home#index"
+
+ resources :case_doctrines
+ resources :decisions
+ resources :subject_indexes
end