Merge pull request #940 from sgmap/remove_public_demo_page
[Fix #939] Remove demo page in staging
This commit is contained in:
commit
1f36d20220
6 changed files with 0 additions and 60 deletions
|
@ -1,13 +0,0 @@
|
|||
class DemoController < ApplicationController
|
||||
include SmartListing::Helper::ControllerExtensions
|
||||
helper SmartListing::Helper
|
||||
|
||||
def index
|
||||
return redirect_to root_path if Rails.env.production?
|
||||
|
||||
smart_listing_create :procedures,
|
||||
Procedure.publiees.order("id DESC"),
|
||||
partial: "demo/list",
|
||||
array: true
|
||||
end
|
||||
end
|
|
@ -1,27 +0,0 @@
|
|||
- unless smart_listing.empty?
|
||||
%table.table
|
||||
%tr
|
||||
%th{ colspan: 4 }
|
||||
%h4 Lien vers les procédures TPS
|
||||
%tr
|
||||
%th= smart_listing.sortable 'ID', 'id'
|
||||
%th= smart_listing.sortable 'Titre', 'libelle'
|
||||
%th Description
|
||||
%th= smart_listing.sortable 'Organisme', 'organisation'
|
||||
|
||||
- smart_listing.collection.each do |procedure|
|
||||
- procedure = procedure.decorate
|
||||
%tr
|
||||
%td
|
||||
= procedure.id
|
||||
%td.col-xs-4
|
||||
= link_to procedure.libelle, procedure.lien
|
||||
%td
|
||||
= procedure.description
|
||||
%td.col-xs-3
|
||||
= procedure.organisation
|
||||
|
||||
= smart_listing.paginate
|
||||
= smart_listing.pagination_per_page_links
|
||||
- else
|
||||
%p Aucune procédure trouvée
|
|
@ -1 +0,0 @@
|
|||
= smart_listing_render :procedures
|
|
@ -1 +0,0 @@
|
|||
<%= smart_listing_update :procedures %>
|
|
@ -39,7 +39,6 @@ Rails.application.routes.draw do
|
|||
root 'root#index'
|
||||
|
||||
get 'cgu' => 'cgu#index'
|
||||
get 'demo' => 'demo#index'
|
||||
get 'users' => 'users#index'
|
||||
get 'admin' => 'admin#index'
|
||||
get 'backoffice' => 'backoffice#index'
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe DemoController, type: :controller do
|
||||
describe 'GET #index' do
|
||||
subject { get :index }
|
||||
|
||||
it { expect(subject.status).to eq 200 }
|
||||
|
||||
context 'when rails environnement is production' do
|
||||
before do
|
||||
allow(Rails).to receive(:env).and_return(ActiveSupport::StringInquirer.new("production"))
|
||||
end
|
||||
|
||||
it { expect(subject.status).to eq 302 }
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue