    public void addBody(Body body) throws WingException, SQLException
    {
        EPerson currentUser = context.getCurrentUser();
        if (currentUser != null)
        {
            Statement statement = context.getDBConnection().createStatement();
            String title_field_query =
                "SELECT metadata_field_id" +
                "    FROM metadatafieldregistry AS fields," +
                "            metadataschemaregistry AS schemas" +
                "    WHERE fields.metadata_schema_id" +
                "            = schemas.metadata_schema_id" +
                "        AND schemas.short_id = 'dc'" +
                "        AND fields.element = 'title'" +
                "        AND fields.qualifier IS NULL" +
                "    LIMIT 1;";
            ResultSet dcTitleField = statement.executeQuery(title_field_query);
            dcTitleField.next();
            String dcTitleID = dcTitleField.getString("metadata_field_id");
            String submissions_query =
                "SELECT COUNT(metadatavalue.text_value)" +
                "    FROM workflowitem, item, metadatavalue" +
                "    WHERE workflowitem.item_id = item.item_id" +
                "        AND item.item_id = metadatavalue.item_id" +
                "        AND metadatavalue.metadata_field_id = " + dcTitleID +
                "        AND item.submitter_id = " + currentUser.getID() + ";";
            ResultSet submissions = statement.executeQuery(submissions_query);
            submissions.next();
            int rowCount = submissions.getInt(1);
            if (rowCount > 0)
            {
                Message T_link;
                Message T_outtro;
                if (rowCount == 1)
                {
                    T_link = T_one_pending_submission;
                    T_outtro = T_pending_submissions_outtro_single;
                }
                else
                {
                    T_link =
                        T_multiple_pending_submissions.parameterize(rowCount);
                    T_outtro  = T_pending_submissions_outtro_multiple;
                }
                Division pending = body.addDivision("pending-submissions");
                Para para = pending.addPara();
                para.addContent(T_pending_submissions_intro);
                para.addXref("submissions", T_link);
                para.addContent(T_outtro);
            }
        }
    }

    public void addBody(Body body) throws WingException, SQLException
    {
        EPerson currentUser = context.getCurrentUser();
        if (currentUser != null)
        {
            Statement statement = context.getDBConnection().createStatement();
            String title_field_query =
                "SELECT metadata_field_id" +
                "    FROM metadatafieldregistry AS fields," +
                "            metadataschemaregistry AS schemas" +
                "    WHERE fields.metadata_schema_id" +
                "            = schemas.metadata_schema_id" +
                "        AND schemas.short_id = 'dc'" +
                "        AND fields.element = 'title'" +
                "        AND fields.qualifier IS NULL" +
                "    LIMIT 1;";
            ResultSet dcTitleField = statement.executeQuery(title_field_query);
            dcTitleField.next();
            String dcTitleID = dcTitleField.getString("metadata_field_id");
            String submissions_query =
                "SELECT COUNT(metadatavalue.text_value)" +
                "    FROM workflowitem, item, metadatavalue" +
                "    WHERE workflowitem.item_id = item.item_id" +
                "        AND item.item_id = metadatavalue.item_id" +
                "        AND metadatavalue.metadata_field_id = " + dcTitleID +
                "        AND item.submitter_id = " + currentUser.getID() + ";";
            ResultSet submissions = statement.executeQuery(submissions_query);
            submissions.next();
            int rowCount = submissions.getInt(1);
            if (rowCount > 0)
            {
                Message T_link;
                Message T_outtro;
                if (rowCount == 1)
                {
                    T_link = T_one_pending_submission;
                    T_outtro = T_pending_submissions_outtro_single;
                }
                else
                {
                    T_link =
                        T_multiple_pending_submissions.parameterize(rowCount);
                    T_outtro  = T_pending_submissions_outtro_multiple;
                }
                Division pending = body.addDivision("pending-submissions");
                Para para = pending.addPara();
                para.addContent(T_pending_submissions_intro);
                para.addXref("/xmlui/submissions", T_link);
                para.addContent(T_outtro);
            }
        }
    }
