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

The Ratings Block does not show the 1 - 5 labels #52

Open
langhorstg opened this issue Feb 12, 2018 · 6 comments
Open

The Ratings Block does not show the 1 - 5 labels #52

langhorstg opened this issue Feb 12, 2018 · 6 comments

Comments

@langhorstg
Copy link

I followed the directions and created a Ratings block for testing. I do not see the ratings being rendered and their default count is 0. Is this by design or a bug?

@epishilpa
Copy link
Collaborator

Hello langhorstg,
If you can clarify a couple of things, we would be happy to provide further assistance:

  1. Are you logged in? The RatingBlock will render the rating UI for an authenticated user only.
  2. Are you saying you logged in, saw the rating UI, submitted a rating and now don't see the statistics on the page?
  3. If so, when you submitted a rating did you see a message saying "Thank you for submitting your rating!" or, did you see any errors displayed?
  4. Did you see any of these messages displayed before rating your page?
    "This page has not been rated. Log in and be the first" (when no user was logged in to the Alloy site and there was no rating submitted for your page)
    "This page has not been rated. Be the first!" (When you logged in first time and there was no rating submitted for your page)
    Thank you.

@langhorstg
Copy link
Author

Hello and thanks for responding. I am logged in but don't see the 1 - 5 ratings at all. The following code does not render for me because the count is 0.

    @for (var numOfRatings = 0; numOfRatings < @Model.RatingSettings.Count; numOfRatings++)
                        {
                            @Html.RadioButtonFor(r => Model.SubmittedRating, Model.RatingSettings[numOfRatings],
                                                new { @style = "display:inline;", @onchange = "EnableRatingSubmitButton();" })
                            <label style="display:inline;margin-right:0.5em;">@Model.RatingSettings[numOfRatings].ToString()</label>
                        }

@langhorstg
Copy link
Author

I was able to resolve the issue. Had to remove a line of code in order to make it work.

@epishilpa
Copy link
Collaborator

I was able to recreate the issue you mentioned. We will fix this in the repository. Thank you for bringing this to our notice.

@langhorstg
Copy link
Author

langhorstg commented Feb 12, 2018 via email

@epishilpa
Copy link
Collaborator

Hello langhorstg,

We fixed the issue you pointed out yesterday. The master branch is updated with the fix.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants