Commit Graph

35 Commits

Author SHA1 Message Date
Matthew Holt
e74558eaea browse: Fix for files and dirs with ':' in name 2016-01-13 13:17:58 -07:00
Matthew Holt
060ab92d29 Reorder a few things
The docs link to this structure and all its methods related to the browse template; keeping them together makes it possible to link to the whole block of code that is relevant.
2016-01-10 09:47:26 -07:00
Matthew Holt
94e3e7e5eb browse: New default template 2015-12-31 00:23:10 -07:00
buddhamagnet
57f1d3c205 pass golint
pass all tests

respond to maintainer comments

reinstate assignment of t

correct typo

correct typo

pass linter some more
2015-11-05 00:40:35 +00:00
Zac Bergquist
f9bc74626d Address various lint and gocyclo warnings. Fixes #253 2015-10-11 16:28:02 -04:00
Matthew Holt
d414ef0d0f browse: Fix tests that fail only in CI environment
... I think. Submitting as PR to double-check. This change changes file mod times on the testdata to ensure they are not all the same so that the sort is predictable!
2015-10-10 19:53:11 -06:00
Karthic Rao
f5cd4f17f8 Exhaustive test coverage to test the usage of sort,order and limit parameter for the browse middleware 2015-10-09 11:28:11 +05:30
Matthew Holt
10ab037833 Moved fileServer and browse.IndexPages into middleware package 2015-09-19 20:35:48 -06:00
Henrique Dias
8120e57850 add user defined variables into browse template 2015-09-18 08:52:12 +01:00
Henrique Dias
30b19190dc add ignoreIndexes option to browse 2015-09-17 20:33:39 +01:00
Karthic Rao
ed4148f20e Complete test coverage for replacer for Go 2015-09-10 10:28:13 +05:30
karthic rao
e3cea042d6 Left over comments removed
Redundant comments in the code removed
2015-08-30 19:00:35 +05:30
Karthic Rao
679668e3c0 removed redundant comment lines 2015-08-30 18:57:20 +05:30
Karthic Rao
730269743f Json response initial test for browse.go 2015-08-29 08:04:01 +05:30
pyed
b9d3e7721e Fixing my comment
the old comment might throw the source-reader off, my bad.
2015-08-27 18:01:46 +03:00
Abdulelah Alfuntukh
414b47d653 adds json option for the browse middleware 2015-08-24 23:37:11 +03:00
Matthew Holt
35e25be1a4 browse: Size displayed in IEC format
Powers of 2, or base 1024, rather than powers of 10 or base 1000. The powers of 2 are technically more accurate.
2015-07-29 19:15:38 -06:00
Matt Holt
bf47951f3a Merge pull request #196 from evermax/master
markdown, browse: Integrated Context struct for templating
2015-07-25 15:15:51 -06:00
Matthew Holt
a578c43810 browse: Add txt files to list of default files 2015-07-24 10:27:19 -06:00
pyed
1589129ea1 Save sorting preferences as cookies
To be used across directories
2015-07-23 13:25:03 +03:00
Maxime
bc2feece4b Moved test files to testdata folder.
Changed the tests accordingly.
2015-07-23 09:35:46 +02:00
Maxime
2d5320c454 Added test for the browse directive
Created sample files for the test
2015-07-18 11:37:05 +02:00
Maxime
f536bc94b2 Added the Context to the browse directive
Moved the Context type to middleware and exported it.
Users can use .Include and others in browse directive templating
Created test for the templates directive.
2015-07-17 20:07:24 +02:00
pyed
68add78230 Implement sorting functionality for "Browse" 2015-06-21 18:04:47 +03:00
Zac Bergquist
e4b50aa814 Fix more lint warnings 2015-05-24 22:52:34 -04:00
Abiola Ibrahim
a1312465b5 browse: return forbidden (403) only when it is a permission error. 2015-05-10 17:58:44 +01:00
Matthew Holt
e4fdf171c7 More refactoring - nearly complete 2015-05-04 11:49:49 -06:00
Matthew Holt
1a8f753303 Meh. 2015-04-21 21:41:58 -06:00
Matthew Holt
23f7f5ebba Minor UI tweaks to directory listings 2015-04-21 21:36:43 -06:00
Matthew Holt
bdd145b0de Better error handling when executing templates 2015-04-21 21:36:30 -06:00
Matthew Holt
d33256f1dc Refactor: Middleware chain uses Handler instead of HandlerFunc 2015-04-02 23:30:54 -06:00
Matthew Holt
843f6e83a9 Refactored browse middleware to return errors 2015-03-28 16:46:54 -06:00
Matthew Holt
63b39c78ee Better default template; other fixes 2015-03-24 23:05:42 -06:00
Matthew Holt
9672850d11 Bug fixes and improvements for browse middleware 2015-03-24 21:54:33 -06:00
Matthew Holt
00e43197fd Started browse middleware to list directory contents 2015-03-24 20:12:48 -06:00