update dependencies to raxx extensions

update dependencies to raxx extensions

defmodule <%= @module %>.Mixfile do
  use Mix.Project

  def project do
    [
      app: :<%= @name %>,
      version: "0.1.0",
      elixir: "~> <%= System.version %>",
      elixirc_paths: elixirc_paths(Mix.env()),
      build_embedded: Mix.env == :prod,
      start_permanent: Mix.env == :prod,
      deps: deps(),
      aliases: aliases()
    ]<%= if @docker do %>
    |> Keyword.merge(custom_artifacts_directory_opts())<% end %>
  end

  def application do
    [extra_applications: [:logger], mod: {<%= @module %>.Application, []}]
  end

  defp elixirc_paths(:test), do: ["lib", "test/support"]
  defp elixirc_paths(_), do: ["lib"]

  defp deps do
    [
      {:ace, "~> 0.18.0"},
      # temporary while working on middleware branches
      {:raxx, "~> 0.17.5"},
      {:raxx_logger, github: "crowdhailer/raxx", branch: "logger-runtime", sparse: "extensions/raxx_logger"},
      {:raxx_static, github: "crowdhailer/raxx_static", branch: "runtime"},<%= if @exsync do %>
      {:exsync, "~> 0.2.3", only: :dev},<% end %><%= if @ecto do %>
      {:postgrex, ">= 0.0.0"},
      {:ecto_sql, "~> 3.0.0"}<% end %>
    ]
  end

  defp aliases() do
    [<%= if @ecto do %>
      test: ["ecto.create --quiet", "ecto.migrate", "test"]<% end %>
    ]
  end
<%= if @docker do %>
  # makes sure that if the project is run by docker-compose inside a container,
  # its artifacts won't pollute the host's project directory
  defp custom_artifacts_directory_opts() do
    case System.get_env("MIX_ARTIFACTS_DIRECTORY") do
      unset when unset in [nil, ""] ->
        []
      directory ->
        [
          build_path: Path.join(directory, "_build"),
          deps_path: Path.join(directory, "deps")
        ]
    end
  end<% end %>
end

defmodule <%= @module %>.Mixfile do
  use Mix.Project

  def project do
    [
      app: :<%= @name %>,
      version: "0.1.0",
      elixir: "~> <%= System.version %>",
      elixirc_paths: elixirc_paths(Mix.env()),
      build_embedded: Mix.env == :prod,
      start_permanent: Mix.env == :prod,
      deps: deps(),
      aliases: aliases()
    ]<%= if @docker do %>
    |> Keyword.merge(custom_artifacts_directory_opts())<% end %>
  end

  def application do
    [extra_applications: [:logger], mod: {<%= @module %>.Application, []}]
  end

  defp elixirc_paths(:test), do: ["lib", "test/support"]
  defp elixirc_paths(_), do: ["lib"]

  defp deps do
    [
      {:ace, "~> 0.18.0"},
      # temporary while working on middleware branches
      {:raxx, github: "crowdhailer/raxx", branch: "extract-logger", override: true},
      {:raxx_logger, github: "crowdhailer/raxx_kit", branch: "runtime-raxx-logger", sparse: "extensions/raxx_logger"},
      {:raxx_static, github: "crowdhailer/raxx_kit", branch: "runtime-static-middleware", sparse: "extensions/raxx_static"},<%= if @exsync do %>
      {:exsync, "~> 0.2.3", only: :dev},<% end %><%= if @ecto do %>
      {:postgrex, ">= 0.0.0"},
      {:ecto_sql, "~> 3.0.0"}<% end %>
    ]
  end

  defp aliases() do
    [<%= if @ecto do %>
      test: ["ecto.create --quiet", "ecto.migrate", "test"]<% end %>
    ]
  end
<%= if @docker do %>
  # makes sure that if the project is run by docker-compose inside a container,
  # its artifacts won't pollute the host's project directory
  defp custom_artifacts_directory_opts() do
    case System.get_env("MIX_ARTIFACTS_DIRECTORY") do
      unset when unset in [nil, ""] ->
        []
      directory ->
        [
          build_path: Path.join(directory, "_build"),
          deps_path: Path.join(directory, "deps")
        ]
    end
  end<% end %>
end


split text_item into verbatim_text and comment

document <- doctype? tags_list crlf* eof;

doctype <- space? 'doctype' space (!eol .)+ eol;

% TODO: We can parse nested structure like this:
% tags_list <- tag (crlf tag)*;
% tag <- verbatim_text / space? tag_item (crlf empty_lines:(crlf space?)* indent tags_list dedent)? / '' &.;
% Also remove dedent from eol definition and modify transforms accordingly
tags_list <- tag (crlf indent? empty_lines:(space? crlf indent?)* tag:tag dedent*)*;

% NOTE: Leading whitespace is handled separately for comments and verbatim text
tag <- comment / verbatim_text / space? tag_item / blank:(space? &eol);

tag_item <- (embedded_engine / inline_html / code / html_tag);

inline_html <- &'<' text_content;

code <- inline:('=' '='? tag_spaces? / '-') space? code:code_lines;
code_lines <- code_line / code_line_with_brake crlf (indent code_lines dedent / code_lines);
code_line <- (!(. eol) .)* !code_line_break . &eol;
code_line_with_brake <- (!(. eol) .)* code_line_break &eol;
code_line_break <-  ',' / '\\';

html_tag <- inline_tag / simple_tag;

inline_tag <- tag:tag_shortcut spaces:tag_spaces? ':' space children:(inline_tag / simple_tag);

simple_tag <- tag:tag_shortcut spaces:tag_spaces? space? attrs_with_content:attributes_with_content?;

attributes_with_content <- attributes space? simple_tag_content? / simple_tag_content_without_attrs;

simple_tag_content <- '/' / dynamic_content / text_content;

% NOTE: tag content can not begin from valid wrapped attributes bracket if attributes are not present
simple_tag_content_without_attrs <-
  !('<%= attr_list_delims |> Map.keys |> Enum.join("' / '") %>') simple_tag_content;

text_content <- dynamic:text_with_interpolation / simple:text;

dynamic_content <- '=' '='? space? (!eol .)+;

tag_spaces <- leading:'<'? trailing:'>'?;

tag_shortcut <- tag:tag_name attrs:shortcuts / tag:tag_name / attrs:shortcuts;

shortcuts <- head:shortcut tail:(shortcut)*;

shortcut <- type:('.' / '#' / '@' / '$' / '%' / '^' / '&' / '+' / '!') value:tag_name;

attributes <- wrapped_attributes / plain_attributes;

wrapped_attributes <-
  <%=
    attr_list_delims
    |> Enum.map(fn ({open, close}) -> "'#{open}' wrapped_attributes_list '#{close}'" end)
    |> Enum.join(" / ")
  %>;

wrapped_attributes_list <- head:wrapped_attribute tail:(space wrapped_attribute)*;

wrapped_attribute <- attribute:attribute / attribute_name:tag_name;

plain_attributes <- head:attribute tail:(space attribute)*;

attribute <- attribute_name '=' attribute_value;

attribute_value <- simple:string / dynamic:(string_with_interpolation / attribute_code);

string <- '"' ('\\' . / !('"' / '#') .)* '"';

% TODO: separate static and dynamic blocks
string_with_interpolation <- '"' (interpolation / '\\' . / !'"' .)* '"';

attribute_code <- (parentheses / brackets / braces / !(space / eol / ')' / ']' / '}') .)+;

text_with_interpolation <- (text interpolation)+ (!eol .)*;

text <- ('\\' . / !('#{' / eol) .)*;

parentheses <- '(' (parentheses / !')' .)* ')';
brackets <- '[' (brackets / !']' .)* ']';
braces <- '{' (braces / !'}' .)* '}';

interpolation <- '#{' (string / string_with_interpolation / !'}' .)* '}';

comment <- html_comment / space? ie_comment / space? code_comment;

html_comment <- indent:space? type:'/!' content:text_block;

ie_comment <- '/[' condition:(!']' .)+ ']' space? content:(!eol .)*;

code_comment <- '/' text_block;

verbatim_text <- indent:space? type:[|'] content:text_block;

text_block <- text_block_line (crlf
  indent lines:text_block_nested_lines dedent)?;
text_block_nested_lines <- text_block_line (crlf (
  indent text_block_nested_lines dedent / text_block_nested_lines
))*;
text_block_line <- space? (dynamic:text_with_interpolation / simple:text);

embedded_engine <- tag_name ':' (
  crlf indent lines:embedded_engine_lines dedent / empty:('' &eol)
);
embedded_engine_lines <- embedded_engine_line (crlf embedded_engine_lines)*;
embedded_engine_line <- text_with_interpolation / text / '';

tag_name <- [a-zA-Z0-9_-]+;
attribute_name <- [a-zA-Z0-9_@:-]+;
space <- [ \t]+;
indent <- '\x{0E}';
dedent <- '\x{0F}';
crlf <- '\r'? '\n';
eof <- !.;
eol <- dedent / crlf / eof;

document <- doctype? tags_list crlf* eof;

doctype <- space? 'doctype' space (!eol .)+ eol;

% TODO: We can parse nested structure like this:
% tags_list <- tag (crlf tag)*;
% tag <- verbatim_text / space? tag_item (crlf empty_lines:(crlf space?)* indent tags_list dedent)? / '' &.;
% Also remove dedent from eol definition and modify transforms accordingly
tags_list <- tag (crlf indent? empty_lines:(space? crlf indent?)* tag:tag dedent*)*;

% NOTE: Leading whitespace is handled separately for text items
tag <- text_item / space? tag_item / blank:(space? &eol);

tag_item <- (embedded_engine / inline_html / code / html_tag);

inline_html <- &'<' text_content;

code <- inline:('=' '='? tag_spaces? / '-') space? code:code_lines;
code_lines <- code_line / code_line_with_brake crlf (indent code_lines dedent / code_lines);
code_line <- (!(. eol) .)* !code_line_break . &eol;
code_line_with_brake <- (!(. eol) .)* code_line_break &eol;
code_line_break <-  ',' / '\\';

html_tag <- inline_tag / simple_tag;

inline_tag <- tag:tag_shortcut spaces:tag_spaces? ':' space children:(inline_tag / simple_tag);

simple_tag <- tag:tag_shortcut spaces:tag_spaces? space? attrs_with_content:attributes_with_content?;

attributes_with_content <- attributes space? simple_tag_content? / simple_tag_content_without_attrs;

simple_tag_content <- '/' / dynamic_content / text_content;

% NOTE: tag content can not begin from valid wrapped attributes bracket if attributes are not present
simple_tag_content_without_attrs <-
  !('<%= attr_list_delims |> Map.keys |> Enum.join("' / '") %>') simple_tag_content;

text_content <- dynamic:text_with_interpolation / simple:text;

dynamic_content <- '=' '='? space? (!eol .)+;

tag_spaces <- leading:'<'? trailing:'>'?;

tag_shortcut <- tag:tag_name attrs:shortcuts / tag:tag_name / attrs:shortcuts;

shortcuts <- head:shortcut tail:(shortcut)*;

shortcut <- type:('.' / '#' / '@' / '$' / '%' / '^' / '&' / '+' / '!') value:tag_name;

attributes <- wrapped_attributes / plain_attributes;

wrapped_attributes <-
  <%=
    attr_list_delims
    |> Enum.map(fn ({open, close}) -> "'#{open}' wrapped_attributes_list '#{close}'" end)
    |> Enum.join(" / ")
  %>;

wrapped_attributes_list <- head:wrapped_attribute tail:(space wrapped_attribute)*;

wrapped_attribute <- attribute:attribute / attribute_name:tag_name;

plain_attributes <- head:attribute tail:(space attribute)*;

attribute <- attribute_name '=' attribute_value;

attribute_value <- simple:string / dynamic:(string_with_interpolation / attribute_code);

string <- '"' ('\\' . / !('"' / '#') .)* '"';

% TODO: separate static and dynamic blocks
string_with_interpolation <- '"' (interpolation / '\\' . / !'"' .)* '"';

attribute_code <- (parentheses / brackets / braces / !(space / eol / ')' / ']' / '}') .)+;

text_with_interpolation <- (text interpolation)+ (!eol .)*;

text <- ('\\' . / !('#{' / eol) .)*;

parentheses <- '(' (parentheses / !')' .)* ')';
brackets <- '[' (brackets / !']' .)* ']';
braces <- '{' (braces / !'}' .)* '}';

interpolation <- '#{' (string / string_with_interpolation / !'}' .)* '}';

text_item <- verbatim_text / html_comment / space? ie_comment / space? code_comment;

verbatim_text <- indent:space? type:[|'] content:text_block;

html_comment <- indent:space? type:'/!' content:text_block;

ie_comment <- '/[' condition:(!']' .)+ ']' space? content:(!eol .)*;

code_comment <- '/' text_block;

text_block <- text_block_line (crlf
  indent lines:text_block_nested_lines dedent)?;
text_block_nested_lines <- text_block_line (crlf (
  indent text_block_nested_lines dedent / text_block_nested_lines
))*;
text_block_line <- space? (dynamic:text_with_interpolation / simple:text);

embedded_engine <- tag_name ':' (
  crlf indent lines:embedded_engine_lines dedent / empty:('' &eol)
);
embedded_engine_lines <- embedded_engine_line (crlf embedded_engine_lines)*;
embedded_engine_line <- text_with_interpolation / text / '';

tag_name <- [a-zA-Z0-9_-]+;
attribute_name <- [a-zA-Z0-9_@:-]+;
space <- [ \t]+;
indent <- '\x{0E}';
dedent <- '\x{0F}';
crlf <- '\r'? '\n';
eof <- !.;
eol <- dedent / crlf / eof;


Add dropdown menu.

Add dropdown menu.

<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Hello Phoenix!</title>
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/vendor.css") %>">

          <%= if logged_in?(@conn) do %>

                <%= current_user(@conn).name %>

トップページ

実験管理画面

<%= link "ログアウト", to: session_path(@conn, :delete) %>

          <% else %>

<%= link "新規登録", to: registration_path(@conn, :new) %>

<%= link "ログイン", to: session_path(@conn, :new) %>

          <% end %>

<%= get_flash(@conn, :info) %>

<%= get_flash(@conn, :error) %>

      <%= @inner %>

<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Hello Phoenix!</title>
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/vendor.css") %>">

          <%= if logged_in?(@conn) do %>

<%= current_user(@conn).name %>

<%= link "ログアウト", to: session_path(@conn, :delete) %>

          <% else %>

<%= link "新規登録", to: registration_path(@conn, :new) %>

<%= link "ログイン", to: session_path(@conn, :new) %>

          <% end %>

<%= get_flash(@conn, :info) %>

<%= get_flash(@conn, :error) %>

      <%= @inner %>


removes = from <%= else tag

removes = from <%= else tag

<%= if @snippet.language == "markdown" do %>
  <%= render BigSnips.PostView, "show_markdown.html", conn: @conn, snippet: @snippet %>
<% else %>
  <%= render BigSnips.PostView, "show_code.html", conn: @conn, snippet: @snippet %>
<% end %>

<%= if @snippet.language == "markdown" do %>
  <%= render BigSnips.PostView, "show_markdown.html", conn: @conn, snippet: @snippet %>
<%= else  %>
  <%= render BigSnips.PostView, "show_code.html", conn: @conn, snippet: @snippet %>
<% end %>


fix layout

fix layout

Register User

        <%= render Doom.SharedView, "flash.html", assigns %>
        <%= form_for @new_user, admin_user_path(@conn, :create), fn f -> %>

            <%= email_input f, :email, class: "form-control", required: "", placeholder: "Email" %>

            <%= text_input f, :password, class: "form-control",required: "", placeholder: "Password" %>

            <%= multiple_select f, :groups, @groups |> Enum.map(&({&1.name, &1.id})),
                selected: [] ,
                class: "form-control chosen-select",
                data: [placeholder: "Choose Group"],
                name: "group_ids[]" %>

                  <%= checkbox f, :role, class: "minimal-check", checked_value: "admin", unchecked_value: "user" %>  Admin

              <%= submit "Register", class: "btn btn-primary btn-block btn-flat"%>

        <% end %>