Skip to content
This repository has been archived by the owner on Jul 30, 2019. It is now read-only.

Commit

Permalink
Merge eb0b6e8 into 0cd78b4
Browse files Browse the repository at this point in the history
  • Loading branch information
jessieay committed Sep 29, 2016
2 parents 0cd78b4 + eb0b6e8 commit 6bc436b
Show file tree
Hide file tree
Showing 18 changed files with 51 additions and 87 deletions.
1 change: 1 addition & 0 deletions app/assets/stylesheets/components/_auction-list-item.scss
Expand Up @@ -17,6 +17,7 @@
.auction-title {
font-size: 2.5rem;
margin-top: 0;
font-family: 'Merriweather';
}

.bidding-details {
Expand Down
7 changes: 4 additions & 3 deletions app/assets/stylesheets/components/_auction-show.scss
Expand Up @@ -17,8 +17,9 @@
width: 90%; // to make room for admin edit button
display: inline;
float: left;
margin-bottom: .5rem;
margin-top: 2rem;
font-family: 'Merriweather';
margin-bottom: 0;
margin-top: 3rem;
}

.usa-button-outline {
Expand All @@ -42,7 +43,7 @@
display: inline-block;

@include media($medium-screen) {
margin-top: 3rem;
margin-top: 4rem;
float: right;
}
}
Expand Down
Expand Up @@ -4,6 +4,7 @@
font-weight: $font-normal;

.status-label {
border-radius: 2px;
padding: .25em .5em;
font-weight: $font-bold;
}
Expand Down
6 changes: 0 additions & 6 deletions app/assets/stylesheets/components/_header.scss
Expand Up @@ -20,12 +20,6 @@
font-weight: $font-light;
margin-top: 1.25rem;
padding-left: 55px;

a {
font-family: 'Merriweather';
font-weight: 700;
color: $color-white;
}
}

.subtitle {
Expand Down
15 changes: 7 additions & 8 deletions app/assets/stylesheets/components/_pagination.scss
@@ -1,18 +1,13 @@
.pagination {
$pagination-border-color: $color-gray-light;
$pagination-border: 1px solid $pagination-border-color;
$pagination-background: lighten($pagination-border-color, 10);

a {
padding-left: ($site-margins / 2);
padding-right: ($site-margins / 2);
}

span {
background: $color-white;
border: $pagination-border;
border: 1px solid $color-gray-light;
outline: none;
margin: ($site-margins / 4);

&:hover,
&:focus {
Expand All @@ -22,10 +17,14 @@
}

.current {
display: inline-block;
padding-left: ($site-margins / 2);
padding-right: ($site-margins / 2);
background: $color-primary;
color: $color-white;
background: $color-gray-medium;

&:hover {
background: $color-primary;
color: $color-white;
}
}
}
16 changes: 0 additions & 16 deletions app/controllers/admin/auction_publish_controller.rb

This file was deleted.

13 changes: 0 additions & 13 deletions app/controllers/admin/auction_published_controller.rb

This file was deleted.

3 changes: 2 additions & 1 deletion app/models/auction_parser.rb
Expand Up @@ -23,13 +23,14 @@ def auction_params
:billable_to,
:c2_proposal_url,
:customer_id,
:delivery_status,
:delivery_url,
:description,
:github_repo,
:issue_url,
:notes,
:published,
:purchase_card,
:delivery_status,
:start_price,
:summary,
:title,
Expand Down
2 changes: 1 addition & 1 deletion app/presenters/bidding_status_presenter/future.rb
Expand Up @@ -16,7 +16,7 @@ def label_class
end

def label
'Coming Soon'
'Coming soon'
end

def tag_data_value_status
Expand Down
36 changes: 19 additions & 17 deletions app/views/admin/auctions/_publish_auction.html.erb
@@ -1,21 +1,23 @@
<%= simple_form_for [:admin, status.auction], url: admin_auction_publish_path, method: :patch do |f| %>
<fieldset class="datetime">
<legend>Auction starts</legend>
<%= render partial: 'sidebar_datetime_fields',
locals: { field: 'started', auction: status } %>
</fieldset>
<%= simple_form_for [:admin, status.auction], url: admin_auction_path, method: :patch do |f| %>
<fieldset class="datetime">
<legend>Auction starts</legend>
<%= render partial: 'sidebar_datetime_fields',
locals: { field: 'started', auction: status } %>
</fieldset>

<fieldset class="datetime">
<legend>Auction ends</legend>
<%= render partial: 'sidebar_datetime_fields',
locals: { field: 'ended', auction: status } %>
</fieldset>
<fieldset class="datetime">
<legend>Auction ends</legend>
<%= render partial: 'sidebar_datetime_fields',
locals: { field: 'ended', auction: status } %>
</fieldset>

<fieldset class="datetime">
<legend>Delivery deadline</legend>
<%= render partial: 'sidebar_datetime_fields',
locals: { field: 'delivery_due', auction: status } %>
</fieldset>
<fieldset class="datetime">
<legend>Delivery deadline</legend>
<%= render partial: 'sidebar_datetime_fields',
locals: { field: 'delivery_due', auction: status } %>
</fieldset>

<%= f.submit t('links_and_buttons.auctions.publish'), class: 'usa-button usa-button-outline' %>
<%= f.hidden_field :published, value: 'published', hidden: true %>
<%= f.submit t('links_and_buttons.auctions.publish'),
class: 'usa-button usa-button-outline action-button' %>
<% end %>
9 changes: 5 additions & 4 deletions app/views/admin/auctions/_unpublish.html.erb
@@ -1,4 +1,5 @@
<%= link_to I18n.t('statuses.admin_auction_status_presenter.future.published.actions.unpublish'),
admin_auction_published_path(status.auction),
method: :patch,
class: 'usa-button usa-button-outline action-button' %>
<%= simple_form_for [:admin, status.auction], url: admin_auction_path, method: :patch do |f| %>
<%= f.hidden_field :published, value: 'unpublished', hidden: true %>
<%= f.submit t('statuses.admin_auction_status_presenter.future.published.actions.unpublish'),
class: 'usa-button usa-button-outline action-button' %>
<% end %>
5 changes: 0 additions & 5 deletions config/locales/controllers/en.yml
Expand Up @@ -6,14 +6,9 @@ en:
success: "Auction created successfully"
update:
success: "Auction updated successfully"
unpublish:
success: "Auction: %{title} has been successfully unpublished"
auction_reports:
show:
error: "Registration not found for winning bidder DUNS number"
auction_publish:
update:
success: "Auction successfully published!"
auction_mark_payments:
update:
success: "The auction was marked as paid"
Expand Down
2 changes: 0 additions & 2 deletions config/routes.rb
Expand Up @@ -19,10 +19,8 @@

namespace :admin do
resources :auction_reports, only: [:show]
resources :auction_published, only: [:update]
resources :auction_rejections, only: [:update]
resources :auction_acceptances, only: [:update]
resources :auction_publish, only: [:update]
resources :auction_mark_payments, only: [:update]
resources :user_reports, only: [:index]
resources :proposals, only: [:create]
Expand Down
8 changes: 4 additions & 4 deletions features/admin_views_future_auction.feature
Expand Up @@ -7,12 +7,12 @@ Feature: Admin views future auction
And I sign in
And there is a future auction
When I visit the auction page
Then I should see a "Coming Soon" label
Then I should see a "Coming soon" label
And I should not see the bid form
And I should see the future published auction message for admins

When I click on the unpublish button
Then I should see a success message confirming that the auction was unpublished
Then I should see a success message confirming that the auction was updated

Scenario: Viewing the admin auction page
Given I am an administrator
Expand All @@ -22,7 +22,7 @@ Feature: Admin views future auction
Then I should see the future published auction message for admins

When I click on the unpublish button
Then I should see a success message confirming that the auction was unpublished
Then I should see a success message confirming that the auction was updated
And I should see the auction as an unpublished auction that is ready to be published

Scenario: Viewing the admin auction page for an auction that uses a non-default purchase card
Expand All @@ -34,5 +34,5 @@ Feature: Admin views future auction
Then I should see the future published auction message for admins

When I click on the unpublish button
Then I should see a success message confirming that the auction was unpublished
Then I should see a success message confirming that the auction was updated
And I should see the auction as an unpublished auction that is ready to be published
4 changes: 2 additions & 2 deletions features/guest_views_future_auction.feature
Expand Up @@ -6,10 +6,10 @@ Feature: Guest views future auction
Scenario: There is a future auction
Given there is a future auction
When I visit the home page
Then I should see a "Coming Soon" status
Then I should see a "Coming soon" status
And there should be meta tags for the index page for 0 open and 1 future auctions

When I visit the auction page
Then I should see a "Coming Soon" label
Then I should see a "Coming soon" label
And I should not see the bid form
And I should see the future auction message for guests
4 changes: 2 additions & 2 deletions features/step_definitions/bidding_steps.rb
Expand Up @@ -90,13 +90,13 @@

Then(/^I should see the bid form$/) do
within('.auction-show') do
expect(page).to have_selector(:css, '.auction-detail-panel form')
expect(page).to have_selector(:css, '.new_bid')
end
end

Then(/^I should not see the bid form$/) do
within('.auction-show') do
expect(page).not_to have_selector(:css, '.auction-detail-panel form')
expect(page).not_to have_selector(:css, '.new_bid')
end
end

Expand Down
4 changes: 2 additions & 2 deletions features/step_definitions/flash_message_steps.rb
Expand Up @@ -85,10 +85,10 @@
expect(page).not_to have_css('.flashes')
end

Then(/^I should see a success message confirming that the auction was unpublished$/) do
Then(/^I should see a success message confirming that the auction was updated$/) do
within("div.usa-alert.usa-alert-success") do
expect(page).to have_content(
"Auction: #{@auction.title} has been successfully unpublished"
I18n.t('controllers.admin.auctions.update.success')
)
end
end
2 changes: 1 addition & 1 deletion features/vendor_views_future_auction.feature
Expand Up @@ -7,6 +7,6 @@ Feature: Vendor views future auction
Given there is a future auction
And I am an authenticated vendor
When I visit the auction page
Then I should see a "Coming Soon" label
Then I should see a "Coming soon" label
And I should not see the bid form
And I should see the future auction message for vendors

0 comments on commit 6bc436b

Please sign in to comment.