Use the default skin if a blog has a set but no-longer-available skin

Summary: I set one of my blogs to "phacility.com" based on `arc patch` and it now fatals since that's not a valid class anymore. :P Recover from these cases.

Test Plan: Viewed blog, no missing symbole exception.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3692
Make PhameBlogs respect policies

Summary:
Adds "can view" and "can edit" policies to blogs. Replaces "bloggers" with "can join".

This doesn't fully remove "bloggers" because I didn't want this to get too crazy/huge.

Test Plan: Created, edited, deleted blogs.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3693
Make posts 1:1 with blogs and implement policy controls

Summary:
This leaves the UI in a pretty rough state, but implements blog policy controls and queries, and 1:1 relationships between posts and blogs. Needs a bunch more cleanup but seemed like an okayish breaking point in terms of cohesiveness.

Posts have these rules:

  - Drafts are visible only to the author.
  - Published posts are visible to anyone who can see the blog they appear on.
  - Posts are only editable by the author.

...so we don't need any special policy UI or state to accommodate these rules.

Posts may have no blog if they're grandfathered in or you write a post to a blog and then lose the ability to see the blog. This is the messiest edge case -- specifically:

  - You write a post to blog A.
  - You publish the post.
  - I edit the "Visible To:" for blog A and set it to exclude you.

What we do in this case is let you see the post in "My Posts", but you can no longer see the blog and you'll see the post as not being part of a blog. We can maybe give you some UI to let you move it later or something.

Test Plan: Hit all (I think?) of the interfaces without issues. Definitely some UI problems still right now.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3694
Modernize blog UI

Summary:
Cleans up some of the mess I made in D3694. Basically:

  - All blogs have an "internal" view with posts that uses mobile-friendly UIs, etc., so we don't have to do as much work with skins -- they just have to look pretty.
  - Blogs now have a separate "live" view that we use to handle domains / skins.
  - Simplified some views and use IDs in some URLs for consistency.
  - Delete a bunch of edge/blogger/multi-blog code that's now obsolete.

Test Plan: Will attach screenshots.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3695
Modernize Phame post lists

Summary:
Use device UI for all post lists.

Left menu is a bit wonky but I'll clean that up shortly.

Test Plan: Will add screenshots.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3696
Mostly modernize post edit/detail UIs

Summary:
Still some big chunks left but this moves us a bit closer to getting everything device-ready.

Stuff not addressed here but which I'm planning to do soon:

  - Posts don't have a live URI yet.
  - Post detail pages don't actually show the post content. I'm going to tweak PhabricatorObjectPropertyListView for this since we need it some other places.
  - Some of the hinting about use/states is gone (e.g., "This post is a draft, publish it to make it live to the world."); I'm planning to restore it.
  - Left nav is still a bit of a mess with states/highlighting.

Major changes are:

  - If you click "New Post" you get a screen asking you to pick a blog to post to.
  - "Publish/Preview" and Unpublish are now separate actions from the post detail screen.
  - "Publish/Preview" renders a preview of the post in an iframe and gives you a "Publish" button.

Test Plan: Will attach screenshots.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3697
Allow PhabricatorPropertyListView to have associated content

Summary:
Some objects (like PhamePost and ManiphestTask) have a block of text/remarkup which serves as a description or core piece of content for the object.

Accommodate this in PhabricatorPropertyListView.

(This is primarily to let me do a reasonable first pass on this in Phame.)

Test Plan: Made example, will attach screenshot.

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3699
Show PhamePost and PhameBlog content/descriptions on detail pages

Summary: Currently the new detail pages don't show this information. Show it, and use the remarkup cache for BLAZING OODLES OF PERFOARMSNECES!!~~~

Test Plan: See screenshots.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3700
Raise a better error in Phame when trying to set two blogs to the same domain

Summary: Currently the exception escapes to top level. Instead, intercept it and complain.

Test Plan: Tried to set two blogs to the same domain.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3701
Allow Phame posts to be loaded by handle

Summary: Primarily, this makes flagging work on them.

Test Plan: Flagged / Unflagged a post.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3702
Improve Phame live blogs/posts

Summary: Make "View Live" work on Posts.

Test Plan: Clicked "View Live" on live/not-live posts/blogs.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3703
fix workflow to work with complicated content

Summary:
we were aggressively checking to make sure the event target was a workflow element. instead, just update the event target to the workflow element if necessary.

could probably just do this unconditionally as well.

Test Plan: D3705 works with this in place!

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3707
update celerity map again - i think i broke it
Improve various Phame UI things

Summary:
  - Clean up the menu selection states.
  - Nuke some unused code.
  - Show some more contextual error messages.
  - Improve/pht() some strings.

Test Plan: Looked at post/blog list, empty state of "new post".

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3706
Further improve various Phame UI things

Summary:
  - Better icons and action order.
  - "Move Post" action.
  - (Bugfix) Allow multiple blogs to be set to not having custom domains.
  - Make "Write Post" skip the "select a blog" step when coming from a blog view.
  - Sort blog list on "Write Post".
  - Show messages when a post is a draft or not on a blog.

Test Plan: Created posts, blogs, moved posts, preview/live'd posts, etc.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3708
Always use absolute URIs for static resources

Summary: I think this is simpler and better than making them conditional. In properly configured installs this should have no impact (they already use a CDN URI). In not-quite-properly configured installs this will add a trivial, highly-compressible number of bytes to the source. In all cases we have less code.

Test Plan: Loaded some pages, everything worked.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3709
Remove "admin page" color/styles

Summary: These haven't had any effect since the redesign, and we're moving to a more granular policy model so it probably doesn't make sense to ever restore them.

Test Plan: Grepped for "admin" and removed all relevant code.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3710
Separate "PhabricatorBarePageView" out of "PhabricatorStandardPageView"

Summary:
For Phame, we really want more than a chromeless page -- it shouldn't have Javelin or Phabricator styles on it.

Pull the bare infrastructure out of StandardPageView and make it available as BarePageView.

Test Plan: Viewed bare page in UIExamples, various non-bare pages.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3711
Fix a fatal in "create subtask"

Summary: This got clipped by the actor/email thing I think.

Test Plan: "Create Subtask" no longer fatals.

Reviewers: btrahan, vrana, hsb

Reviewed By: hsb

CC: aran, lesliepc16

Maniphest Tasks: T1918

Differential Revision: https://secure.phabricator.com/D3718
Restore a more surgical workflow/target check

Summary:
D3707 removed some overbroad rules for when we trigger workflows, but there is still one case we should check for -- an <a /> without workflow inside a <form /> with workflow. This occurs in, e.g., the "help" button in Remarkup.

If the node with workflow isn't a link, don't trigger workflow. This should allow the <a><img /></a> case to keep working properly.

Test Plan: Clicked "?" in remarkup bar.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3722