-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Modified views for Q & A Pages #628
Conversation
@@ -66,11 +66,11 @@ def like_count | |||
end | |||
|
|||
def liked_notes | |||
DrupalNode.includes(:node_selections).where("type = 'note' AND node_selections.liking = true AND node_selections.user_id = ? AND node.status = 1", self.uid).order('node_selections.nid DESC') | |||
DrupalNode.includes(:node_selections).where("type = 'note' AND node_selections.liking = ? AND node_selections.user_id = ? AND node.status = 1", true, self.uid).order('node_selections.nid DESC') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to make this change because the sqlite db was showing an error probably because it wasn't taking true as a boolean. So the likes page was'nt rendering when using the sqlite db.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perfect, good catch.
a3c21ea
to
98e696f
Compare
@@ -18,7 +18,7 @@ | |||
<% end %> | |||
</span> | |||
<p style="margin-top:30px;"><% if logged_in_as(['admin','moderator']) %><a class="btn btn-default btn-xs" href="/moderate/spam/<%= node.id %>"><i class="fa fa-ban"></i> Spam</a><% end %> | |||
<a href="#" class="btn btn-default btn-xs">Post an answer</a></p> | |||
<a href="<%= node.path(:question) %>#post-answer" class="btn btn-default btn-xs">Post an answer</a></p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wierd! the Post an answer link that I added was somehow reverted in any previous changes. I added it back. Nevertheless it previously wan't correct so I put the correct one this time.
98e696f
to
a1a99c3
Compare
link = "<span class='pull-left'><i data-url='" + match.path(:question) + | ||
"' class='fa fa-question-circle'></i> " + match.title + "</span>" | ||
link = "<i data-url='" + match.path(:question) + | ||
"' class='fa fa-question-circle'></i> " + match.title |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes the problem of dropdown link in the questions search box which is not working currently.
365a770
to
272954e
Compare
Also includes commits from #636. |
272954e
to
fc14dd5
Compare
what if:
|
Yeah it's a good idea Jeff. I will work on it. I was thinking of the On Thu, Jul 28, 2016 at 10:09 PM, Jeffrey Warren notifications@github.com
|
Hmm, that would be a lot to show; maybe we could just say "Answered by On Thu, Jul 28, 2016 at 12:42 PM, Ananya Maiti notifications@github.com
|
Yes that's a better idea; just linking the answer with a text. On Thu, Jul 28, 2016 at 10:16 PM, Jeffrey Warren notifications@github.com
|
Shall I merge this now, or do you want to keep working on it? (or in another PR later?) |
@jywarren Please wait till I complete all the features. |
Probably it will be ready for merge by Tuesday. |
Perfect, no problem. On Jul 29, 2016 2:34 PM, "Ananya Maiti" notifications@github.com wrote:
|
fc14dd5
to
929d9bd
Compare
@jywarren Just some clarifications on what you asked Answered questions were clearly marked as Answered (maybe with the same green indicator used on the Answer?) When will a question marked as answered? When there is atleast one answer or when it is marked as accepted by the question author? |
929d9bd
to
b505b6b
Compare
When an answer is accepted. Thanks! |
b505b6b
to
8aabf46
Compare
@jywarren This is almost complete. Just need to add some more tests. You can review it in the mean time. I am posting the screenshots for the modified views below. |
I have already posted a screenshot of the recently answered view. Link to the question page is added in the navbar under the Projects tab. The question links in dashboard now link to the new question views. Also the Ask question links in the Dashborad and tags page link to the question post page now. |
fc4f8dc
to
ff19bf0
Compare
It doesn't look like we have a test for admin (as opposed to a moderator) approving a first-timer post. I've added one and it seems to pass, so I'm not sure what's up. Maybe we should add one for approving a first-timer question, not a normal note. |
@jywarren Updated and rebased on the latest master. Here is the screenshot |
Oh, i'm sorry, i meant green outlining of the Looking great on spacing, though! |
@jywarren Ok updating it. I am also trying to look at the issue you mentioned. It looks like I have missed something for the first timer questions. |
Ok, good luck! I am about to board a plane so won't be checking in again On Aug 14, 2016 3:00 PM, "Ananya Maiti" notifications@github.com wrote:
|
ff19bf0
to
38a436e
Compare
@jywarren Yes it is really looking great this way now. |
@jywarren First timer questions are now visible to admins in the questions index page. I have also modified the tests to justify it. Also flash messages are displayed while approving the first timer questions through proper redirects. Also added test for admin controller to support it. |
Mark question as answered when an answer is accepted
Modify sort_questions_by_tag method to improve efficiency
Link tags in questions to 'question' tag views
Add post path to question from submit action Use javascript submit only for input field on submit to question search
Add integration test for question sort feature Fix failing tests caused due to the changes
Redirect question to question path while publishing first-timer-questions Add functional test for admin controller
1bfa77b
to
dbc1717
Compare
Great, i'll do final review and merge tomorrow. Great work! On Sun, Aug 14, 2016 at 10:23 PM, Ananya Maiti notifications@github.com
|
💯 merged!! I made some small final style tweaks, and hope to publish tonight. GREAT WORK, ananyo! Reach out to Liz and Stevie and ask them to help you test it out once it's published. I'll alert you. |
Thanks Jeff! I was thining of adding some documentation for Q & A in the On Wed, Aug 17, 2016 at 3:42 AM, Jeffrey Warren notifications@github.com
|
…lab#9572) * Remove outdated query as code in publiclab#628 no longer used, fixes publiclab#9571 * Update _question.html.erb
…lab#9572) * Remove outdated query as code in publiclab#628 no longer used, fixes publiclab#9571 * Update _question.html.erb
Make sure these boxes are checked before your pull request is ready to be reviewed and merged. Thanks!
rake test
development.sqlite.example
has been updated if any database migrations were addedPlease be sure you've reviewed our contribution guidelines at https://publiclab.org/wiki/contributing-to-public-lab-software
We have a loose schedule of reviewing and pulling in changes every Tuesday and Friday, and publishing changes on Fridays. Please alert developers on plots-dev@googlegroups.com when your request is ready or if you need assistance.
Thanks!