Service: add index page
This commit is contained in:
parent
fc17b68dc1
commit
4d0a920e7a
3 changed files with 29 additions and 0 deletions
13
app/controllers/new_administrateur/services_controller.rb
Normal file
13
app/controllers/new_administrateur/services_controller.rb
Normal file
|
@ -0,0 +1,13 @@
|
|||
module NewAdministrateur
|
||||
class ServicesController < AdministrateurController
|
||||
def index
|
||||
@services = services
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def services
|
||||
current_administrateur.services
|
||||
end
|
||||
end
|
||||
end
|
14
app/views/new_administrateur/services/index.html.haml
Normal file
14
app/views/new_administrateur/services/index.html.haml
Normal file
|
@ -0,0 +1,14 @@
|
|||
.container
|
||||
%h1 Liste des Services
|
||||
|
||||
%table.table
|
||||
%thead
|
||||
%tr
|
||||
%th
|
||||
nom
|
||||
|
||||
%tbody
|
||||
- @services.each do |service|
|
||||
%tr
|
||||
%td
|
||||
= service.nom
|
|
@ -286,6 +286,8 @@ Rails.application.routes.draw do
|
|||
get 'apercu'
|
||||
end
|
||||
end
|
||||
|
||||
resources :services, only: [:index]
|
||||
end
|
||||
|
||||
apipie
|
||||
|
|
Loading…
Reference in a new issue