Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0
Graphe des révisions

58 commits

Auteur SHA1 Message Date
akuma06
3775e9dfb5 Torrent Hidden Option (to test before merging)
* Added a check on username and userId when converting torrent to JSON
* Added a checkbox for hidden in modepanel, torrent user edit and upload
* Added a Hidden field bool in torrent model and upload form
2017-05-27 20:33:40 +02:00
Eliot Whalan
fe77845ebf
Hopefully fix memleak 2017-05-27 11:50:31 +10:00
akuma06
6481e90a0c Golint friendly next (#756)
* Gofmt friendly

Keeping Go source code in line with what they preconize

* Golint Friendly Next

So I have made some variables unexported
Added comments in every function that I know what it does
Removed some deprecated stuff that I was sure of
Added a comment on possible deprecated methods "Is it deprecated?"
Changed some variable/method name according to golint recommendations

* Update filelist.go
2017-05-26 12:12:52 +02:00
akuma06
2773fe200d Golint friendly (#747)
* 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
2017-05-25 21:54:58 +02:00
akuma06
6edc68fe22 Deleted torrents mod done (#732)
* 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

* Forgot this file in last commit

* Less useless queries

The use of Save makes it that users are created and updates also all the
associatiated models. Better to just update the colomns needed (less
useless queries)

* Some Updates

* Added a new status of 5 for locking torrents
* Modifying the list torrents view for using it in deleted torrents view
* Added function to get deleted torrents
* Torrents (and reports) can be definitely deleted
* Some new translation string

* Fixing

* fix 2

* Added upload check for locked torrents

If a user owns a torrent, has deleted it and try to repload it. As long
as it has not been locked, he can.

* Fixing wrong condition in isdeleted

* Finished

* Info messages on success when deletes or lock
* Fixed double deleted_at is Null
* Added Link to view of deleted torrents
* Added new translation string
2017-05-25 02:19:05 +02:00
akuma06
041473bfac Tested and works!
Changes:
* Updates only the colomns of torrent table
* Moved categories config in config/torrents.go
2017-05-24 22:15:38 +02:00
akuma06
93eb4d7ae1 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
2017-05-24 21:16:15 +02:00
akuma06
cf844f0d43 Merge branch 'dev' into torrent-mass-mod-edit 2017-05-24 20:29:52 +02:00
akuma06
1ffea3f39f 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.
2017-05-24 20:23:54 +02:00
Eliot Whalan
b4b1b1c26a
go fmt all the code 2017-05-24 17:11:13 +10:00
akuma06
d2617c9c5d 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
2017-05-24 01:03:03 +02:00
akuma06
99f2092028 Revert "Revert "New User Edit Panel"" 2017-05-23 04:05:33 +02:00
alucard0134
ed5152a4a0 Revert "New User Edit Panel" 2017-05-22 19:10:06 -05:00
akuma06
c8c3dc1980 New User Edit Panel
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
2017-05-23 01:26:09 +02:00
akuma06
a4c23dda1f wiiiip 2017-05-21 20:20:40 +02:00
akuma06
5639033370 Wiiiiiip 2017-05-21 19:38:39 +02:00
Ramon Dantas
adb90d657c Group common template variables together. (#665)
* Bundle fields used in most template variables under CommonTemplateVariables

* Make handlers use CommonTemplateVariables
2017-05-21 17:10:19 +10:00
yiiT
0613b149d9 People forget about mods tools (#664) 2017-05-21 12:10:59 +10:00
Ramon Dantas
1968d2ae54 Move translation func to template variables (#652)
* 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
2017-05-21 08:38:28 +10:00
akuma06
cf478a4235 Add Torrent WebLink + fixes
Simplifying messages util (no need to add everytime r)
2017-05-20 17:01:13 +02:00
akuma06
ffbd0d4851 Fix 2 2017-05-20 14:05:26 +02:00
akuma06
d38c02f802 Fix 2017-05-20 14:03:59 +02:00
akuma06
369c9151f1 Merge remote-tracking branch 'refs/remotes/origin/dev' into multi-action-torrents-mod
# Conflicts:
#	router/modpanel.go
#	router/router.go
#	service/torrent/torrent.go
2017-05-20 13:58:37 +02:00
akuma06
0d5e2abf7f Added multi action on torrents 2017-05-20 13:45:15 +02:00
sfan5
a3fa6df938 Remove bugs (#643)
* 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
2017-05-20 20:45:27 +10:00
tomleb
7eee47b0d3 Fix bug, remove literals (#629)
* Use ModeratorDir variable

* Rename cookieHelper to cookie_helper for consistency

* Use named constant instead of literals

* Fix ability to upload when uploads are disabled

The old code let people upload under the right conditions when uploads
were disabled. (ie: User is banned and config.AdminAreStillAllowedTo is
false)

* Increase timeout (fixes #517)

* Fix inconsistent indentation *.{js, css} (fix #583)

* Fix negative page

Temporary fix. The issue was that going to a negative page caused the
sql query to have a negative offset. This caused an error in the
database query.

We need to cleanup this code, but this will work for now.

* Fix wrong PG_DATA directory due to upgrade to 9.6

* Add server status link to FAQ

* Fix failing tests

* Clarify group_vars/all and hosts doc

* Add a wrapper to protect /mod route

* Fix login page not showing form errors
2017-05-20 09:10:16 +10:00
PantsuDev
70f87e7aac finish repo transfer 2017-05-17 15:58:40 +10:00
Atvaark
cd844aec45 Replace 'en-us' literals with the default language
This consolidates the places where a default language has to be set.

- Removed import of the 'userService' package into the 'languages' util
  package
  This was required to prevent a cyclic import between the two packages.
- Added a 'UserRetriever' interface to read the language setting of users
  inside the 'languages' package
2017-05-14 22:10:07 +02:00
sfan5
2827362b54 Fully fix modpanel 2017-05-14 13:23:27 +02:00
sfan5
f1aa52e618 Cleanup usage of now removed HideAdvancedSearch 2017-05-14 13:05:18 +02:00
sfan5
c60a8635fc Fix search in modpanel (@SpamNeko broke it) 2017-05-14 13:01:59 +02:00
sfan5
b24e31a7dc Check assign-to user for existence beforehand 2017-05-13 17:36:50 +02:00
sfan5
c0be570e54 Torrent Reassign feature for modpanel 2017-05-13 17:29:21 +02:00
sfan5
00bb382cdb Modpanel stuff (#401)
* Fix table on modpanel index

* Fix actions on torrent report list page

* Fix error reporting on modpanel templates

* Convenience functions for modpanel

Link to view page primarily and to edit page as a seperate link

* Missing confirm before torrent deletion

* Add edit button directly onto view page
2017-05-12 17:31:27 -05:00
sfan5
b2581f549b Display human-readable report reason in modpanel
Also fixes the "list all torrent reports" subpage
2017-05-12 20:43:38 +02:00
Jeff Becker
33fe211d3f mod panel template cleanup, make mod panel templates reload on SIGHUP 2017-05-11 06:49:05 -04:00
sfan5
7bc395068d Fix modpanel torrent edit (#328)
* Fix modpanel torrent edits breaking torrents

* Fix hash not being monospace anymore

* Fix modpanel torrent edit strings

* Fix modpanel torrent edit creating a new user (wtf GORM)
2017-05-10 18:46:50 -05:00
Atvaark
0678d19097 Add template and db tests (#291)
- The db test will run an sqlite3 database in in-memory
  mode and run the automigrations.
- The template test will check if all the templates
  that are stored in package variables (template.Must)
  compile and if ReloadTemplates works without panicking.
2017-05-10 18:15:36 -05:00
akuma06
802945384b Fixes 2017-05-11 00:02:36 +02:00
akuma06
f94dc3103c Added edit torrent view mod panel & fix 2017-05-10 23:53:25 +02:00
ayame-git
f326d801c2 i don't even remember what i fix anymore' 2017-05-10 23:05:56 +03:00
ayame-git
755a426931 reports are deleted with torrents 2017-05-10 22:29:59 +03:00
ayame-git
8373bce02f unborked report list 2017-05-10 22:09:37 +03:00
ayame-git
4ada27a3cc no need for potato fix anymore 2017-05-10 21:50:27 +03:00
ayame-git
1bf4012eb2 yea.. 2017-05-10 21:42:20 +03:00
ayame-git
fcd0fec9a5 some pages not dispyaing corectly in mod page 2017-05-10 20:17:07 +03:00
akuma06
0bf8088457 Mostly finished
Someone need to do torrent edit page
Can't do it :/
2017-05-10 17:37:49 +02:00
akuma06
032688f532 Fixed 2017-05-10 16:43:50 +02:00
akuma06
46d65ba865 Fixing Mod Panel (WIP) 2017-05-10 15:08:38 +02:00
Your Name
8d9605def3 delete shit 2017-05-10 07:10:23 +00:00