Commit Graph

156 Commits

Author SHA1 Message Date
Maja Komel dbbadb5c35 FEATURE: add short_site_description setting to be included in title tag on homepage 2018-12-12 11:46:58 +01:00
Saurabh Patel 9e3143445b DEV:add uploaded_meta option in category for category meta image (#6724) 2018-12-07 16:24:07 +01:00
Maja Komel 4a8f21d387 FIX: prevent minimum_required_tags on category being set to null (#6703)
* FIX: prevent minimum_required_tags on category being set to null

* add migration for NOT_NULL constraint for minimum_required_tags

* add specs
2018-11-29 18:10:14 +01:00
Robin Ward 931c3d165b Revert "FIX: We shouldn't include topics when mobile view is enabled"
This reverts commit 2feadcdafb.
2018-11-02 10:29:44 -04:00
Robin Ward 2feadcdafb FIX: We shouldn't include topics when mobile view is enabled
This setting was set to be the opposite of what we want
2018-11-01 14:47:06 -04:00
Jeff Wong e55f220b33 add category style boxes with featured topics option 2018-10-08 16:19:54 -07:00
Guo Xiang Tan 59c9051a2e REFACTOR: Rescue error at the specific spot that is raising the error. 2018-09-03 11:04:58 +08:00
Blake Erickson ae532f8548 FIX: return 422 for an invalid group name on category create 2018-08-30 14:28:55 -06:00
Régis Hanol 12bab65167 FIX: going from /categories to /latest on mobile might break infinite scrolling 2018-08-15 01:22:03 +02:00
Sam ac0053f491 FEATURE: navigate to first post and auto bump category settings
### navigate_to_first_post_after_read setting for categories

When enabled on categories logged on users will return to OP after
reading the entire category. (useful for documentation categories)

### num_auto_bump_daily

Set a number of topics that will automatically bump daily on a category.

- Every 15 minutes we will check if any category has this setting
- Categories with the setting are shuffled
- We exclude pinned, closed, category description and archived topics
- Maximum of 1 topic for the list of categories is bumped till limit reached per category
- We always try to bump oldest first
- Limit is elastic using a RateLimiter that ensures that we only bump N per day

Also some minor organisation on category settings

Froze strings on category.rb
2018-07-16 18:10:35 +10:00
Guo Xiang Tan ad5082d969 Make rubocop happy again. 2018-06-07 13:28:18 +08:00
Guo Xiang Tan 467d91347a Missing specs for `Group`, `Tag`, `Category` and `Flag` web hooks. 2018-05-21 17:29:58 +08:00
Sam 146a6c3592 FIX: exclude topics from latest in /categories on refresh
When you hit refresh on categories page it would not supress correctly
2018-04-24 11:07:26 -04:00
Arpit Jalan 9ca6ebe8fe FEATURE: enforce tagging on categories 2018-04-11 07:15:24 +05:30
Vinoth Kannan e7407d0adc FEATURE: Webhook for group and category events 2018-03-27 11:53:35 +05:30
Robin Ward 13eda41ff5 Fix lint errors 2018-03-03 14:34:19 -05:00
Robin Ward 31e3bf6d8d FEATURE: New "Categories and Top" homepage style
Select this option if you want to show top topics on the homepage
instead of latest topics.
2018-03-03 14:26:57 -05:00
Sam 720e1965e3 FEATURE: add category suppress from latest
In the past we used suppress_from_homepage, it had mixed semantics
it would remove from category list if category list was on home and
unconditionally remove from latest.

New setting explicitly only removes from latest list but leaves the
category list alond
2018-02-22 09:56:35 +11:00
Sam 41986cdb2f Refactor requires login logic, reduce duplicate code
This also corrects the positioning in the chain of the check
and removes misuse of prepend_before_action
2018-02-01 15:17:59 +11:00
Sam f2e7b74d88 FIX: don't return 200s when login is required to paths
When running `ensure_login_required` it should always happen prior to
`check_xhr` cause check xhr will trigger a 200 response
2018-02-01 12:26:45 +11:00
Gerhard Schlager 8f6d35aa59 FEATURE: category setting for mailinglist mirror 2017-11-17 15:29:14 +01:00
Guo Xiang Tan 77d4c4d8dc Fix all the errors to get our tests green on Rails 5.1. 2017-09-25 13:48:58 +08:00
Guo Xiang Tan 5012d46cbd Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
Neil Lalonde 0b41046238 don't force SiteSetting.title into meta title tag 2017-06-12 13:50:50 -04:00
Neil Lalonde 11ce73b8ed FEATURE: category setting for default top period 2017-03-22 16:54:18 -04:00
Neil Lalonde 6d7e968e30 FEATURE: box-style rendering of sub-categories 2017-03-13 15:25:52 -04:00
Sam f13367cecd FIX: latest + category not respecting homepage category suppression 2017-03-10 15:17:51 -05:00
Neil Lalonde 6aab8cb331 FEATURE: new category setting for whether to show latest topics or top topics by default 2017-03-03 11:30:44 -05:00
Neil Lalonde 262016604d FEATURE: each category can control how many topics to show on categories page 2017-03-01 15:12:57 -05:00
Neil Lalonde a702330ccd FEATURE: make show_subcategory_list a per-category setting 2017-02-22 11:42:36 -05:00
Sam 2b808ad9da Merge pull request #4609 from joebuhlig/category-topics-wiki
FEATURE: Category setting to make all topics wikis
2016-12-20 09:15:51 +11:00
Neil Lalonde 923cf73c6e Topic Featured Links: move data from custom fields to topics and categories tables. Invert behaviour of topic_featured_link_allowed checkbox. Fix a bug with invalid topic records due to changing that category checkbox. 2016-12-19 14:54:07 -05:00
Joe Buhlig 87251fded7 FEATURE: Category setting to make all topics wikis
FEATURE: Category setting to make all topics wikis
2016-12-19 06:42:18 -06:00
Guo Xiang Tan 9a800107cb FIX: Associate category logo and background to uploads record. 2016-12-12 17:37:28 +08:00
Neil Lalonde 9ef1688a76 FEATURE: per-category default topic list sort order 2016-11-01 12:18:41 -04:00
Guo Xiang Tan 9374e5d42d Revert "FIX: don't overwrite category's logo & background URLs"
This reverts commit 641b95f655.
2016-09-22 11:30:19 +08:00
Régis Hanol 641b95f655 FIX: don't overwrite category's logo & background URLs 2016-09-21 22:11:31 +02:00
Guo Xiang Tan b0752b1f91 FIX: Don't bypass validations. 2016-09-15 10:15:17 +08:00
Régis Hanol e064e6f7a3 FEATURE: new 'categories_and_latest' endpoint 2016-08-29 22:47:44 +02:00
Régis Hanol 2690ef7050 prefix setting with 'desktop_' since it's only used for desktop 2016-08-22 23:43:42 +02:00
Régis Hanol d06e2793aa fix logic for when to include topics in category list 2016-08-22 23:11:08 +02:00
Régis Hanol 4d6028ea2d UX: new 'category_page_style' site setting 2016-08-22 23:01:43 +02:00
Régis Hanol eb953c0904 FIX: /categories page on mobile 2016-08-19 01:47:00 +02:00
Régis Hanol 6d1d7b7c8f UX: new /categories layout 2016-08-17 23:23:16 +02:00
Neil Lalonde a49ace0ffb FEATURE: ability to restrict tags to categories using groups 2016-06-07 15:36:20 -04:00
Neil Lalonde 2c78bea5a0 FIX: could not remove tags from a category 2016-05-31 17:27:22 -04:00
Neil Lalonde 6796b15857 FEATURE: restrict tags to be used in a category 2016-05-30 16:56:33 -04:00
Arpit Jalan ff12b5bf57 FIX: newly created categories were not showing up 2016-03-14 23:17:02 +05:30
Régis Hanol 031146a821 FIX: ensure email in address insn't used it both Groups & Categories 2016-03-08 20:52:04 +01:00
Régis Hanol e2744fc19f FIX: adding the 'contains_messages' column back 2016-01-12 12:06:51 +01:00
Régis Hanol 8049dfdfda CLEANUP: remove 'contains_messages' leftover 💩 2016-01-12 11:29:26 +01:00
Régis Hanol ba0df7e4cd rename 'is_support' to 'contains_messages' 2015-11-26 18:40:54 +01:00
Régis Hanol 9ef8397164 new Category.is_support attribute 2015-11-26 18:31:24 +01:00
Guo Xiang Tan f39b9124b6 FEATURE: Log staff actions for Category changes. 2015-09-18 10:53:08 +08:00
Kane York 342eba4374 FEATURE: Category reordering dialog 2015-09-06 16:53:52 -07:00
Régis Hanol a501947d67 FEATURE: suppress categories from the homepage 2015-09-02 20:25:18 +02:00
Robin Ward 7676c5dfe7 Can add topic templates to categories, prepopulated on compose 2015-07-03 10:01:46 -04:00
Sam Saffron e3fa27a01c FEATURE: serialize and update category custom_fields
- send to client
- update from client
2015-06-10 06:13:36 +10:00
Robin Ward 5da5269652 FIX: Bad page title for categories view by google crawler 2015-06-08 12:07:35 -04:00
Régis Hanol 8d967d9065 FEATURE: move all uploads to a single endpoint + defer upload creation in a background thread 2015-05-20 16:45:48 +02:00
Arpit Jalan 866d1cd8e3 FIX: handle error for duplicate email_in address 2015-04-16 16:23:22 +05:30
Sam f5af4768eb FEATURE: add clean support for running Discourse in a subfolder
To setup set DISCOURSE_RELATIVE_URL_ROOT to the folder you wish
2015-03-09 13:14:29 +11:00
Régis Hanol 0e5c9b2590 small upload code refactor 2015-02-03 18:44:18 +01:00
Erick Guan 1e166d89ff support setting category slug 2014-12-30 03:14:54 +08:00
Jason W. May efa872e426 optional custom value for category slug (create and update) 2014-12-03 16:23:59 -08:00
Régis Hanol fd5677808c SPEC: make sure digest doesn't pick any topics in categories that are muted 2014-11-03 16:57:50 +01:00
Robin Ward d2ac5a9ac6 Rename `/category/xyz` paths to `/c/xyz` -- @SamSaffron did most of the
work even though I'm merging the patch!
2014-10-16 12:15:31 -04:00
Régis Hanol 5754e8dd0f FEATURE: auto-close topics based on last post 2014-10-10 18:21:44 +02:00
Sam 2f8d139ec0 BUGFIX: incorrect ordering in category permissions
FEATURE: UI for categories that we allow badges on
2014-07-10 12:02:16 +10:00
Robin Ward 462dcadd01 FEATURE: Subcategory list on parent subcategory page. 2014-07-02 16:47:43 -04:00
Robin Ward e22688a204 FEATURE: Can upload images to categories 2014-06-30 14:14:00 -04:00
Catrin 772a304fc2 dropdown on categorypage 2014-05-29 18:18:27 -04:00
Neil Lalonde 27cbc06563 Add fixed_category_positions site setting to handle whether categories are ordered by specified positions or by activity. 2014-05-16 11:33:52 -04:00
Louis Rose 1574485443 Perform the where(...).first to find_by(...) refactoring.
This refactoring was automated using the command: bundle exec "ruby refactorings/where_dot_first_to_find_by/app.rb"
2014-05-06 14:41:59 +01:00
Robin Ward 2b0151afe9 BUGFIX: Editing a category would break categories for the current user
session.
2014-03-05 17:33:14 -05:00
Benjamin Kampmann bf77c84095 BugFix: email-in on categories wasn't null-ed properly
Causing a problem if two categories got saved with an empty string because the corresponding Database constraint on the index would complain about dublicate values
2014-03-05 00:42:05 +01:00
Benjamin Kampmann d32cb55837 Add public-inbox to Email-In-Feature
- Adds the advanced option to accept email from non-users per category email-address
 - Adds tests covering the new feature
 - Adds UI to configure this feature in the frontend
2014-02-28 16:53:58 +01:00
Benjamin Kampmann 37cea49459 Add Email-In-Per-Category
- allow the configuration of an inbox-email-address per category
 - post emails to that email into that category instead of global

 - Adds UI for configuration
 - Adds Documentation for configuration
 - Adds Tests for new feature
2014-02-28 16:53:58 +01:00
Robin Ward 2892153712 REMOVE: Get rid of the `hotness` control for good. 2014-01-29 11:54:34 -05:00
Neil Lalonde e7975f25b8 Remove remaining code for two-column categories page 2014-01-07 18:13:49 -05:00
Neil Lalonde 341adc93a4 Allow categories with null position, which means sort them based on activity. Mix absolutely positioned (position is not null) categories with null position categories. 2013-12-16 15:13:57 -05:00
Neil Lalonde 6fa2e68742 Show more than one topic per category on the wide categories page. Disable support for the 2-column categories page. The category_featured_topics site setting controls how many topics to show. 2013-12-12 15:52:30 -05:00
Neil Lalonde 9a24d2651d Allow category to auto-close topics in X hours instead of days. FIX: the system message that says a topic was automatically closed was only counting in days. 2013-12-06 16:39:35 -05:00
Robin Ward 61468f6f27 Can assign a parent category to a category. 2013-10-24 17:03:28 -04:00
Sam 0f4f593c89 correct broken test 2013-10-21 17:21:35 +11:00
Sam e7a037709f allow ordering categories in the edit category ui 2013-10-21 17:21:34 +11:00
Sam 29c8d2ebec oops add security 2013-10-21 15:33:42 +11:00
Sam 6067795780 categories can now be re-ordered 2013-10-21 15:25:20 +11:00
Sam 1ee49798b2 work in progress wide category list 2013-10-18 11:10:10 +11:00
Neil Lalonde 4fa11f159f Add site setting site_description. If filled, it will be used in meta description tag for teh white hat SEO 2013-09-11 15:33:27 -04:00
Sam 352ac9e60c Finalize read only and post only categories, finished off UI work 2013-07-16 15:46:11 +10:00
Sam ecf17cfebb work in progress, add fidelity to category group permissions (full, create posts, readonly) 2013-07-16 15:46:11 +10:00
Ian Christian Myers 130d837952 Implemented strong_parameters for Category/CategoriesController.
Category now requires parameters to be permitted by strong_parameters using #require or #permit for mass-assignment. Missing required parameters now throw a ActionController::ParameterMissing execption instead of the Discourse::InvalidParameters execption.
2013-06-04 23:45:25 -07:00
Robin Ward 92dc59fba9 Properly assign draft keys to Categories List view. 2013-05-28 21:16:24 -04:00
Robin Ward 560fb15d8a Include pinned topics in category list.
- removes an (n+1) query for user data
- supports the preload store for the data to avoid a second request
- fix a bug where uncategorizes was reporting (0, 0, 0) for topics by week, month, year
2013-05-28 15:36:16 -04:00
Neil Lalonde f3282e33a3 Add tabs to category create/edit modal. Categories can have a default auto-close setting that applies to all new topics created in the category. Add rspec-given and write some integration tests. Tests for topic auto-close with category default 2013-05-17 11:05:35 -04:00
Sam 670b66ade3 better add some tests here tomorrow 2013-05-13 18:47:32 +10:00
Sam 942f168ab6 UI still a tad rough, but we have a first pass of secure categories 2013-05-10 16:47:47 +10:00
Neil Lalonde 6063f81946 Show something on categories page when js is disabled 2013-04-26 13:10:41 -04:00
Neil Lalonde 372442bd1c Make it possible to edit a category with an empty slug 2013-04-18 17:07:06 -04:00