Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0
Ce dépôt a été archivé le 2022-05-07. Vous pouvez voir ses fichiers ou le cloner, mais pas ouvrir de ticket ou de demandes d'ajout, ni soumettre de changements.
nyaa-pantsu/templates/layouts/partials/helpers/search.jet.html

103 lignes
5,5 Kio
HTML
Brut Vue normale Historique

2017-07-14 18:32:07 +02:00
{{ import "flags" }}
First batch of changes for the refactor (#1078) * First batch of changes for the refactor Added the support of gin in routes and other services/utils Begining implementation of JetHTML * Remove os folder * Move scrapers to own repo * Second batch of changes All .jet.html are the working templates. You can now test this PR, the index Page and upload works. If you want to complete the other html templates, you're welcome * Move captcha to util * Move uploadService to utils * Use govalidator instead of regex * Third batch of changes All the front end should as previously. I also fixed some minor things unrelated to the refactor (mostly style issues on static pages) Now errors can be accessed by importing the "errors" helpers and using the `yield errors(name="xxx")` command in templates. Same for infos. Templates are now more hierarchized with a base template "base.jet.html" which is extended depending on the context in "index_site" or "index_admin" layouts. Those layouts are extended than in every pages. Other helpers are captcha to render a captcha `yield captcha(captchaid="xxx")` And also csrf, with the command `yield csrf_field()` To translate, you don't have anymore to do `call $.T "xxx"`, you just have to do `T("xxx")`. Pages for the website part are in folders in the folder "templates/site". Pages for the admin part are in "templates/admin". Layouts are separated in "templates/layouts". Helpers and menu are in "templates/layouts/helpers" and "templates/layouts/menu". Error pages should be put in "templates/errors" * Added test on templates When adding a new template, you have to tell to template_test.go, the context of the new template (if it doesn't use the common context) * Panel admin works Now the templating part should work. The PR can now be fully tested. I think we should push the templating PR and do the routes/controllers/removal of services in another branch. So we know that this one is functional * Updated dependencies * Fixed test for modelhelper * Fix testing for commentlist * Fix travis :') * Just renamed router and removed network * Applying same SEO fix * Update form_validator.go * Added back regexp package
2017-06-28 13:42:38 +02:00
{{block search_common()}}
<select name="c" class="form-input form-category">
2017-07-24 07:03:43 +02:00
<option value="_">{{ T("all_categories")}}</option>
{{ range _, cat := GetCategories(true, true) }}
<option value="{{ cat.ID }}" {{if Search.Category == cat.ID }}selected{{end}}>{{ T(cat.Name) }}</option>
{{ end }}
</select>
First batch of changes for the refactor (#1078) * First batch of changes for the refactor Added the support of gin in routes and other services/utils Begining implementation of JetHTML * Remove os folder * Move scrapers to own repo * Second batch of changes All .jet.html are the working templates. You can now test this PR, the index Page and upload works. If you want to complete the other html templates, you're welcome * Move captcha to util * Move uploadService to utils * Use govalidator instead of regex * Third batch of changes All the front end should as previously. I also fixed some minor things unrelated to the refactor (mostly style issues on static pages) Now errors can be accessed by importing the "errors" helpers and using the `yield errors(name="xxx")` command in templates. Same for infos. Templates are now more hierarchized with a base template "base.jet.html" which is extended depending on the context in "index_site" or "index_admin" layouts. Those layouts are extended than in every pages. Other helpers are captcha to render a captcha `yield captcha(captchaid="xxx")` And also csrf, with the command `yield csrf_field()` To translate, you don't have anymore to do `call $.T "xxx"`, you just have to do `T("xxx")`. Pages for the website part are in folders in the folder "templates/site". Pages for the admin part are in "templates/admin". Layouts are separated in "templates/layouts". Helpers and menu are in "templates/layouts/helpers" and "templates/layouts/menu". Error pages should be put in "templates/errors" * Added test on templates When adding a new template, you have to tell to template_test.go, the context of the new template (if it doesn't use the common context) * Panel admin works Now the templating part should work. The PR can now be fully tested. I think we should push the templating PR and do the routes/controllers/removal of services in another branch. So we know that this one is functional * Updated dependencies * Fixed test for modelhelper * Fix testing for commentlist * Fix travis :') * Just renamed router and removed network * Applying same SEO fix * Update form_validator.go * Added back regexp package
2017-06-28 13:42:38 +02:00
{{end}}
{{block search_button() }}
2017-07-24 07:03:43 +02:00
<input class="form-input search-box" name="q" placeholder="{{ T("search")}}" type="text" value="{{Search.NameLike}}"/>
<button type="submit" class="form-input icon-search"></button><button type="submit" class="form-input refine" name="refine" value="1">{{ T("refine")}}</button>
First batch of changes for the refactor (#1078) * First batch of changes for the refactor Added the support of gin in routes and other services/utils Begining implementation of JetHTML * Remove os folder * Move scrapers to own repo * Second batch of changes All .jet.html are the working templates. You can now test this PR, the index Page and upload works. If you want to complete the other html templates, you're welcome * Move captcha to util * Move uploadService to utils * Use govalidator instead of regex * Third batch of changes All the front end should as previously. I also fixed some minor things unrelated to the refactor (mostly style issues on static pages) Now errors can be accessed by importing the "errors" helpers and using the `yield errors(name="xxx")` command in templates. Same for infos. Templates are now more hierarchized with a base template "base.jet.html" which is extended depending on the context in "index_site" or "index_admin" layouts. Those layouts are extended than in every pages. Other helpers are captcha to render a captcha `yield captcha(captchaid="xxx")` And also csrf, with the command `yield csrf_field()` To translate, you don't have anymore to do `call $.T "xxx"`, you just have to do `T("xxx")`. Pages for the website part are in folders in the folder "templates/site". Pages for the admin part are in "templates/admin". Layouts are separated in "templates/layouts". Helpers and menu are in "templates/layouts/helpers" and "templates/layouts/menu". Error pages should be put in "templates/errors" * Added test on templates When adding a new template, you have to tell to template_test.go, the context of the new template (if it doesn't use the common context) * Panel admin works Now the templating part should work. The PR can now be fully tested. I think we should push the templating PR and do the routes/controllers/removal of services in another branch. So we know that this one is functional * Updated dependencies * Fixed test for modelhelper * Fix testing for commentlist * Fix travis :') * Just renamed router and removed network * Applying same SEO fix * Update form_validator.go * Added back regexp package
2017-06-28 13:42:38 +02:00
{{end}}
{{block search_refine(url="") }}
<div style="{{ if !Search.ShowRefine }}display:none;{{ end }}" class="box refine">
</span>
<form method="GET" action="{{ url }}">
<h3>{{ T("refine_search") }}</h3>
<div>
<div class="refine-container-1">
2017-07-24 07:03:43 +02:00
<span class="form-refine">
<span class="spacing">{{ T("search_for") }}:</span>
<input type="text" class="form-input refine-searchbox" size="30" name="q" value="{{Search.NameLike}}" placeholder="{{ T("search_for") }}"/><select name="c" class="form-input refine-category"/>
2017-07-24 07:03:43 +02:00
<option value="_">{{ T("all_categories")}}</option>
{{ range _, cat := GetCategories(true, true) }}
<option value="{{ cat.ID }}" {{if Search.Category == cat.ID }}selected{{end}}>{{ T(cat.Name) }}</option>
{{ end }}
</select>
</span>
<span class="form-refine">
<span class="spacing">{{ T("show") }}:</span>
<select name="s" class="form-input spacing" style="max-width: 21%;min-width: 100px;">
2017-07-24 07:03:43 +02:00
<option value="0">{{ T("show_all")}}</option>
<option value="2" {{if Search.Status == 2}}selected{{end}}>{{ T("filter_remakes")}}</option>
<option value="3" {{if Search.Status == 3}}selected{{end}}>{{ T("trusted")}}</option>
<option value="4" {{if Search.Status == 4}}selected{{end}}>A+</option>
</select>
{{ T("limit_torrent_count")}}: <input type="number" name="limit" value="{{ Navigation.MaxItemPerPage }}" class="form-input spacing" min="1" max="300"/>
{{ T("from_user") }}: <input type="text" name="user" placeholder="Username/#ID" value="{{ Search.User }}" class="form-input refine-user"/>
2017-07-24 07:03:43 +02:00
</span>
<span class="form-refine">
<span class="spacing">{{ T("between")}}</span>
<input class="form-input" size="7" name="minSize" type="text" value="{{Search.MinSize}}"/>
{{ T("and")}}
<input size="7" class="form-input" name="maxSize" type="text" value="{{Search.MaxSize}}"/>
<select name="sizeType" class="form-input">
<option value="b"{{if Search.SizeType == "b"}} selected{{end}}>B</option>
<option value="k"{{if Search.SizeType == "k"}} selected{{end}}>KiB</option>
<option value="m"{{if Search.SizeType == "m"}} selected{{end}}>MiB</option>
<option value="g"{{if Search.SizeType == "g"}} selected{{end}}>GiB</option>
</select>
{{ T("large")}}
</span>
<span class="form-refine">
<span class="spacing">{{ T("from")}}</span>
<input class="form-input refine-date" name="fromDate" type="text" value="{{Search.FromDate}}" placeholder="YYYY/MM/DD"/>
{{ T("to")}}
<input class="form-input refine-date spacing" size="7" name="toDate" type="text" value="{{Search.ToDate}}" placeholder="YYYY/MM/DD"/>
{{ T("exclude_user") }}: <input type="text" name="nuserID" placeholder="UserID" value="" class="form-input refine-userid" style="width: 62px;">
</span>
"Alternating Colors" option in settings (#1440) * Non-bold torrent name when using alternating background colors * Add alternating colors for g.css * Add alternating colors for classic.css * Add alternating colors for tomorreuw * Update classic.css * Add alternating colors to settings page * Add alt-colors class to tbody if enabled * Add GetAltColorsFromRequest() function to get AltColors cookie value * Create AltColors variable for usage in listing * Make settings handle altColors input * Add AltColors in user struct * Returned the wrong variable here * Turn function return value into bool * Condition checks variable like a bool * ditto * better color for g.css * even better color * better * Last change for g.css * Improvement for tomorrow * Update classic.css * add alt-colors class to upload preview * Add alt-colors to user profile * more vivid color for g * Fix typo * Remove browser outline for refine when clicked on * remove browser outline * Fix rules that didn't apply and category icon being way too small on user profile thanks to usage of percentage * Remove show-xs class for search inputs * Turn refine button back into position: absolute to pin at very bottom of refine * Alternating colors for g's trusted, remake & aplus * Update tomorrow.css * attempt at fixing travis * test (will have to rollback that change) * rollback * will have to rollback * will have to rollback * will have to rollback * will have to rollback * add AltColors variable to template test * rollback * rollback * rollback * rollback
2017-08-30 07:21:45 +02:00
<span class="form-refine" style="margin-bottom: 2px;">
<span class="spacing">{{T("sort_by")}}</span>
<select name="sort" class="form-input">
<option value="1"{{if Search.Sort == 1}}selected{{end}}>{{T("name")}}</option>
<option value="4"{{if Search.Sort == 4}}selected{{end}}>{{T("size")}}</option>
<option value="5"{{if Search.Sort == 5}}selected{{end}}>{{T("seeders")}}</option>
<option value="6"{{if Search.Sort == 6}}selected{{end}}>{{T("leechers")}}</option>
<option value="7"{{if Search.Sort == 7}}selected{{end}}>{{T("completed")}}</option>
<option value="2"{{if Search.Sort == 2 || Search.Sort == 0}}selected{{end}}>{{T("date")}}</option>
</select>
<select name="order" class="form-input">
<option value="true">{{T("ascending")}}</option>
<option value="false"{{if !Search.Order}}selected{{end}}>{{T("descending")}}</option>
</select>
</span>
</div>
<div class="refine-container-2">
<span class="form-refine">
<span class="spacing">{{ T("quality")}}:</span>
<select name="vq" class="form-input">
<option value="">{{ T("show_all")}}</option>
{{ range _, vq := Config.Torrents.Tags.Types.Get("videoquality").Defaults }}
<option value="{{vq}}">{{T("tagvalue_" + vq)}}</option>
{{end}}
</select>
</span>
<span class="form-refine">
<span class="spacing">Tags:</span>
<input type="number" name="anidb" placeholder="AniDB" title="AniDB" value="" class="form-input"/>
<input type="number" name="vgmdb" placeholder="VGMdb" title="VGMdb" value="" class="form-input"/>
<input type="number" name="vndb" placeholder="VnDB" title="VnDB" value="" class="form-input"/>
<input type="number" name="dlsite" placeholder="DLsite" title="DLsite" value="" class="form-input"/>
</span>
<div name="language" class="form-refine form-input language">
{{ yield flagList(languages=GetTorrentLanguages(), selected=Search.Languages, inputname="lang", id="refine-search")}}
</div>
<button type="submit" class="form-input refine-btn" name="refine" value="1">{{ T("refine")}}</button>
</div>
</div>
2017-07-24 07:03:43 +02:00
</form>
</div>
First batch of changes for the refactor (#1078) * First batch of changes for the refactor Added the support of gin in routes and other services/utils Begining implementation of JetHTML * Remove os folder * Move scrapers to own repo * Second batch of changes All .jet.html are the working templates. You can now test this PR, the index Page and upload works. If you want to complete the other html templates, you're welcome * Move captcha to util * Move uploadService to utils * Use govalidator instead of regex * Third batch of changes All the front end should as previously. I also fixed some minor things unrelated to the refactor (mostly style issues on static pages) Now errors can be accessed by importing the "errors" helpers and using the `yield errors(name="xxx")` command in templates. Same for infos. Templates are now more hierarchized with a base template "base.jet.html" which is extended depending on the context in "index_site" or "index_admin" layouts. Those layouts are extended than in every pages. Other helpers are captcha to render a captcha `yield captcha(captchaid="xxx")` And also csrf, with the command `yield csrf_field()` To translate, you don't have anymore to do `call $.T "xxx"`, you just have to do `T("xxx")`. Pages for the website part are in folders in the folder "templates/site". Pages for the admin part are in "templates/admin". Layouts are separated in "templates/layouts". Helpers and menu are in "templates/layouts/helpers" and "templates/layouts/menu". Error pages should be put in "templates/errors" * Added test on templates When adding a new template, you have to tell to template_test.go, the context of the new template (if it doesn't use the common context) * Panel admin works Now the templating part should work. The PR can now be fully tested. I think we should push the templating PR and do the routes/controllers/removal of services in another branch. So we know that this one is functional * Updated dependencies * Fixed test for modelhelper * Fix testing for commentlist * Fix travis :') * Just renamed router and removed network * Applying same SEO fix * Update form_validator.go * Added back regexp package
2017-06-28 13:42:38 +02:00
{{end}}