Allow VCS URLs to be null in projects

This commit is contained in:
Alex Cabal 2024-12-16 21:31:49 -06:00
parent d902074285
commit 7a3c7ad503
12 changed files with 94 additions and 36 deletions

View file

@ -5,7 +5,7 @@
*/
?>
<table class="data-table bulk-downloads-table">
<caption aria-hidden="hidden">Scroll right </caption>
<caption aria-hidden="true">Scroll right </caption>
<thead>
<tr class="mid-header">
<th scope="col"><?= Formatter::EscapeHtml($label) ?></th>

View file

@ -36,17 +36,19 @@
<a href="<?= SITE_URL ?><?= $project->Reviewer->Url ?>/projects"><?= Formatter::EscapeHtml($project->Reviewer->DisplayName) ?></a>
</td>
</tr>
<tr>
<td>Repository:</td>
<td>
<a href="<?= Formatter::EscapeHtml($project->VcsUrl) ?>">GitHub</a>
</td>
</tr>
<? if($project->VcsUrl !== null){ ?>
<tr>
<td>Repository:</td>
<td>
<a href="<?= Formatter::EscapeHtml($project->VcsUrl) ?>"><?= Formatter::EscapeHtml($project->VcsUrlDomain) ?></a>
</td>
</tr>
<? } ?>
<? if($project->DiscussionUrl !== null){ ?>
<tr>
<td>Discussion:</td>
<td>
<a href="<?= Formatter::EscapeHtml($project->DiscussionUrl) ?>">Google Groups</a>
<a href="<?= Formatter::EscapeHtml($project->DiscussionUrl) ?>"><?= Formatter::EscapeHtml($project->DiscussionUrlDomain) ?></a>
</td>
</tr>
<? } ?>

View file

@ -16,10 +16,12 @@ Youve been assigned a new ebook project to **<?= $role ?>**:
- Reviewer: [<?= Formatter::EscapeMarkdown($project->Reviewer->DisplayName) ?>](<?= Formatter::EscapeMarkdown(SITE_URL . $project->Reviewer->Url . '/projects') ?>)
- Repository: [GitHub](<?= Formatter::EscapeMarkdown($project->VcsUrl) ?>)
<? if($project->VcsUrl !== null){ ?>
- Repository: [<?= Formatter::EscapeHtml($project->VcsUrlDomain) ?>](<?= Formatter::EscapeMarkdown($project->VcsUrl) ?>)
<? } ?>
<? if($project->DiscussionUrl !== null){ ?>
- Discussion: [Google Groups](<?= Formatter::EscapeMarkdown($project->DiscussionUrl) ?>)
- Discussion: [<?= Formatter::EscapeHtml($project->DiscussionUrlDomain) ?>](<?= Formatter::EscapeMarkdown($project->DiscussionUrl) ?>)
<? } ?>
If youre unable to <?= $role ?> this ebook project, [email the Editor-in-Chief](mailto:<?= Formatter::EscapeMarkdown(EDITOR_IN_CHIEF_EMAIL_ADDRESS) ?>) and well reassign it.

View file

@ -76,8 +76,6 @@ $areFieldsRequired = $areFieldsRequired ?? true;
<input
type="url"
name="project-vcs-url"
placeholder="https://github.com/..."
pattern="^https:\/\/github\.com\/[^\/]+/[^\/]+/?$"
autocomplete="off"
value="<?= Formatter::EscapeHtml($project->VcsUrl ?? '') ?>"
/>

View file

@ -7,7 +7,7 @@ $includeTitle = $includeTitle ?? true;
$includeStatus = $includeStatus ?? true;
?>
<table class="data-table">
<caption aria-hidden="hidden">Scroll right </caption>
<caption aria-hidden="true">Scroll right </caption>
<thead>
<tr class="mid-header">
<? if($includeTitle){ ?>
@ -20,8 +20,8 @@ $includeStatus = $includeStatus ?? true;
<? if($includeStatus){ ?>
<th scope="col">Status</th>
<? } ?>
<th/>
<th/>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
@ -56,7 +56,9 @@ $includeStatus = $includeStatus ?? true;
</td>
<? } ?>
<td>
<a href="<?= Formatter::EscapeHtml($project->VcsUrl) ?>">Repository</a>
<? if($project->VcsUrl !== null){ ?>
<a href="<?= Formatter::EscapeHtml($project->VcsUrl) ?>">Repository</a>
<? } ?>
</td>
<td>
<? if($project->DiscussionUrl !== null){ ?>