CenterForDigitalHumanities / TPEN-NL

0 stars 0 forks source link

My Transcriptions #46

Closed thehabes closed 3 years ago

thehabes commented 3 years ago

Replicate the U of T version of the My Transcriptions page. This will take over index.jsp, the current home page of this deployment. It needs to look something like this.

Note that a similar task is being done for other pages that show lists/collections. See https://centerfordigitalhumanities.github.io/Newberry-French-paleography/www/manuscripts.html. Keep to similar CSS.

thehabes commented 3 years ago

There is no existing servlet for this functionality. It is .jsp functionality. See below.

try {
    textdisplay.Project[] userProjects = thisUser.getUserProjects();
    if (userProjects.length > 0) {
        %>
        <div id="projectTable">
        <%@include file="WEB-INF/includes/projectPriority.jspf" %>
<table id="projectList">
    <tbody>
<%                      int projectID = 0;
    String projectTitle;
    int recentFolio = 0;
    for (int i = 0; i < userProjects.length; i++) {
        projectID = userProjects[i].getProjectID();
        projectTitle = userProjects[i].getProjectName();
        recentFolio = userProjects[i].getLastModifiedFolio();
        out.print("<tr title=\"" + projectTitle 
                + "\"><td><a href=\"newberryTrans.html?projectID=" + projectID + "&p="+ recentFolio +"\">"+ projectTitle + "</a></td>"
                + "<td><a href=\"newberryTrans.html?projectID=" + projectID + "&p="+ recentFolio +"\" title='Resume Transcribing' class='left'><span class='ui-icon ui-icon-pencil left'></span>Resume</a></td>"
                + "<td><a href=\"project.jsp?projectID=" + projectID + "\" title='Manage this Project' class='left'><span class='ui-icon ui-icon-gear left'></span>Manage</a></td>"
                + "<td><a href='#' onclick='$(\"#rearrangeProjects\").click();return false;' title='Reorder this List'><span class='ui-icon ui-icon-shuffle left'></span></a></td>");
    }
    %> 
    </tbody>
</table>
    </div><%
    } else {
        out.print("Getting Started:<br/><iframe src='http://www.youtube.com/embed/0S5ilvLM9fw' allowfullscreen></iframe>");
    }
}
cubap commented 3 years ago

The jsp doesn't use a servlet, obviously, but I am fairly certain one exists. I'll peek

(of course, if you leave it a jsp, you don't need a servlet)

cubap commented 3 years ago

yeah ProjectsServlet.java is /projects in web.xml.