-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1176 from proditis/writeup-language-indication
Writeup language indication
- Loading branch information
Showing
31 changed files
with
1,413 additions
and
108 deletions.
There are no files selected for viewing
646 changes: 646 additions & 0 deletions
646
backend/migrations/m240507_121449_create_language_table.php
Large diffs are not rendered by default.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
backend/migrations/m240507_121450_add_language_column_to_writeup_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
use yii\db\Migration; | ||
|
||
/** | ||
* Handles adding columns to table `{{%writeup}}`. | ||
*/ | ||
class m240507_121450_add_language_column_to_writeup_table extends Migration | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function safeUp() | ||
{ | ||
$this->addColumn('{{%writeup}}', 'language_id', $this->string(8)->after('formatter')->notNull()->defaultValue('en')); | ||
$this->addForeignKey('fk_language_id', 'writeup', 'language_id', 'language', 'id'); | ||
|
||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function safeDown() | ||
{ | ||
$this->dropColumn('{{%writeup}}', 'language'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,17 @@ | ||
<p>Comming soon...</p> | ||
Create a writeup for a platform target. | ||
|
||
Writeups allow players to share their methodology when solving a target. | ||
|
||
The form fields include: | ||
* `Target ID`: The target this writeup belongs to | ||
* `Player ID`: The username that the writeup will display as author | ||
* `Formatter`: The formatter that will be used by the frontend to display this writeup (supported formatters `Markdown`, `Text`). | ||
* `Language`: The language that this writeup is written (defaults to `English`) | ||
* `Content`: The raw content of the writeup | ||
* `Approved`: Whether a writeup is approved or not | ||
* `Status`: Status of writeup | ||
* `OK`: Writeup is published and its ok to be displayed | ||
* `Pending`: The writeup is pending for review by a moderator | ||
* `Rejected`: The writeup is rejected by a moderator | ||
* `Needs Fixes`: The writeup needs fixes as suggested by a moderator. (This usually means there is also a comment left for the player to read) | ||
* `Comment`: A comment that will be left for the author to read |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,17 @@ | ||
<p>Comming soon...</p> | ||
Manage the player contributed Writeups for your platform targets. | ||
|
||
Writeups allow players to share their methodology when solving a target. | ||
|
||
The displayed fields include: | ||
* `ID`: The record id | ||
* `Username`: The username of the writeup author | ||
* `Fqdn`: The name and IP of the target this writeup belongs to | ||
* `Content`: A small portion of the writeup content | ||
* `Approved`: Whether a writeup is approved or not | ||
* `Status`: Status of writeup | ||
* `OK`: Writeup is published and its ok to be displayed | ||
* `Pending`: The writeup is pending for review by a moderator | ||
* `Rejected`: The writeup is rejected by a moderator | ||
* `Needs Fixes`: The writeup needs fixes as suggested by a moderator. (This usually means there is also a comment left for the player to read) | ||
* `Language`: The language that this writeup is written (defaults to `English`) | ||
* `Created At/Updated At`: When was the writeup created and last updated at |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,17 @@ | ||
<p>Comming soon...</p> | ||
Update an existing writeup for a platform target. | ||
|
||
Writeups allow players to share their methodology when solving a target. | ||
|
||
The form fields include: | ||
* `Target ID`: The target this writeup belongs to | ||
* `Player ID`: The username that the writeup will display as author | ||
* `Formatter`: The formatter that will be used by the frontend to display this writeup (supported formatters `Markdown`, `Text`). | ||
* `Language`: The language that this writeup is written (defaults to `English`) | ||
* `Content`: The raw content of the writeup | ||
* `Approved`: Whether a writeup is approved or not | ||
* `Status`: Status of writeup | ||
* `OK`: Writeup is published and its ok to be displayed | ||
* `Pending`: The writeup is pending for review by a moderator | ||
* `Rejected`: The writeup is rejected by a moderator | ||
* `Needs Fixes`: The writeup needs fixes as suggested by a moderator. (This usually means there is also a comment left for the player to read) | ||
* `Comment`: A comment that will be left for the author to read |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.