* 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
* Prettier flag position
* flag overlap category icon
* HTML changes
* fix css that didn't apply properly & colspan not always being there
* Update main.css
* Update home.html
* Update home.html
* Update main.css
* Update main.css
* 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
* 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
* Comments count number
* New Modpanel fix
Fixes#755 (@ilikecats)
modpanel tables have margins
modpanel delete buttons are red
some coloring for buttons
reassign form looks better
reassign form textarea have rows="20" cols="40"
"save changes" btn green
report reasons are now translated in modpanel
delete is a real button on modpanel users page
* moved getReportDescription
* new translation strings
* new Translations object which can be used to translate string in js
* fix a the disappearance of checkboxes on new item loaded by ajax
* Mass Edit MOD api JS (WIP)
In continuity with the mass edit mod api, this is the javascript use of
it.
##What does it do?
* Delete of multiple torrents on index/search
* Category change of multiple torrents
* Change of owner of multiple torrents
* Lock & delete of multiple torrents
##How?
* New toolbar only visible for mods
* Checkboxes added only for mods
* Selection and click on the button in toolbar
* Nothing is submitted, you have to review the changes in a modal window
listing them.
* Then the ajax queries are initialized one at a time with a progression
bar
* You can always at any moment delete entries from the queuing list
* Improved progress bar
* Deleting part almost done
Improved modal design
All dom interactions should be done
Prepared Query for only one callback
Improved Modal to keep a link to the active modal
* Finished =D
Added some translation string
* Forgot the refreshing of the page
Just an option that can be disabled by making refreshTimeout to 0
* Added a fiel torrentID in search param
* Search can be limited to torrentID > id provided
* Templates creation through simple JS object
* XHR management through simple JS object
* Torrents object that interface with Templates and Query to get new
torrent uploaded according to the search context
* TorrentJSON.ID is uint now, fix weird page sorting
The bug was that ES would sort by ID in a weird manner because the id
was a string. The id is now a uint.
* Resolved the conflict for future merging
* Making the code Golint friendly
* No exported variables when not needed
* Same for functions
* Simplifying Templates variables with a form basic template variable
and a modelList basic template variable
* Adapted templates to new template variables
* use of .Models instead of model list
* use of .Form instead of modelform
* Small fix
* Small fix 2
Forgot $.Form
* Reverting templateDir as a var
* Torrent Mass Edit Api (WIP)
* Torrents can be deleted in mass from frontend with api post request
* Torrents status can be edited from frontend with api post request
-- Look to function doc for more info on how to use it
It is a WIP so it might not work =D
* Finished Mass mod Api
As per suggestion of @yiiTT in #720, I added:
* Changing torrents category
* Deletion of reports with deletion of a torrent
* Changing owner of multiple torrents
Commit also add some new translation strings.
* Make some changes
* Reports can now be cleared for the torrents selected without having to
delete them
* Users with no admin rights can't delete reports
* Fix moveto to status
moveto deprecated in api
* Tested and works!
Changes:
* Updates only the colomns of torrent table
* Moved categories config in config/torrents.go
* Make sort arrows look a lot nicer
* Add search icon into search input
* Work on navbar, fix it on mobile view
* Hide mascot on mobile views
* Make torrent view work on mobile + minor improvements
* Add status and various things to view
* ACTUALLY FINISH VIEW PAGE
* Forgot this file in last commit
* wow user profile was easy
* Work on profile page
* remove language option
* SEO improvement
* forgot the fucking bracket
* make description more weeb
* add irony
* add better irony
* Update README.md
* Make sort arrows look a lot nicer
* Add search icon into search input
* Work on navbar, fix it on mobile view
* Hide mascot on mobile views
* Make torrent view work on mobile + minor improvements
* Add status and various things to view
* ACTUALLY FINISH VIEW PAGE
* wow user profile was easy
* Work on profile page
* remove language option
* SEO improvement
* forgot the fucking bracket
* make description more weeb
* add irony
* add better irony
* Remove Bootstrap and Jquery, and create basic nav
* More improvements to navbar, as well as work on _badgemenu
* Complete navbar HTML, obviously it still looks horrendous
* Change layout on torrent table, using grids.
* Remove Bootstrap and Jquery, and create basic nav
* More improvements to navbar, as well as work on _badgemenu
* Complete navbar HTML, obviously it still looks horrendous
* Change layout on torrent table, using grids.
* HOLY FUCK INDEX IS /DONE/
* DO UPLOAD PAGE, DELETE OLD SHITTY CSS
* Complete login page
* Remove Bootstrap and Jquery, and create basic nav
* More improvements to navbar, as well as work on _badgemenu
* Complete navbar HTML, obviously it still looks horrendous
* Change layout on torrent table, using grids.
* Remove Bootstrap and Jquery, and create basic nav
* More improvements to navbar, as well as work on _badgemenu
* Complete navbar HTML, obviously it still looks horrendous
* HOLY FUCK INDEX IS /DONE/
* DO UPLOAD PAGE, DELETE OLD SHITTY CSS
* Complete login page
* Begin work on profile page
* fucking git, man
* Damn, that looks sexy
* Complete login and register pages, include very minimal grid system, and delete all of view template
* Do view page!
* Finish view even more
* Fix dates and filesizes in torrent table
* Improve comment/captcha input
* Actually add magnet and torrent buttons
* Add open-iconic instead of fontawesome
* Improve user side-panel
* Rename Category_* to CategoryName
* Beginning to finish up
* Implement themes and add basic mobile support to front page
* Fix some slight color errors
* Fix captcha on dark
* magnet and torrent links on view
User can edit torrents
* delete torrents
+ New translation string for mod panel and user edit torrent panel
+ Improvement of messages util with implementation of T (no need to get
Tfunc now, messages util do that for you)
+ Use of @ElegantMonkey GetCategories to generate select of categories
in search and forms
Added a new package, "categories", with the valid categories for each
Nyaa and Sukebei. On upload, check if the category is present on
the valid ones. Also changed the template function Category_Nyaa and
Category_Sukebei to reflect this.
* Add T field to template variables
* Remove languages.SetTranslationFromRequest
* Add Tfunc on handlers
* Remove T and Ts from template_functions
* Update templates
Change the templates to use the local Tfunc, instead of the global one.
Also changed the signature of the fields on template_variables.go, so that
they return a template.HTML to avoid escaping problems.
* Remove unnecessary variable
* Fix S/L/D columns wasting huge amounts of space
Partially reverts 0c9cdfa8bf.
* Move last scrape below seed-bar
Also fixes the very misleading indentation
* Show category name on view page too
* Fix fucked up login page (fixes#640)
* Fix empty page on login w/o pass (fixes#634)
* Fix incorrectly colored error text in day mode
* Better readable footer in night mode
* Prepare having old uploader names on sukebei and various fixes for sukebei
* Different HTML title for sukebei
* Make comments extra column
* Fixed#595 w00t
* Cleanups and fixes (#623)
* Keep naming consistent
* Remove execute bit from files
* Default to DefaultLanguage (without passing it to the func)
* Remove commented code
* Use Content-Type to get language json
* Lines of 400 characters is dumb
* Update new repo in README
* Remove useless script since we fallback to a defaultlang
* Fix fallback language panic
* Fix uninitialized MaxPerPage when not in querystr
The issue was that the req.MaxPerPage was not set (default to 0) when
the query string didn't include "max". This makes the server query the
whole db since the resulting limit is 0.
* Fix creating empty torrents (only worked once)
* Lines of 400 characters is still dumb
* Update ja-jp.all.json (#622)
* Update README.md
* Make comments extra column
* Fixed#595 w00t
* Comment out comments for now
Instead of showing 0/0/0 when the torrent hasn't been scraped (which
may be misleading), show "Unknown", and also show when the torrent was
last scraped on the view torrent page.