openjournals / theoj

The Open Journal
http://theoj.org
MIT License
129 stars 10 forks source link

[WIP]: Beginning work on Rails view for dashboard & about page #279

Open arfon opened 7 years ago

arfon commented 7 years ago

screen shot 2017-01-12 at 5 40 05 pm

marcrohloff commented 7 years ago

Well if it works then I must be wrong and I would just leave it in so the icons are consistent. ​

marcrohloff commented 7 years ago

perhaps we should just show this if they have an assigned paper that they haven't commented on?

That is the best short-term solution. Otherwise I have to create a flag and code to track if they have viewed a paper. Do people generally leave at least one comment on a paper? Maybe we should change the text slightly to 'You have not commented on a paper you have been assigned to' or similar. I suggest we just create a method and we can change the implementation later when we can. Just leave a todo and/or create a github issue.

marcrohloff commented 7 years ago

As part of this change I think that we should change the redirect_url SessionController#create to something like:

redirect_url = request.env['omniauth.origin'] || default_url_for(user)
...

protected

def default_url_for(user)
    if ( [user is an editor or reviewer] )
     dashboard_path
  else
    recent_path
end