-
-
Notifications
You must be signed in to change notification settings - Fork 84
allowing users to see the number of sightings associated with a given… #1107
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
allowing users to see the number of sightings associated with a given… #1107
Conversation
src/main/webapp/individuals.jsp
Outdated
@@ -8,8 +8,6 @@ java.net.URL, | |||
org.datanucleus.ExecutionContext,java.text.SimpleDateFormat, | |||
org.joda.time.DateTime,org.ecocean.*,org.ecocean.social.*,org.ecocean.servlet.ServletUtilities,java.io.File, java.util.*, org.ecocean.genetics.*,org.ecocean.security.Collaboration, org.ecocean.security.HiddenEncReporter, com.google.gson.Gson, | |||
org.datanucleus.api.rest.RESTUtils, org.datanucleus.api.jdo.JDOPersistenceManager, java.text.SimpleDateFormat, org.apache.commons.lang3.StringUtils" %> |
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.
these need to be left in now, due to Shepherd and ShepherdProperties now (in main) being moved to their own package.
@@ -1384,6 +1382,50 @@ if (sharky.getNames() != null) { | |||
} | |||
%> | |||
|
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.
i have a suggestion to make this much simpler. i am not sure why the code inside this jsp (not your code) is loading getMarkedIndividual()
so many times! its pretty bad form.
so i will suggest rather you set an int
value at the top (around line 186) e.g. int encCount = 0
... then the first time myEncs.size()
is calculated -- use that value.
then all of this code you added can be reduced to your <div>....</div>
code, but use encCount
in there.
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 file has a history of inefficient code; i have a suggestion to make yours much shorter. see comment in individuals.jsp
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.
looks good!
… individual.
allowing users to see the number of sightings associated with a given individual.
PR fixes #834
Before you Submit!