Skip to content

Conversation

@oleg-codaio
Copy link

This pull request adds a "summaryTemplate" global option that provides a way to add a template and fill it with custom values on a given paper page.

For us, we use it to make tables and provide a custom, consistent format that contains various applicant info (see my other pull request for context). This may be useful in HotCRP as well for users who want to customize what's shown on the details page for a given paper.

@oleg-codaio
Copy link
Author

Here's a sample screenshot:

screenshot

You can get this by specifying the following in the configuration file:

$Opt["summaryTemplate"] = <<<EOD
<style>
table.testscores {
  border-collapse: collapse;
}
table.testscores td, table.testscores th {
  border: 1px solid black;
}
table.testscores td {
  padding: 5px;
}
table.testscores tr:first-child th {
  border-top: 0;
}
table.testscores tr:last-child td {
  border-bottom: 0;
}
table.testscores tr td:first-child,
table.testscores tr th:first-child {
  border-left: 0;
}
table.testscores tr td:last-child,
table.testscores tr th:last-child {
  border-right: 0;
}
</style>

<h3>Education</h3>

%%%BEGIN_IF{!DEG_BS_INST}%%%
<p><i>No Bachelor's degree.</i></p>
%%%END_IF%%%

%%%BEGIN_IF{DEG_BS_INST}%%%
<p>\${DEG_BS_INST} (\${DEG_BS_INST_COUNTRY}), <i>\${DEG_BS_TYPE}</i>, \${DEG_BS_AREA}, \${DEG_BS_PROG}
</br>\${DEG_BS_DATE}, GPA: \${DEG_BS_GPA}/\${DEG_BS_GPA_MAX} (<strong>\${DEG_BS_GPA_NORM}</strong>)</p>
%%%END_IF%%%

%%%BEGIN_IF{DEG_G0_INST}%%%
<hr width="50px">
<p>\${DEG_G0_INST} (\${DEG_G0_INST_COUNTRY}), <i>\${DEG_G0_TYPE}</i>, \${DEG_G0_AREA}, \${DEG_G0_PROG}
<br>\${DEG_G0_DATE}, GPA: \${DEG_G0_GPA}/\${DEG_G0_GPA_MAX} (<strong>\${DEG_G0_GPA_NORM}</strong>)</p>
%%%END_IF%%%

%%%BEGIN_IF{DEG_G1_INST}%%%
<hr width="50px">
<p>\${DEG_G1_INST} (\${DEG_G1_INST_COUNTRY}), \${DEG_G1_TYPE}, \${DEG_G1_AREA}, \${DEG_G1_PROG}</p>
<p>\${DEG_G1_DATE}, GPA: \${DEG_G1_GPA}/\${DEG_G1_GPA_MAX} (\${DEG_G1_GPA_NORM})</p>
%%%END_IF%%%

<br>
<h3>GRE</h3>
<table class="testscores">
  <thead>
    <tr>
      <td>DATE</td>
      <td>Quantitative</td>
      <td>Verbal</td>
      <td>Analytical</td>
    </tr>
  </thead>
  <tbody>
%%%BEGIN_IF{!GRE_Q}%%%
    <tr>
      <td><i>(None)</i></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
%%%END_IF%%%
%%%BEGIN_IF{GRE_Q}%%%
    <tr>
      <td>\${GRE_DATE}</td>
      <td>\${GRE_Q} (\${GRE_QP})</td>
      <td>\${GRE_V} (\${GRE_VP})</td>
      <td>\${GRE_A} (\${GRE_AP})</td>
    </tr>
%%%END_IF%%%
%%%BEGIN_IF{GRE2_Q}%%%
    <tr>
      <td>\${GRE2_DATE}</td>
      <td>\${GRE2_Q} (\${GRE2_QP})</td>
      <td>\${GRE2_V} (\${GRE2_VP})</td>
      <td>\${GRE2_A} (\${GRE2_AP})</td>
    </tr>
%%%END_IF%%%
  </tbody>
</table>

%%%BEGIN_IF{TOEFL_T}%%%
<br>
<h3>TOEFL</h3>
<table class="testscores">
  <col width="200">
  <thead>
    <tr>
      <td>DATE</td>
      <td>TOTAL</td>
      <td>Reading</td>
      <td>Listening</td>
      <td>Speaking</td>
      <td>Writing</td>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>\${TOEFL_DATE}</td>
      <td>\${TOEFL_T}</td>
      <td>\${TOEFL_R}</td>
      <td>\${TOEFL_L}</td>
      <td>\${TOEFL_S}</td>
      <td>\${TOEFL_W}</td>
    </tr>
  </tbody>
</table>
%%%END_IF%%%


<br>
<h3>Application</h3>
<p>\${Degree}, \${Concentration}
%%%BEGIN_IF{!Full Time}%%%
, Part Time
%%%END_IF%%%
%%%BEGIN_IF{FacultyContacted}%%%
</br>Faculty Contacted: \${FacultyContacted}
%%%END_IF%%%
</br>Citizenship: \${Citizenship}
</p>

EOD;

@oleg-codaio
Copy link
Author

BUMP - thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant