mirror of
https://github.com/standardebooks/web.git
synced 2025-07-15 19:06:49 -04:00
Add 'awaiting review' and 'reviewed' project statuses that update from GitHub; allow project owners to update their project statuses
This commit is contained in:
parent
b48f3a5798
commit
6378d687d8
12 changed files with 204 additions and 21 deletions
|
@ -3,6 +3,8 @@
|
|||
* @var Project $project
|
||||
*/
|
||||
|
||||
use Enums\HttpMethod;
|
||||
|
||||
$useFullyQualifiedUrls = $useFullyQualifiedUrls ?? false;
|
||||
$showTitle = $showTitle ?? true;
|
||||
$showArtworkStatus = $showArtworkStatus ?? true;
|
||||
|
@ -69,5 +71,37 @@ $showArtworkStatus = $showArtworkStatus ?? true;
|
|||
</td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
<tr>
|
||||
<td>Status:</td>
|
||||
<td>
|
||||
<? if(
|
||||
Session::$User?->Benefits->CanEditProjects
|
||||
||
|
||||
$project->ManagerUserId == Session::$User?->UserId
|
||||
||
|
||||
$project->ReviewerUserId == Session::$User?->UserId
|
||||
){ ?>
|
||||
|
||||
<form action="<?= $project->Url ?>" method="<?= HttpMethod::Post->value ?>" class="single-line-form">
|
||||
<input type="hidden" name="_method" value="<?= HttpMethod::Patch->value ?>" />
|
||||
<label class="icon meter">
|
||||
<span>
|
||||
<select name="project-status">
|
||||
<option value="<?= Enums\ProjectStatusType::InProgress->value ?>"<? if($project->Status == Enums\ProjectStatusType::InProgress){?> selected="selected"<? } ?>>In progress</option>
|
||||
<option value="<?= Enums\ProjectStatusType::AwaitingReview->value ?>"<? if($project->Status == Enums\ProjectStatusType::AwaitingReview){?> selected="selected"<? } ?>>Awaiting review</option>
|
||||
<option value="<?= Enums\ProjectStatusType::Reviewed->value ?>"<? if($project->Status == Enums\ProjectStatusType::Reviewed){?> selected="selected"<? } ?>>Reviewed</option>
|
||||
<option value="<?= Enums\ProjectStatusType::Stalled->value ?>"<? if($project->Status == Enums\ProjectStatusType::Stalled){?> selected="selected"<? } ?>>Stalled</option>
|
||||
<option value="<?= Enums\ProjectStatusType::Completed->value ?>"<? if($project->Status == Enums\ProjectStatusType::Completed){?> selected="selected"<? } ?>>Completed</option>
|
||||
<option value="<?= Enums\ProjectStatusType::Abandoned->value ?>"<? if($project->Status == Enums\ProjectStatusType::Abandoned){?> selected="selected"<? } ?>>Abandoned</option>
|
||||
</select>
|
||||
</span>
|
||||
</label>
|
||||
<button>Save changes</button>
|
||||
</form>
|
||||
<? }else{ ?>
|
||||
<?= ucfirst($project->Status->GetDisplayName()) ?>
|
||||
<? } ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue