Граф коммитов

157 Коммитов

Автор SHA1 Сообщение Дата
James Socol 148035f415 Push celery logs to syslog when DEBUG=False. 2010-12-08 18:16:13 -05:00
Paul Craciunoiu 86645ba1fc [615354] Use mozilla/django-moz-header:
* adds two submodules at templates/global and media/global
* extends header/footer templates from templates/global now
* Moves reset CSS to reset.css
2010-12-08 13:54:46 -08:00
Paul Craciunoiu 8b674baa8a [478929] Resize avatars and restrict upload size. 2010-12-07 10:16:08 -08:00
James Socol d0d24a5b0e Remove settings with 'tiki'. 2010-12-07 12:57:56 -05:00
James Socol daf91013f3 Update profile_avatar to show the avatar or a default. [bug 616565, bug 614036] 2010-12-06 18:06:52 -05:00
Fred Wenzel fe2ece3855 Make list of ignored users changeable in the settings. Bug 617095. 2010-12-06 14:41:59 -08:00
Paul Craciunoiu 6bb15f7b6a [614011] AAQ login/register, now its own page.
* Register and log the user in right after
* Chowse input on text and UI
* Log the user out right after asking a question if they are not active yet.
* Pull out the common modals CSS into main.css
* Add handle_login and handle_register to share login/register code with users app (see apps/users/utils.py)
* Rename password1 to password so auth.login works properly when registering.
* Use different input ids for the registration form, so registration form and login form can be on the same page and the labels work properly.
2010-12-03 12:47:11 -08:00
James Socol c52900ffe6 Drop the identicons library. 2010-12-03 11:48:37 -05:00
James Socol aa9921df3d Move avatars up one level. 2010-12-03 11:48:37 -05:00
Fred Wenzel f8b4bf3365 Warn if Customercare stats data is outdated. Bug 612966. 2010-12-02 09:42:31 -08:00
Ricky Rosario a10cdef003 Implemented user account activation via confirmation email. [bug 614703] 2010-12-02 12:13:20 -05:00
Fred Wenzel 9effabdf32 Merge branch 'cc-tweet-summary-612952' 2010-12-01 16:36:15 -08:00
Fred Wenzel a6f1910595 Show tweet statistics in the Customer Care sidebar. Bugs 612952, 612966, 612960, 612964. 2010-12-01 16:35:40 -08:00
Paul Craciunoiu a523e8084c [614049] Profile model! Included: one test and test helper. 2010-12-01 15:22:54 -08:00
James Socol e61699c00d Add HidePasswordOnException middleware. [bug 601140] 2010-11-29 14:01:35 -05:00
Ricky Rosario 7213950d4b New users app for login, logout, and redirect (and more to come). [bug 613986, bug 614002, bug 612750, bug 612749]
* Includes a SHA-256 auth backend.
2010-11-24 12:16:15 -05:00
Paul Craciunoiu 1abafd88cb [560487] Add Maithili locale. 2010-11-22 14:55:23 -08:00
Fred Wenzel 1013db8b13 CC_SHOW_REPLIES setting to switch off showing tweet replies if necessary. Bug 612943. 2010-11-19 17:05:46 -08:00
Paul Craciunoiu b51d8b5cee [613329] Videos can link to CDN if setting provided. 2010-11-19 16:31:41 -08:00
Paul Craciunoiu 89a38e25d8 Also fix broken JS on home page after minification. 2010-11-19 15:09:36 -08:00
Paul Craciunoiu 3a77be46cf [609027] Video modal
* Adds a common function for video/image hooks
* Adds support for modal + placeholder html text + title
* Multiple modals on the same page
* Close modals with escape or by clicking on overlay
2010-11-19 13:55:26 -08:00
Paul Craciunoiu 44cb5fea46 Update categories: Navigation, How to, and renumbering.
* Add 'How to' category and include it in default search.
* Add 'Navigation' category.
* Renumber all categories to leave room for future changes.
2010-11-17 16:05:46 -08:00
Paul Craciunoiu 9d356ed7f9 Add chowse's video thumbnail placeholder and use it. 2010-11-16 13:34:11 -08:00
James Socol 5d70383a19 Ignore the vendor lib for string extration. 2010-11-15 16:52:50 -05:00
Paul Craciunoiu da17b1565d [604211] Delete and edit images and videos. Includes permissions.
* Added a new migration for gallery permissions: add, change, delete
* Draft titles are now abstracted to a constant and a function, get_draft_title
* Edits set the updated_by field
* Use ModelForm.save() when saving drafts.
* Add a delete confirmation page and refactor some CSS to share to-delete styling.
* Fix a JS error in safari, .delete property is reserved
* Fix draft form error display and some string changes for the upload form.
2010-11-12 12:36:09 -08:00
Erik Rose cc40a9aadd [575820] [602325] Implement nice tagging widget for KB document editing. Factor tagging widget out into its own app. Rename "Tags" to "Topics" in the wiki app.
Questions app has yet to be refactored to use the new app.
2010-11-11 21:23:18 -08:00
Paul Craciunoiu e69dbc7a7a [595376] Upload frontend for images and videos in the gallery
* Adds a modal form that runs the user step by step through the upload process, as described in http://people.mozilla.com/~chowse/drop/sumo/kb/v7/toolbox/03_media_gallery.png
* Extracts the code for wrapping inputs in forms and POSTing to iframes from upload.js into libs/jquery.ajaxupload.js
* During image upload, a user can cancel or edit the metadata (title, locale, description).
* Cancelling or uploading an invalid image changes the hint message above the image.
* Neat fact of the day: cancelling an iframe from loading can be done by changing it's src to null in JavaScript.
* This form does not work with JavaScript disabled. Must it?
* Modal form automatically opens if drafts exist
* No video upload validation yet.
* Simplify gallery urls.py
* Disable submit button while uploading
2010-11-11 14:12:28 -08:00
James Socol 7641075015 Update search filters with Help With selection [bug 610424] 2010-11-09 15:08:51 -05:00
James Socol 7c24fb4734 A KB-rebuild task. [bug 589853]
This adds a task that spawns seperate, child tasks that re-render the
knowledge base in 100-document chunks. It also adds a number of helpers
to access the main task. (wiki.tasks.rebuild_kb) The main task is rate-
limited to once every 20 minutes. The chunks are not rate limited right
now.

* settings.WIKI_REBUILD_ON_DEMAND
  - There may be cases, like a KB sprint, where it's more efficient to
    do periodic KB rebuilds. This setting (when False) disables all on-
    demand (e.g.: triggered through the app) rebuilds.

* wiki.tasks.schedule_rebuild_kb
  - This method will try to queue a rebuild_kb task provided certain
    conditions are met:
     * settings.WIKI_REBUILD_ON_DEMAND is True
     * There is not another queued rebuild_kb task.
    If both of these are true, queue a task and set the lock. (When a
    rebuild_kb task starts, it clears the lock.)

* wiki.views._maybe_schedule_rebuild(form)
  - When editing an existing document, we only need to rebuild if the
    title or slug has changed. This checks form.changed_data for either
    field, then calls schedule_rebuild_kb() if necessary.

* wiki.cron.rebuild_kb
  - For those times when on-demand rebuilds are too frequent, we can
    schedule this cron, which just fires off the rebuild_kb task.
2010-11-09 13:01:36 -05:00
Paul Craciunoiu 6c20d6c15e [596116] Unicode in filenames now supported in upload app. And more.
* Convert latin1 tables to utf8 (also give them an explicit collation)
* Add settings for max filename length and validate the form against them.
* Add form validation messages.
* Uploading images through ajax now works (iframe access was denied).
* Alter all filename fields in the db to increase the max_length.
* Organize upload tests better.
2010-11-03 14:23:17 -07:00
Ricky Rosario 35192472b3 Styled the "Help with:" selects. Uses jquery.selectbox plugin. [bug 607301] 2010-11-01 19:33:08 -04:00
James Socol ce54806721 Create a new chat app. [bug 605476]
Created a new app because it involves multiple views and a cron. The
cron will need to be set up to run once/minute. It does a proxy request
to the chat server (settings.CHAT_SERVER) to get the queue status, then
stores the result in the cache (settings.CHAT_CACHE_KEY). The
/chat/queue-status/ view dumps out whatever's in the cache or returns a
503 status if the cache is empty.
2010-11-01 10:17:50 -04:00
Fred Wenzel ce9fafcb6b Infinite scrolling for Customer Care page. Bug 606342. 2010-10-28 16:49:37 -07:00
James Socol 0b4b2fe31f Add middleware to replace + with %20 in URLs.
Among the other changes to the KB, while PHP's urldecode() maps + to a
space, Django does not. Hence all the old URLs had + in place of %20.

This middleware checks the path for +s, and redirects with %20s if it
finds any. It doesn't touch the query string.
2010-10-28 11:50:00 -04:00
Erik Rose 1d71650444 [603808] Built out infrastructure for the Localization (and Contributor) Dashboards.
* Markup, CSS, templates, and queries for the Overview and Untranslated Articles localization summaries are in place, though there's still some optimization to do.
* Add a `number()` template function for localized thousands formatting, etc.
* Stub out Contributors Dash view just so we can reverse() to it.
* Add trivial tests. Perhaps horrific ones testing the accuracy of the queries will follow. Perhaps.
* To come: WebTrends integration and the rest of the dashboard readouts
2010-10-26 16:20:32 -07:00
Paul Craciunoiu 8f58c81bd8 [586478] New home page
Create a new home page at /home/ that pulls in editable content from
the wiki. Involves some tweaks to the wiki templates. Also add the rest
of the KB categories.

* Hard coded top side can be localized with gettext
* Not tested for IE
* Migration to create initial templates
* Inherits from wiki base template

As the new design propagates to the rest of the site, we need to make
the common/layout templates the base of both wiki and home page.
2010-10-25 12:11:47 -04:00
James Socol 4aa9140cea Say hello to KB discussion. [bug 602958]
Adds a `kbforums` app, which is a clone of the `forums` app with a few
tweaks:

* The top-level `Forum` model is replaced by `wiki.models.Document`.
* The permissions have been simplified. There are no per-document forum
  permissions.
* The `Document` does not track its `last_post`.
* `Post.author` has been renamed to `Post.creator` following our ad hoc
  standard.
* The ability to override `Post.created` and `Post.updated`, only used
  in the data migration, is gone.
* Moving threads is gone. This needs more thought, and moving to the
  `forums` app is non-trivial.
2010-10-20 10:50:18 -04:00
Paul Craciunoiu ffdc45bfd2 [604524] Image, Video and Template hooks fall back to English version.
* fall back if locale-specified version does not exist.
* return message if English version does not exist either.
* make wiki_to_html() and parse() receive and pass around locale
2010-10-15 14:51:26 -07:00
James Socol 3a929b1aa3 Server-side read-only implementation, thanks Jeff! [bug 570284] 2010-10-11 17:44:37 -04:00
Paul Craciunoiu e664ef5c3d [600747] Video hook and render with Flash fallback.
* Videos are identified by title and locale
* Depends on an update in py-wikimarkup which adds support for <video> and <source> tags (py-wikimarkup commit cc06e6d264622891b6b018e8670c9ef4bb12d618)
* Attaches all the _hook_*s to the WikiParser class, because they need a contextual locale.
* Adds locale support for any of the hooks that do document lookup.
* Uses SWFobject JS lib to support flash fallback for video.
* Adds a migration for unique ('locale', 'title') on gallery_video and gallery_image
* Adds a WIKI_VIDEO_WIDTH|HEIGHT constant that may be used as MAX_WIDTH|HEIGHT in the future, once we get video thumbnails.
2010-10-07 15:07:19 -07:00
Paul Craciunoiu a8816900ee Upgrade modernizr 1.1 -> 1.5 2010-10-07 14:48:16 -07:00
Ricky Rosario adfc4b746b * Refactored Marky for easier customization between the different apps
* Added Marky to wiki content textareas
* Added headings (H1, H2, H3) buttons to editor on wiki pages [bug 601693]
2010-10-07 17:31:52 -04:00
James Socol 559c348ec1 More handy updates to Sphinx tests, thanks to Dave. 2010-10-06 11:36:18 -04:00
James Socol 3af9ceacad Search view is returning results from the new KB. 2010-10-05 18:48:15 -04:00
Ricky Rosario f96d6f402a Removed empty gallery js bundle 2010-10-05 12:35:48 -04:00
James Socol bc4945311c Enable X-Frame-Options: DENY headers. 2010-10-01 11:13:24 -04:00
Erik Rose 2ab1e820da [573546] Wrap each request in a transaction. 2010-09-29 15:34:47 -07:00
Alex Buchanan 591d88614f Customer Care, when prompting for auth, remember which tweet a user is replying to 2010-09-29 12:25:51 +00:00
Ricky Rosario 8a85a71eb2 Added `ready for review` notification [bug 599022]
* Includes a change to the notifications app to allow watching a model (all instances), instead of just a single instance.
2010-09-28 17:46:59 -04:00
Alex Buchanan 1ad3f3567f Customer Care. Twitter OAuth and template fixes. 2010-09-27 15:59:31 -07:00