We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.

Bug 3797 - Add indications next to User Roles in User Home
Add indications next to User Roles in User Home
Status: RESOLVED FIXED
Product: OJS
Classification: Unclassified
Component: User Interface
2.3
PC Mac OS X 10.0
: P1 enhancement
Assigned To: Matthew Crider
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-03 15:08 PDT by James MacGregor
Modified: 2009-02-23 18:40 PST (History)
3 users (show)

See Also:
Version Reported In:
Also Affects:


Attachments
Mockup of proposed notifications in User Home (80.98 KB, image/png)
2008-10-03 15:08 PDT, James MacGregor
Details
Patch against OJS pre-2.3 CVS (22.91 KB, patch)
2008-11-21 16:30 PST, Matthew Crider
Details | Diff
Example of odd spacing (56.27 KB, image/png)
2008-12-08 19:04 PST, James MacGregor
Details
Patch against OJS pre-2.3 CVS (23.39 KB, patch)
2008-12-10 11:25 PST, Matthew Crider
Details | Diff
Patch against OJS pre-2.3 CVS (17.00 KB, patch)
2009-02-05 14:56 PST, Matthew Crider
Details | Diff
Patch against OCS pre-2.3 CVS (17.39 KB, patch)
2009-02-09 11:55 PST, Matthew Crider
Details | Diff
Additional patch against OJS pre-2.3 CVS (877 bytes, patch)
2009-02-20 16:26 PST, Matthew Crider
Details | Diff
Additional patch against OCS pre-2.3 CVS (1.14 KB, patch)
2009-02-23 15:15 PST, Matthew Crider
Details | Diff
Additional patch against OCS pre-2.3 CVS (709 bytes, patch)
2009-02-23 18:32 PST, Matthew Crider
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James MacGregor 2008-10-03 15:08:19 PDT
When a user visits their User Home, they are shown which roles they are enrolled as, but are given no further indication as to what they can do or whether they have actionable items per user role. It'd be nice to give indications for:

1. The state of their various review/editorial queues.
2. Quick-action items. 

The second one is probably less important -- mainly I wanted to include it to provide a quick way for authors to start a submission. Quick0-action items could include user notification; checking out pending Issues; starting a new submission; and maybe not much else. 

(From http://pkp.sfu.ca/support/forum/viewtopic.php?f=8&t=3502#p13252 -- thanks, Casey.)
Comment 1 James MacGregor 2008-10-03 15:08:56 PDT
Created attachment 1007 [details]
Mockup of proposed notifications in User Home
Comment 2 James MacGregor 2008-10-03 15:13:56 PDT
A few other thoughts on this proposal: 

1. If certain criteria are met, also include a nice, bright link on the Journal Manager row saying "Set up your journal!". Criteria would include the normal information missing from an initial journal creation, but otherwise mandatory (Journal Abbreviation; Primary/Technical Contact info; etc.). The link would go to Journal Setup Step 1. 

2. Font colours: Maybe have all queue listings with a value of 0 coloured grey, while all queue listings with a positive value coloured black. 
Comment 3 Tyler Mitchell 2008-11-13 16:51:32 PST
Definitely worth doing, if not only for Authors to have a better sense of where to submit.  I'm still learning about how roles are handled.  Can you give me any pointers to where I could simply add a description/url beside a role?
Comment 4 Tyler Mitchell 2008-11-13 16:51:55 PST
(In reply to comment #1)
> Created an attachment (id=1007) [details]
> Mockup of proposed notifications in User Home
> 

Beautiful!
Comment 5 Matthew Crider 2008-11-21 16:30:15 PST
Created attachment 1150 [details]
Patch against OJS pre-2.3 CVS

This works on OJS pre-2.2.3 CVS, but probably shouldn't be committed there.

One small change from James' mockup--Since authors and reviewers don't have 'Awaiting Assignment'/'In Review'/etc tabs in their home page (just 'active'  and 'archive'), I just list their active submissions.  I could probably hack something up to display how many of their submissions are in each category, but it would all go to the same page.

This could probably deal with some more testing.  If there are no suggestions/bug reports I'll backport.
Comment 6 James MacGregor 2008-12-08 19:04:32 PST
Created attachment 1215 [details]
Example of odd spacing

Hi Matt, looks good! there appears to be a small bug though: when you have more than one <td> cell per any given row, any other row with only one cell normally (for ex. Journal Manager) still appears with only one cell, leading to some odd spacing behaviour. I'm not sure what the best solution here might be -- hardcoded tables for display purposes seems expedient, although lame. Maybe some align="right"s? I've attached a screenshot to show what I mean. 

I would agree that 2.3 is probably where this belongs. I'm personally quite excited to see this addition -- hopefully it'll lay some groundwork for future UI updates.
Comment 7 James MacGregor 2008-12-08 19:09:00 PST
One comment/possible solution: I would suggest that the Journal Manager's Setup link only needs to appear after first creating a hosted journal -- it should almost be the only thing up there, maybe with some additional text that says something like "It appears that you have not yet configured your journal. Please follow the link to complete the five-step journal setup process." This would only show up if mandatory (but commonly missing) elements were missing from Journal Setup Step 1.

This still doesn't address the other spacing problems (like where author cells fall if the Author is also an Editor, in the previous screenshot).
Comment 8 Matthew Crider 2008-12-09 18:13:56 PST
James, I think the best solution would be to just have a fixed table (i.e. I currently use colspans, instead I should have a set number of <td>'s for each row.  I didn't really test it on a multiple journal installation, so thanks for the tip.

As for the setup link, it should only appear if the journal initials, contact email, contact name, or abbreviation is not set.  I'll do some debugging to make sure that works properly.
Comment 9 James MacGregor 2008-12-09 19:36:05 PST
(In reply to comment #8)
> James, I think the best solution would be to just have a fixed table (i.e. I
> currently use colspans, instead I should have a set number of <td>'s for each
> row.  I didn't really test it on a multiple journal installation, so thanks for
> the tip.

Sounds good to me, Matt. I sometimes forget what's valid/non-valid use of tables these days, but this sounds like the way to go to me. 

> As for the setup link, it should only appear if the journal initials, contact
> email, contact name, or abbreviation is not set.  I'll do some debugging to
> make sure that works properly.

-- Serves me right for not checking whether I'd actually set up my own journal. That's great Matt, works just fine. You might want to throw in Technical Support email as well, as that's also mandatory from Journal Setup Step 1 -- but really, that's overkill because they will have to fill and save that page anyway. 

Comment 10 James MacGregor 2008-12-09 19:40:24 PST
(In reply to comment #9)

> > As for the setup link, it should only appear if the journal initials, contact
> > email, contact name, or abbreviation is not set.  I'll do some debugging to
> > make sure that works properly.
> 
> -- Serves me right for not checking whether I'd actually set up my own journal.
> That's great Matt, works just fine. You might want to throw in Technical
> Support email as well, as that's also mandatory from Journal Setup Step 1 --
> but really, that's overkill because they will have to fill and save that page
> anyway. 

Actually, this is acting slightly unexpectedly after all: the setup link does not appear if the setup process has completed when you are in your journal's User Home (index.php/jrnl/user); but it *does* appear when you are in your root user home (index.php/index/user), even if the journal has been properly set. 
Comment 11 Matthew Crider 2008-12-10 11:25:53 PST
Created attachment 1220 [details]
Patch against OJS pre-2.3 CVS

This cleans up the spacing for the site's user home page, and aligns the 'status' text right.

James, the setup link disappears from both my site and journal home pages when all the required fields are filled out in setup step 1.  Are you sure you've done that?  Maybe you need an OJS/browser cache refresh.
Comment 12 James MacGregor 2008-12-10 15:56:56 PST
Looks great Matt -- spacing looks good, and yes, clearing the cache solved the Setup display issue. I'm happy with this. 
Comment 13 Alec Smecher 2009-02-04 14:15:33 PST
(This should be filed against the devel tree, not the next stable release.)

Matt, there's a lot of duped code in the UserHandler and template parts of this patch that will be tough to keep synchronized (in fact, I think the spacing has already fallen out of sync) -- could you try reconciling it into one copy?
Comment 14 Matthew Crider 2009-02-05 14:56:43 PST
Created attachment 1403 [details]
Patch against OJS pre-2.3 CVS

Yeah, at second glance that was pretty sloppy :)
Comment 15 Alec Smecher 2009-02-05 20:14:27 PST
Great, looks much better. Go ahead and commit to OCS devel, and port to OCS devel as well.
Comment 16 Matthew Crider 2009-02-06 12:53:56 PST
Committed to ojs2-devel.  OCS backport in the works..
Comment 17 Matthew Crider 2009-02-09 11:55:04 PST
Created attachment 1406 [details]
Patch against OCS pre-2.3 CVS
Comment 18 Matthew Crider 2009-02-09 17:59:45 PST
Before I commit, I believe there are some bugs to work out with both patches regarding the display of conferences/journals that the user is not enrolled in.
Comment 19 Matthew Crider 2009-02-19 18:10:54 PST
Never mind, everything seems to be okay.  Committed to ocs2-devel.
Comment 20 Matthew Crider 2009-02-20 16:26:35 PST
Created attachment 1469 [details]
Additional patch against OJS pre-2.3 CVS

Actually, OJS wasn't checking if the user has roles or not for each journal on the site level, so it would show journals which the user doesn't have roles in.  I've checked OCS and ensured it makes this verification.
Comment 21 Matthew Crider 2009-02-20 16:27:55 PST
Committed attachment 1469 [details].
Comment 22 Matthew Crider 2009-02-23 15:15:59 PST
Created attachment 1471 [details]
Additional patch against OCS pre-2.3 CVS

Also, OCS would have trouble displaying conferences on the site level if the user has roles in a sched. conf. but not at the conf. level.  This patch has been committed.
Comment 23 Alec Smecher 2009-02-23 17:55:20 PST
Matt, I think there's a bug in the most recent patch -- in pages/user/UserHandler.inc.php line 90:

if(empty($roles) && !empty($schedConfsToDisplay)) {

...the !empty check on $schedConfsToDisplay will always evaluate true as long as we're not dealing with the first scheduled conference being processed.
Comment 24 Matthew Crider 2009-02-23 18:32:12 PST
Created attachment 1476 [details]
Additional patch against OCS pre-2.3 CVS

This should fix it.  Thanks, Alec.
Comment 25 Matthew Crider 2009-02-23 18:40:27 PST
(Attachment 1476 [details] Committed).