Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don't worry, you can still create the pull request.
  • 3 commits
  • 7 files changed
  • 0 commit comments
  • 1 contributor
View
22 features/review_submissions.feature
@@ -75,7 +75,7 @@ Feature: As a conference talks reviewer
And I am a logged in reviewer
And I am on the default proposal review page
When I rate the proposal with 3 stars
- Then the default proposal should have a 3 out of 5 star rating
+ Then the proposal I rated should have a 3 out of 5 star rating
And I should see "under review"
Scenario: Conference organizer approves proposal
@@ -132,7 +132,7 @@ Feature: As a conference talks reviewer
And I follow "Proposals"
Then I should see "rejected"
- Scenario: Conference organizer rejects an approved proposal
+ Scenario: Conference organizer rejects an approved proposal
Given a proposal exists
And there are no conference sessions
And I am a logged in organizer
@@ -144,6 +144,22 @@ Feature: As a conference talks reviewer
And I follow "Proposals"
Then I should see "rejected"
+ @57
+ Scenario: Reviewers see rating indicator for proposals they have already rated
+ Given I am a logged in reviewer
+ And I have rated a proposal
+ When I see all proposals
+ Then the proposal I rated should have a 3 out of 5 star rating
-
+ @wip
+ Scenario: Reviewer flags a proposal for follow-up
+ Given a proposal exists
+ When I flag the proposal for follow-up
+ Then I should see the proposal has been flagged
+
+ @wip
+ Scenario: Reviewer clears follow-up flag on proposal
+ Given a flagged proposal exists
+ When I clear the follow-up flag on the proposal
+ Then I should see the proposal is no longer flagged
View
38 features/step_definitions/proposal_steps.rb
@@ -15,10 +15,6 @@
-When /^I approve the proposal$/ do
- pending # express the regexp above with the code you wish you had
-end
-
Given /^there are no submitted talks$/ do
Proposal.destroy_all
end
@@ -63,16 +59,28 @@
end
end
+Given /^a comment "([^"]*)" was added to the proposal by (.*)$/ do |comment, reviewer|
+ Proposal.first.tap{|p| p.comments.create(:comment => comment, :user => User.find_by_username(reviewer))}.save
+end
+
+Given /^the proposal was rated with (\d+) star[s]? by (.*)$/ do |stars, reviewer|
+ Proposal.first.rate(stars.to_i, User.find_by_username(reviewer), 'appeal')
+end
+
+Given /^I have rated a proposal$/ do
+ Factory(:proposal).rate(3, User.last, 'appeal')
+end
+
When /^I rate the proposal with (\d+) stars$/ do |rating|
click_link rating
end
-Then /^the default proposal should have a (\d+) out of (\d+) star rating$/ do |rating, maximum|
- page.should have_content("Your rating: #{rating} out of #{maximum}")
+When /^I see all proposals$/ do
+ visit admin_proposals_path
end
-Given /^the proposal was rated with (\d+) star[s]? by (.*)$/ do |stars, reviewer|
- Proposal.first.rate(stars.to_i, User.find_by_username(reviewer), 'appeal')
+Then /^the proposal I rated should have a (\d+) out of (\d+) star rating$/ do |rating, maximum|
+ page.should have_content("Your rating: #{rating} out of #{maximum}")
end
def check_email(body)
@@ -84,22 +92,20 @@ def check_email(body)
ActionMailer::Base.deliveries.clear
end
-And /^a congrats email should be sent to the submitter$/ do
+Then /^a congrats email should be sent to the submitter$/ do
check_email "Congrats"
end
-And /^a rejection email should be sent to the submitter$/ do
+Then /^a rejection email should be sent to the submitter$/ do
check_email "isn't a good fit"
end
-And /^no email should be sent$/ do
+Then /^no email should be sent$/ do
ActionMailer::Base.deliveries.size.should == 0
end
-Given /^a comment "([^"]*)" was added to the proposal by (.*)$/ do |comment, reviewer|
- Proposal.first.tap{|p| p.comments.create(:comment => comment, :user => User.find_by_username(reviewer))}.save
+Then /^I see that I have rated the proposal$/ do
+ page.should have_content("")
+ page.should have_css('li#proposal-1 span.stars-3')
end
-
-
-
View
7 public/stylesheets/ajaxful_rating.css
@@ -19,7 +19,7 @@
padding: 0;
background-position: left top;
}
-.ajaxful-rating li{ display: inline; }
+/* .ajaxful-rating li{ display: inline; }*/
.ajaxful-rating a,
.ajaxful-rating span,
.ajaxful-rating .show-value{
@@ -32,16 +32,17 @@
outline: none;
overflow: hidden;
border: none;
+ padding: 0 0 !important;
}
.ajaxful-rating a:hover,
.ajaxful-rating a:active,
-.ajaxful-rating a:focus{
+.ajaxful-rating a:focus {
background-position: left bottom;
}
/* This section is generated dynamically.
Just add a call to the helper method 'ajaxful_rating_style' within
-the head tags in your main layout
+the head tags in your main layout
.ajaxful-rating .stars-1{
width: 20%;
z-index: 6;
View
2  vendor/engines/proposals/app/controllers/admin/proposals_controller.rb
@@ -18,7 +18,7 @@
module Admin
class ProposalsController < Admin::BaseController
expose(:proposal)
- expose(:current_proposals) { proposals_for_format.paginate({:page => params[:page], :per_page => 10})}
+ expose(:current_proposals) { proposals_for_format.paginate({:page => params[:page], :per_page => 20})}
expose(:session_times) { SessionTime.current_year }
expose(:format) { params[:format] || 'talk' }
expose(:format_name) { format.capitalize.pluralize }
View
1  vendor/engines/proposals/app/views/admin/proposals/_proposal.html.erb
@@ -1,4 +1,5 @@
<li class='clearfix record <%= cycle("on", "on-hover") %>' id="<%= dom_id(proposal) -%>">
+ <span style="float: right;"><%= ratings_for proposal, :show_user_rating => true, :dimension => :appeal, :wrap => false, :remote_options => { :url => '' } %></span>
<span class='title'>
<%= link_to "#{title_for proposal} ( #{speaker_for proposal.talk } )", edit_admin_proposal_path(proposal) %>
</span>
View
14 vendor/engines/proposals/app/views/admin/proposals/edit.html.erb
@@ -8,6 +8,11 @@
<p>
<strong><%= t('.age') %>:</strong> <%= time_ago_in_words(@proposal.created_at) %>
</p>
+ <p>
+ <strong><%= t('.status') -%></strong>
+
+ <span id='proposal_status'><%= @proposal.status -%></span>
+ </p>
<h2><%= t('.actions') %></h2>
<ul>
<li>
@@ -24,7 +29,7 @@
<tbody>
<% [:title, :abstract, :comments, :prereqs, :av_requirement,
- :video_approval, :talk_type].each do |field| %>
+ :video_approval, :talk_type].each do |field| %>
<tr>
<td>
@@ -83,13 +88,6 @@
<% end -%>
<% end %>
- <tr>
- <td>
- <strong><%= t('.status') -%></strong>
- </td>
-
- <td id='proposal_status'><%= @proposal.status -%></td>
- </tr>
<tr>
<td>
View
1  vendor/engines/proposals/app/views/admin/proposals/index.html.erb
@@ -37,4 +37,3 @@
<% end -%>
</ul>
</div>
-<%= render("/shared/admin/make_sortable", :tree => false) if !searching? and Proposal.count > 1 %>

No commit comments for this range

Something went wrong with that request. Please try again.