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

341 commits

Auteur SHA1 Message Date
akuma06
80ab45d81e New profile user menu (#761)
* Fixing user profile page

* Modified css rule word-break to break-word
* Modified torrents table in user page to look like home listing
* Made the button reset api look like a button according to actual
design
* Modified user menu to have the same spacing accross templates
* User menu is in another template file loaded dynamically

* Fixing the access to userprofile variable

* Menu needs to access the user profile with $.UserProfile
* User Notification template variable removed, instead using user
profile variable

* Reverting back theme flickering fix
2017-05-26 14:33:55 +02: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
Ramon Dantas
8fbdeed9f5 CSS-only tree view. (#753)
* Make tree-view work with CSS only

Changed the file list tree-view to use recursive templating instead of
an external function, and improved it so that it works with only CSS.
Striped lines won't work though.

* Remove inline-block from folder label

It breaks with the text-overflow: ellipsis.

* Rename makeFolderData to makeTreeViewData
2017-05-26 11:53:18 +10:00
tomleb
f22d11b35d Elasticsearch integration (WIP) (#730)
* Update mapping to be similar to TorrentJSON

* Implement ES search for TorrentParam

* Add seeders/leechers/completed to es index

* Fix filter, use analyzer

* Use ES for the search route

* Add upload_id filtering with ES

* Create/update ES index on torrent upload/update

* Delete from ES index on Delete

* Use ES everywhere, fallback to postgres query

Use Elasticsearch to search the index whenever a call to searchByQuery
is made. Big cleanup needed, but _it werks_.

* Only fetch ids from ES, nothing else

* Use ColumnUpdate instead of Save

* Add FIXME/info to search

* Template needs []TorrentJSON not []Torrent
2017-05-26 09:48:14 +10: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
0b8a39c506 Fix error on user profile edit
* Missing ">" in a close tag
* Changing route name for apireset doing a conflict route on badgemenu
2017-05-25 18:54:34 +02:00
Eliot Whalan
bc3f1aa577
start work on api reset stuff 2017-05-25 12:18:31 +10:00
Eliot Whalan
5f89f9feb2
Merge branch 'dev' of https://github.com/NyaaPantsu/nyaa into dev 2017-05-25 10:42:55 +10:00
Eliot Whalan
bb7554b79a
add searching via the api 2017-05-25 10:42:35 +10: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
Steindór
da760d4131 Added a counter below the search result nav (#728)
* added pagination

* cleanup

* indentation fix

* fix
2017-05-25 00:14:24 +10:00
Ramon Dantas
86447b853c Add tree-view file list (Done) (#724)
* Add tree-view file list

* Add TotalSize field to folders

* Remove bootstrap/jquery related code

* Add icons to filelist, some CSS formatting

Moved a few styles from the format string for the tree view, to CSS
(where possible). Make icons look consistent under all themes.

* Make filelist hideable again, show it when JS is disabled
2017-05-25 00:13:56 +10:00
Eliot Whalan
3527f01cc5
Rerun gofmt it again with -s 2017-05-24 17:15:07 +10: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
21ac12c852 Some updates
* Added support of UGC without div tag for torrents
* Added support of basic html tags for comments (a, img, b, em, u)

Fixed:
* Bug with r *request becoming a nul pointer when loading from contextin
messages.go
2017-05-24 00:08:02 +02:00
akuma06
23e7d33bb6 Fixing insert of unneeded html tags in db
Added a Sanitize function in util
* Possibility to add model in it
* Already a preset default model

Comments shouldn't be allowed html, too difficult to check every comment
for broken html
Torrents are still allowed html tags but I don't think it should since
we use markdown.
2017-05-23 22:09:20 +02:00
akuma06
07623e85ed Merge pull request #698 from NyaaPantsu/revert-692-revert-690-user-torrent-edit
Allow users to edit & delete their torrents
2017-05-23 19:43:09 +02:00
nopjmp
6cfaca1289 Add err check from GetTorrentById return in ApiViewHandler (#696)
This should give a better response to API users for when something is not found.
2017-05-23 13:18:25 +10:00
nopjmp
af2850518c Implement HEAD for views (#695)
* Implement HEAD for /view/{id}

Implement HEAD for the torrent view route by calling GetRawTorrentById.
Run gofmt on the file while we are here.

* Implement HEAD for /api/view/{id}

Implement HEAD in the same way as /view/{id}
Also run gofmt on the api_handler.go
2017-05-23 13:18:19 +10:00
akuma06
b75fc9ce53 update 2017-05-23 04:12:02 +02:00
akuma06
99f2092028 Revert "Revert "New User Edit Panel"" 2017-05-23 04:05:33 +02:00
Eliot Whalan
cd573698b1
Merge branch 'dev' of github.com:NyaaPantsu/nyaa into dev 2017-05-23 11:07:00 +10:00
Eliot Whalan
5a8ae4665d
Remove unused package 2017-05-23 11:06:43 +10:00
alucard0134
ed5152a4a0 Revert "New User Edit Panel" 2017-05-22 19:10:06 -05:00
Eliot Whalan
991ed4178e
Don't convert hashes to base16 2017-05-23 10:06:55 +10: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
ec0fde9923 Merge pull request #685 from ElegantMonkey/check-if-category-exists
Verify torrent category on upload
2017-05-22 20:34:58 +02:00
ElegantMonkey
aa14a0535b Renamed CategoryID to CategoryName 2017-05-22 15:18:29 -03:00
ElegantMonkey
331143e094 Verify torrent category on upload
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.
2017-05-22 13:25:04 -03:00
Akaahn
41e0575b82 Implemented EZTV RSS Spec #569 #451
github.com/gorilla/feeds pulled in to github.com/NyaaPantsu/nyaa/feeds
and modified to conform to EZTV spec, note: missing tackers tag
2017-05-22 17:28:20 +02:00
akuma06
4411c5d731 Fix #679
Parsing template.HTML into string and then use Sprintf make a bug.
2017-05-22 10:15:18 +02:00
akuma06
7bda7d1538 Fixing routes URL
fix of "user/id/-" #676
2017-05-22 09:10:15 +02:00
akuma06
50c8f52ee8 Fix 2017-05-22 00:52:07 +02:00
akuma06
07c120407e Finished 2017-05-22 00:22:42 +02:00
akuma06
a4c23dda1f wiiiip 2017-05-21 20:20:40 +02:00
akuma06
5639033370 Wiiiiiip 2017-05-21 19:38:39 +02:00
akuma06
32c51a57cb User Settings Notification (WIP) 2017-05-21 18:13:28 +02:00
sfan5
67ec4d5787 Format unknown filesizes in a better way 2017-05-21 14:34:32 +02:00
akuma06
11950930ad output template.HTML 2017-05-21 14:04:37 +02:00
akuma06
1bd773f537 New filesize function
Take filesize and languages.TemplateTfunc as args and output a string
To use in templates
2017-05-21 14:03:03 +02:00
akuma06
380515b322 Merge remote-tracking branch 'origin/dev' into dev
# Conflicts:
#	router/template_functions.go
2017-05-21 13:56:38 +02:00
akuma06
9b02397978 Add filesize function 2017-05-21 13:55:29 +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
20209508c9 Bundle CaptchaID and Tfunc for _captcha.html (#662) 2017-05-21 12:10:31 +10:00