* Fix User delete button
Fix#1652
This bug comes from the fact that @kiloutre edited how the form behave and instead of a GET request, do a POST one. However every POST request not in /api or /mod need a CSRF Token to work.
* Update userlist.jet.html
* Update index.jet.html
* Fix invalid comment date when JS is enabled
* fix travis
* fix wrong url in admin torrent list
* Fix wrong pubDate for /feed
* Different function name
* same changes as rss for magnet rss
* travis test
* fix delete button on torrent view
* Update edit.jet.html
* Update index.jet.html
* Update userlist.jet.html
* Update torrentlist.jet.html
* Update tomorrow.css
* Update main.css
* Update main.css
* fix invalid date of torrents in user profile
* modify fancy js to work with new form
* enhance fancy JS to adapt to every form
* Update index.jet.html
* Update index_admin.jet.html
* Update torrentlist.jet.html
* what the fuck
* ditto
* forgot to remove the debug alert
* HTML changes to have tags in one div
* Add form-input class to tags inputs in upload
to have them look like regular inputs
* CSS changes to make tags inline
* Add changes to torrent edit
* Add changes to admin torrent edit
* attempt at fixing travis
* rollback admin edit in an attempt to fix travis
* Fix tags being visually broken in one very specific resolution
* fuck this shit
* Add Anidb, Vndb, Vgmdb links
* Anidb, Vndb, Vgmdb and Dlsite links into tag design
* Add external links to Anidb, Vndb, Vgmdb and dlsite
* Add filter links to tags
* Filter string translation already exists
* Fix display tags
* Update translation changelog
* Do not display tag type when default
* 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
* 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
* 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
* Make torrent language form not required
It's required currently and that's annoying because the majority of torrents do not need that
* Make torrent language form not required
* Make torrent language form not required
* Should fix old uploader name in torrent view
* Fix "save changes" in modtools
* Modtool more colorful
* Fix search bar placement in modpanel
* Fix for widescreen
* Fix buttons in modpanel and some troncated text
* Update torrent.go
* Update admin_index.html
* Some last fix
Re added icon on download&magnet links
GetCategory categoryID keepParent (eg: GetCategory "3" true <= for all
anime)
Modified
GetCategories to (keepParent, keepChild) (eg: GetCategories true true <=
for every catagories)
* Should fix old uploader name in torrent view
* Fix "save changes" in modtools
* Modtool more colorful
* Fix search bar placement in modpanel
* Make colors more consistent; less would be super helpful tbqach fam
* Display the old username if it's there
* Fix some admin index html
* Add custom icons and remove png code from all CSS
* Move a good amount of cosmetic code from main to classic
* Fix some weird bug with point-events; add some global icon formatting; fix mascot fucking up
* Spruce up admin panel with icons on smaller viewports, along with adding trash icon
* 404 redesign ;^)
* Mufuyu mascot on all themes; says something slightly lewd
* Fix weird user menu bug where shit would overflow
List Torrent delete log
Torrent edit log
Comment delete log
And every other logged activities
Can be filtered out by a filter tag ("edit" or "delete" supported)
Pages navigation
Can be accessed by /activities
Added some translation string
Fixed hidden username on api request
Fixed comments username on modpanel
New Activity model
New Activity handler
New Activity Service
Fixed some updating issue for ES when moderating torrents
Be aware deleting torrents and comments return the model now!
* Add flags for torrents
Add a new field, .Language, to the Torrent model, and a new package,
torrentLanguages, which maps languages to flags. Added also a flag icon pack
from googlei18n/region-flags, with (mostly) public domain flags from Wikipedia.
* Optimize flags
* Use FlagSprites CSS instead of .png files
* Only use flags for languages we support
* Add test for CSS flags
Ensure that we have all the flags for the languages we support.
* Add AdditionalLanguages field to config
This allows us to support additional languages for new uploaded torrents,
even if we have no translation for it.
* Minor CSS fix
* Add "other" and "multiple" torrent languages
Also removed the TorrentLanguage struct, as it wasn't much useful.
* Fix test
* Add colspan=2 to category when language is empty
Also hide the language column if empty.
* Add lang field to search.
Hopefully it works with Elasticsearch as well, but I haven't tested
(lol Java)
* Add language field to ES index and settings
* Add language column to JS template
* Add keyword type to language ES field
* Remove 'raw' from keyword
* Set "simple" analyzer on language
* Document .Language field on Torrent model