Skip to content

Commit

Permalink
Merge pull request #304 from sparc-request/jl-remove_step_links
Browse files Browse the repository at this point in the history
Jl remove step links
  • Loading branch information
jleonardw9 committed Mar 7, 2016
2 parents 3b8f308 + 23e9a94 commit 574811f
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 74 deletions.
1 change: 0 additions & 1 deletion app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,4 @@
//= require assert
//= require ajax_handler
//= require review
//= require steps

6 changes: 0 additions & 6 deletions app/assets/javascripts/steps.js.coffee

This file was deleted.

7 changes: 0 additions & 7 deletions app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -2845,13 +2845,6 @@ table.service_calendar tbody td.visit {
padding-top: 22px;
}

.steps_table_link {
width: 100%;
height: 100%;
text-decoration: none;
color: #fff;
}

#service_request_protocol_id {
width: 300px;
}
Expand Down
4 changes: 0 additions & 4 deletions app/controllers/service_requests_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -476,10 +476,6 @@ def new_document
@service_list = @service_request.service_list
end

def increment_click_counter
ClickCounter.first.increment!(:click_count)
end

private

# Send notifications to all users.
Expand Down
56 changes: 8 additions & 48 deletions app/views/service_requests/_steps.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -23,60 +23,20 @@
.test_table
%table.steps_table{:id => 'steps_banner', :usemap => '#steps_banner'}
%tr
%td
- if @service_request.group_valid? :protocol
= link_to "javascript:void(0);", :location => 'protocol', :validates => params[:action], :class => 'navigation_link' do
.steps_table_link= raw(t(:step_navigation)[:step_1])
- else
= raw(t(:step_navigation)[:step_1])
%td
- if @service_request.group_valid?(:service_details, :service_calendar, :service_subsidy)
= link_to "javascript:void(0);", :location => 'service_details', :validates => params[:action], :class => 'navigation_link' do
.steps_table_link= raw(t(:step_navigation)[:step_2])
- else
= raw(t(:step_navigation)[:step_2])
%td
- if @service_request.group_valid? :document_management
= link_to "javascript:void(0);", :location => 'document_management', :validates => params[:action], :class => 'navigation_link' do
.steps_table_link= raw(t(:step_navigation)[:step_3])
- else
= raw(t(:step_navigation)[:step_3])
%td
- if @service_request.group_valid? :document_management
= link_to "javascript:void(0);", :location => 'review', :validates => params[:action], :class => 'navigation_link' do
.steps_table_link= raw(t(:step_navigation)[:step_4])
- else
= raw(t(:step_navigation)[:step_4])
%td= raw(t(:step_navigation)[:step_1])
%td= raw(t(:step_navigation)[:step_2])
%td= raw(t(:step_navigation)[:step_3])
%td= raw(t(:step_navigation)[:step_4])
%td= raw(t(:step_navigation)[:step_5])
.grid_12.col-md-12
<!--[if !IE 8]> -->
.test_table
%table.steps_table{:id => 'steps_banner', :usemap => '#steps_banner'}
%tr
%td
- if @service_request.group_valid? :protocol
= link_to "javascript:void(0);", :location => 'protocol', :validates => params[:action], :class => 'navigation_link' do
.steps_table_link= raw(t(:step_navigation)[:step_1])
- else
= raw(t(:step_navigation)[:step_1])
%td
- if @service_request.group_valid?(:service_details, :service_calendar, :service_subsidy)
= link_to "javascript:void(0);", :location => 'service_details', :validates => params[:action], :class => 'navigation_link' do
.steps_table_link= raw(t(:step_navigation)[:step_2])
- else
= raw(t(:step_navigation)[:step_2])
%td
- if @service_request.group_valid? :document_management
= link_to "javascript:void(0);", :location => 'document_management', :validates => params[:action], :class => 'navigation_link' do
.steps_table_link= raw(t(:step_navigation)[:step_3])
- else
= raw(t(:step_navigation)[:step_3])
%td
- if @service_request.group_valid? :document_management
= link_to "javascript:void(0);", :location => 'review', :validates => params[:action], :class => 'navigation_link' do
.steps_table_link= raw(t(:step_navigation)[:step_4])
- else
= raw(t(:step_navigation)[:step_4])
%td= raw(t(:step_navigation)[:step_1])
%td= raw(t(:step_navigation)[:step_2])
%td= raw(t(:step_navigation)[:step_3])
%td= raw(t(:step_navigation)[:step_4])
%td= raw(t(:step_navigation)[:step_5])
<!-- <![endif]-->

Expand Down
1 change: 0 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@
match 'service_requests/:id/delete_document/:document_id' => 'service_requests#delete_documents', via: [:all]
match 'service_requests/:id/edit_document/:document_id' => 'service_requests#edit_documents', via: [:get, :post]
match 'service_requests/:id/new_document' => 'service_requests#new_document', via: [:get, :post]
match 'service_requests/increment_click_counter' => 'service_requests#increment_click_counter', via: [:post]

##### sparc-services routes brought in and namespaced
namespace :catalog_manager do
Expand Down
5 changes: 5 additions & 0 deletions db/migrate/20160229185056_drop_click_counters_table.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class DropClickCountersTable < ActiveRecord::Migration
def change
drop_table :click_counters
end
end
8 changes: 1 addition & 7 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20160217145001) do
ActiveRecord::Schema.define(version: 20160229185056) do

create_table "admin_rates", force: :cascade do |t|
t.integer "line_item_id", limit: 4
Expand Down Expand Up @@ -184,12 +184,6 @@
add_index "charges", ["service_id"], name: "index_charges_on_service_id", using: :btree
add_index "charges", ["service_request_id"], name: "index_charges_on_service_request_id", using: :btree

create_table "click_counters", force: :cascade do |t|
t.integer "click_count", limit: 4
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end

create_table "clinical_providers", force: :cascade do |t|
t.integer "identity_id", limit: 4
t.integer "organization_id", limit: 4
Expand Down

0 comments on commit 574811f

Please sign in to comment.