* Tag Search + Tests + Search slight refactor
First commit improving search. Different struct have their own file with their tests. This way of separating struct by files is inspired by the go packages I've seen so far.
Added new behaviour as discussed in #1334
* fix fallback to ES
* Added some comments to explain PG fallback + log err moved
* Refactored search
Nearly fully covered
WhereParams struct has disappeared for Query struct instead
In DB model, we use an interface implementing Query struct methods
* 1rst Refactor of Tags (WTF already?!)
Prepare Tags for the refactored system. Now there will be descriptive tags for a particular release (ecchi, BDSM, ....) and typed tags.
Typed tags are tags relevant to all torrents and can be limited to some input value. For example, video quality is a typed tag limited to some values (hd, full hd, sd, ...). In the same way, anidbid is also a typed tag but doesn't have default values.
Furthermore, the location storage of tags have changed, now accepted descriptive tags are stored in the torrents table in the column "tags" and they are separated by commas.
In the opposite, accepted typed tags can have have their own column in the torrents table. For example, anidbid, vndbid will populate the column DbID when accepted. On the other hand, videoquality will populate the same way as descriptive tags.
This behaviour depends on the callbackOnType function in tag/helpers.go
* fix for modtools :')
* Added anidb, vndb, dlsite & vmdb id fields in torrent model.
Tags don't have an accepted field anymore.
Accepted Tags are in torrent.AcceptedTags and non-accepted ones in torrrent.Tags.
New Helper + New Changelog for translation string.
* New upload/edit form for torrent tags.
Now the inputs are dynamically generated by the helper tag_form.
No more modal window in those form, only inputs.
Support of tags in API
New translation string for the link to the modal on torrent view.
More comments in the functions for tags
* Improving how config for tags work. Adding a test on them with understandable messages.
Config for tags have now a Field attribute which is linked to the Torrent model. For example anidbid tag type has now a AnidbID field in config which is the name of the field in torrent model (AnidbID). Every new tag type need to have a field attribute with its counterpart in torrent Model.
Fixing some errors
* Fix compile error + Tests Errors
* Improve performance by caching the list of tags with an index
Adding/removing tags works/tested
New translation strings
TODO: test/fix adding tag on upload/edit
* Mini fix to display video quality
+ tags works/tested on modo edit
* Fix editing tags on modpanel
* Edit tags works
* Add translation string
* Add search backend for tags.
?tags=xxx,eee,ddd
?anidb=21
?vndb=23
?vgmdb=24
?vq=full_hd
* Fix Ajax tag Removal&Add
* Added form for descriptive tags
* Forgot to add the link between database and form for descriptive tags.
* Adding the increase/decrease pantsu for descriptive tags
* Fix#1370
* When you actually forgot to commit files after having forgotten commits
* Add HTML for sorting by name etc
* Add CSS to hide inputs for sorting in refine
* Set value of SortOrder on true if on true (wew)
* Add SortOrder & SortType variables
* change translation strings
* add translation strings
* forgot a missing { and change ascending value
* Fix rule that didn't apply and change it's value
* Remove css rule from html
* one pixel higher margin
* smaller category in refine, bigger minimu msize for searchbox
* fix for too big searchbox at some very specific resolution
* lower height level for log-in icon
* add "sign in" text when hovering log-in link
* Css changes
* Better outline for refine button in g.css
* remove hide-xs class from category in header
* Forgot a ;
* User menu alignement on low width
* same as above
* Update main.css
* Update main.css
* Update main.css
* Update main.css
* Update main.css
* Padding enhancement for "Sign in" link and avatar
* Update main.css
* Update g.css
* Update classic.css
* Update tomorrow.css
* Update g.css
* Update g.css
* Update tomorrow.css
* some <summary> improvements
* make it wider
* better border color for torrent preview tomorrow
* better border for classic
* fixing that god damn padding once for all
* bigger search icon
* Update tomorrow.css
* Initial Commit for OAuth API
This builds and run and return the right error.
Need to test it and then adding all users as possible client
* Added mising dependency
* just compile already...
* Fixing template test
* Imrpovements
Moved db stuff in models
Added some tests
Added form in modpanel to add/update a client
Added controllers for add/update of client
* Added Forms + speed improvements
Controller oauth client listing + html
Controller oauth client delete + messages
Messages on comment delete
New ES config that disable ES if set to false. Improve load speed on local development
Fix a load config bug
Fix index admin & translation string sign_out broken by @ewhal
* Sanitize empty strig in form array + css
Multiple empty array of strings are sanitized for the oauth client create form
Added some css for the form display
* Upload and Create form works
* Fix splitting response types
* Removing required on secret when updating
* fix travis error
* Fix travis template test
* Update dependency
* Moved to jinzhu instead of azhao
* randomizen secret on creation
* Final touch on oath api
improved display name
fix grant form csrf
fix login csrf on oauth
* Fix gorm test
* fix template test
* Fixing deleted dependency issue
* Make travis faster
* Fix typo
* Fix csrf for api calls
* This shouldn't be exempt
* Removing hard coded hash
@ewhal Don't forget to replace the hash in tokens.go with another one
* Added an example on how to use OAuth middleware
* Renamed fosite utils to oauth2 utils
* Remove html rules from upload, load rules file and call the rule function
* Update faq.jet.html
* Create rules.jet.html
* forgot to remove old list
* forgot to do that
* remove <br/>
* Update main.css
* Update g.css
* add jav flag keyword
* Update kilo.js
* add h-games keyword
* removal of space
* margin-right addition
* Update flags.jet.html
* margin into padding
* add "highlighted" class for possible future use
* bigger rules-drop, fix wrong display, remove useless line
* add alt for category img & alt with every language for flag
* literally no point of an alt on a div
* flag alt
* remove custom_flag.css
* remove ' that had nothing to do here
* replace sukebei variable to boolean
* fix ? operator & variable name
* attempt at fixing visual cues for anonymous torrents
* Update torrents.jet.html
* add missing ,
* useless code if user logged off so moving that
* add it back here and check if logged in
* should work almost properly now
* same here
* flag-other invisible
* Update kilo.js
* Update upload.jet.html
* should work very well now
* same here
* Delete categories.png
* Add files via upload
* Update main.css
* Update kilo.js
* Update upload.jet.html
* Update kilo.js
* Update torrents.jet.html
* proper behavior for trusted people
* different flag form id
* add id
* add language name in an span
* make that span invisible =)
* Update flags.jet.html
* Update upload.jet.html
* Update kilo.js
* whoever read this is a faggot
* Update upload.jet.html
* add button in header & remove two options from header search
* dont show refine button on small screens
* remove the div in there
* to put it there and add display: none when needed
* add refine class for future js code
* add function in code to toggle refine
* more html changes
* spacing changes
* add limit & show trusted and all that stuff to refine
* add margin
* obligatory css changes
* forgot {{ }} for a variable name
* add function on onclick refine button
* wrong file
* put onclick & translation on button
* 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