Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/assets/javascripts/advanced_search.js.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
3 changes: 3 additions & 0 deletions app/assets/stylesheets/advanced_search.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the Advanced_Search controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
11 changes: 11 additions & 0 deletions app/controllers/advanced_search_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class AdvancedSearchController < ApplicationController
skip_authorization_check
layout 'custom'

def index
end

def show
end

end
5 changes: 3 additions & 2 deletions app/controllers/design_methods_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ def index
end
end


def new
@new = true
@design_method = DesignMethod.new
Expand Down Expand Up @@ -217,7 +216,7 @@ def unclaimEditor
format.html { redirect_to @design_method, notice: 'Successfully unclaimed to be editor.'}
end
end

# Confirms that user is logged-in.
def edit_as_signed_in_user
unless signed_in?
Expand All @@ -242,4 +241,6 @@ def destroy
format.html { redirect_to '/design_methods', notice: 'Design method was successfully deleted.' }
end
end


end
2 changes: 2 additions & 0 deletions app/helpers/advanced_search_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module AdvancedSearchHelper
end
25 changes: 25 additions & 0 deletions app/views/advanced_search/show.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

.h1{:style => "margin-bottom:-2%; text-align:center"}Advanced Search Page

.panel.panel-default.login-margin.panel-primary
.panel-heading
%h3.panel-title Find Methods that have...
.panel-body
.input
Author's first name as
%input.form-control{:placeholder => "First Name", :type => "text"}/
.input
%br/
Author's last name as
%input.form-control{:placeholder => "Last Name", :type => "text"}/
.input
%br/
Title containing
%input.form-control{:placeholder => "Method Title", :type => "text"}/
.input
%br/
Key Words
%input.form-control{:placeholder => "Key Words", :style => "margin-bottom: 10px;", :type => "text"}/
.row
.col-md-12
%button.btn.btn-default.pull-right{:type => "submit"} Search
Empty file added app/views/feedbacks/untitled
Empty file.
2 changes: 2 additions & 0 deletions app/views/layouts/_sidebar.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@
%ul.sidebar-element
.category
= link_to x.name, search_category_design_methods_path(x.id), :class=> "category-heading sidebar-maincategory"
%ul.sidebar-element
= link_to "Advanced Search Page", advanced_search_show_path
2 changes: 2 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,6 @@
post "search", to: "application#search"
get "autocomplete_search", to: "application#search"

get "advanced_search/show"

end
12 changes: 12 additions & 0 deletions spec/controllers/advanced_search_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
require 'rails_helper'

RSpec.describe AdvancedSearchController, :type => :controller do

describe "GET 'show'" do
it "returns http success" do
get 'show'
expect(response).to be_success
end
end

end
15 changes: 15 additions & 0 deletions spec/helpers/advanced_search_helper_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'rails_helper'

# Specs in this file have access to a helper object that includes
# the AdvancedSearchHelper. For example:
#
# describe AdvancedSearchHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# expect(helper.concat_strings("this","that")).to eq("this that")
# end
# end
# end
RSpec.describe AdvancedSearchHelper, :type => :helper do
pending "add some examples to (or delete) #{__FILE__}"
end
5 changes: 5 additions & 0 deletions spec/views/advanced_search/show.html.haml_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
require 'rails_helper'

RSpec.describe "advanced_search/show.html.haml", :type => :view do
pending "add some examples to (or delete) #{__FILE__}"
end