Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Navbar Links #197

Merged
merged 15 commits into from
Sep 28, 2023
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AdoptionApplicationReviewsController < ApplicationController
class Organizations::AdoptionApplicationReviewsController < Organizations::BaseController
before_action :verified_staff

def index
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class Organizations::FosterApplicationReviewsController < Organizations::BaseController
def index
end
end
kasugaijin marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 4 additions & 0 deletions app/controllers/organizations/settings_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class Organizations::SettingsController < Organizations::BaseController
def index
end
end
4 changes: 4 additions & 0 deletions app/controllers/organizations/staff_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class Organizations::StaffController < Organizations::BaseController
def index
end
end
415 changes: 71 additions & 344 deletions app/views/layouts/dashboard.html.erb

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

<!--edit application button-->
<div class="col-md-3 d-flex align-items-center justify-content-md-center">
<%= link_to 'Edit Application', edit_adopter_application_path(app.id),
<%= link_to 'Edit Application', edit_adoption_application_review_path(app.id),
class: 'btn btn-outline-dark
mt-3 mt-md-0 mb-3 mb-md-0' %>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>OMG this is awesome</p>
61 changes: 61 additions & 0 deletions app/views/organizations/foster_application_reviews/edit.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<!--page heading-->
<header class="pt-5 pb-5">
<div class="container">
<div class="text-center">
<h1 class="h4">
<%= @application.adopter_account.user.first_name %>
<%= @application.adopter_account.user.last_name %>'s application for
<%= @application.pet.name %>
</h1>
</div>
</div> <!--container-->
</header>

<!--main section-->
<section class="pb-5" id="about_us">
<div class="container">
<div class="row">
<div class="col-md-6 mx-auto card p-5 ">
<div class='d-flex flex-row-reverse'>
<%= link_to "#{@application.adopter_account.user.first_name}'s Profile",
kasugaijin marked this conversation as resolved.
Show resolved Hide resolved
profile_review_path(@application.adopter_account.adopter_profile.id),
class: 'text-decoration-none bigger' %>
</div>

<%= form_with model: @application, :url => adopter_application_path do |form| %>

<div class="form-group">
<%= form.label :status, 'Application status', class: 'bigger' %>
<%= form.select(:status,
AdopterApplication.app_review_statuses,
{},
{:class => "form-control"}) %>
</div>

<div class="form-group mt-2">
<%= form.label :notes, class: 'bigger' %>
<%= form.text_area :notes,
class: 'form-control mb-2' %>
</div>

<% if @application.profile_show == false %>
<div class="form-group" data-controller='reinstate-explanation'>
<div class="d-flex align-items-center gap-2">
<%= form.label 'Reinstate application:', class: 'bigger' %>
<%= form.check_box :profile_show, {}, true, false %>
<%= image_tag('question.png', height: '20',
data: { action: "click->reinstate-explanation#show",
reinstate_explanation_target: "icon" },
class: 'ms-2 cursor-hover') %>
</div>
<p data-reinstate-explanation-target='text' class='mt-0 bigger'></p>
</div>
<% end %>

<%= form.submit 'Save', class: 'btn btn-outline-dark mt-2'%>
<% end %>
</div> <!--card-->
</div> <!--row-->

</div> <!--container-->
</section>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>OMG this is awesome</p>
1 change: 1 addition & 0 deletions app/views/organizations/settings/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>These settings are set</p>
1 change: 1 addition & 0 deletions app/views/organizations/staff/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>Best staff evurr</p>
5 changes: 4 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
}

resources :adoptable_pets, only: [:index, :show]
resources :adopter_applications, only: [:index, :edit, :update], controller: "adoption_application_reviews"
resource :adopter_profile, except: :destroy, as: "profile"
resources :checklist_templates
resources :donations, only: [:create]
Expand All @@ -16,6 +15,10 @@
resources :home, only: [:index]
resources :pets
resources :dashboard
resources :adoption_application_reviews, only: [:index, :edit, :update]
resources :foster_application_reviews, only: [:index]
resources :settings, only: [:index]
resources :staff, only: [:index]
end

resources :profile_reviews, only: [:show]
Expand Down