preferences

preferences

<%= @identity.username %>

<%= @identity.name %>

<a href="/identities/<%= @identity.id %>/delegations/from"><%= @num_delegations_from %> delegations from
  |
<a href="/identities/<%= @identity.id %>/delegations/to"><%= @num_delegations_to %> delegations to
  |
<a href="/identities/<%= @identity.id %>/votes"><%= @num_votes %> votes

<%= unless @is_in_trust_metric do %>

NOT IN TRUST METRIC

<% end %>

<%= if @is_me do %>

Your preferences

	<form method="POST" action="preferences" class="pure-form" style="margin-top: -15px;">
		<input type="hidden" name="_csrf_token" value="<%= get_csrf_token() %>" />

Trust metric URL

			<input type="text" name="trust_metric_url" style="max-width: 500px;" value="<%= @calculation_opts.trust_metric_url %>" />

Minimum voting power

			<input type="text" name="minimum_voting_power" style="max-width: 250px;" value="<%= @calculation_opts.minimum_voting_power %>" />

Minimum approval score

			<input type="text" name="minimum_reference_approval_score" style="max-width: 250px;" value="<%= @calculation_opts.minimum_reference_approval_score %>" />

Number of artificial votes with score 0 in approval polls

			<input type="text" name="soft_quorum_t" style="max-width: 250px;" value="<%= @calculation_opts.soft_quorum_t %>" />

Number of days for vote weight to halve

			<input type="text" name="vote_weight_halving_days" style="max-width: 250px;" value="<%= @calculation_opts.vote_weight_halving_days %>" placeholder="Never" />

		<button type="submit" class="pure-button pure-button-primary">Update preferences</button>
	</form>
<% else %>

Do you trust this identity? Learn more

	<%= render Liquio.HtmlPollView, "cast_vote.html",
		to_path: "/identities/#{@identity.id}",
		poll: %{:id => @identity.trust_metric_poll_id, :choice_type => "probability"},
		own_vote: @own_is_human_vote,
		allow_numeric: false
	%>

Delegation to this identity

	<form method="POST" action="/identities/<%= @identity.id %>/delegations" class="pure-form" style="margin-top: -15px;">
		<input type="hidden" name="_csrf_token" value="<%= get_csrf_token() %>" />

Relative weight

			<input type="text" name="weight" style="max-width: 150px;"<%= if @delegation do %> value="<%= number_format_simple @delegation.data.weight %>"<% end %> placeholder="1" />

Topics (separated by comma)

			<input type="text" name="topics" style="max-width: 400px;"<%= if @delegation != nil and @delegation.data.topics != nil do %> value="<%= @delegation.data.topics |> Enum.join(", ") %>"<% end %> placeholder="All topics" />

		<%= if @delegation do %>
			<button type="submit" class="pure-button pure-button-primary">Update delegation</button>
			<button type="submit" name="weight" value="0" class="pure-button delete-button">Remove delegation</button>
		<% else %>
			<button type="submit" class="pure-button pure-button-primary">Set delegation</button>
		<% end %>
	</form>
<% end %>

<%= @identity.username %>

<%= @identity.name %>

<a href="/identities/<%= @identity.id %>/delegations/from"><%= @num_delegations_from %> delegations from
  |
<a href="/identities/<%= @identity.id %>/delegations/to"><%= @num_delegations_to %> delegations to
  |
<a href="/identities/<%= @identity.id %>/votes"><%= @num_votes %> votes

<%= unless @is_in_trust_metric do %>

NOT IN TRUST METRIC

<% end %>

<%= if @is_me do %>

Your preferences

	<form method="POST" action="preferences" class="pure-form" style="margin-top: -15px;">
		<input type="hidden" name="_csrf_token" value="<%= get_csrf_token() %>" />

Trust metric URL

			<input type="text" name="trust_metric_url" style="max-width: 500px;" value="<%= @calculation_opts.trust_metric_url %>" />

Minimum voting power

			<input type="text" name="minimum_voting_power" style="max-width: 250px;" value="<%= @calculation_opts.minimum_voting_power %>" />

Minimum approval score

			<input type="text" name="minimum_reference_approval_score" style="max-width: 250px;" value="<%= @calculation_opts.minimum_reference_approval_score %>" />

Number of artificial votes with score 0 in approval polls

			<input type="text" name="soft_quorum_t" style="max-width: 250px;" value="<%= @calculation_opts.soft_quorum_t %>" />

Number of days for vote weight to halve

			<input type="text" name="vote_weight_halving_days" style="max-width: 250px;" value="<%= @calculation_opts.vote_weight_halving_days %>" />

		<button type="submit" class="pure-button pure-button-primary">Update preferences</button>
	</form>
<% else %>

Do you trust this identity? Learn more

	<%= render Liquio.HtmlPollView, "cast_vote.html",
		to_path: "/identities/#{@identity.id}",
		poll: %{:id => @identity.trust_metric_poll_id, :choice_type => "probability"},
		own_vote: @own_is_human_vote,
		allow_numeric: false
	%>

Delegation to this identity

	<form method="POST" action="/identities/<%= @identity.id %>/delegations" class="pure-form" style="margin-top: -15px;">
		<input type="hidden" name="_csrf_token" value="<%= get_csrf_token() %>" />

Relative weight

			<input type="text" name="weight" style="max-width: 150px;"<%= if @delegation do %> value="<%= number_format_simple @delegation.data.weight %>"<% end %> placeholder="1" />

Topics (separated by comma)

			<input type="text" name="topics" style="max-width: 400px;"<%= if @delegation != nil and @delegation.data.topics != nil do %> value="<%= @delegation.data.topics |> Enum.join(", ") %>"<% end %> placeholder="All topics" />

		<%= if @delegation do %>
			<button type="submit" class="pure-button pure-button-primary">Update delegation</button>
			<button type="submit" name="weight" value="0" class="pure-button delete-button">Remove delegation</button>
		<% else %>
			<button type="submit" class="pure-button pure-button-primary">Set delegation</button>
		<% end %>
	</form>
<% end %>


Add tweet hint in post-title

Add tweet hint in post-title

<div class="post <%= @css_class %>">

    <div class="image" style="background-image: url(<%= raw "/avatar/github/#{@current_user_name}" %>)">

  <%= form_for @changeset, @action, fn f -> %>
    <%= text_input f, :title, id: "posting_title", class: class_with_error(f, :title, "post-title"), placeholder: "Title goes here (will be tweeted by @elixirstatus)" %>

      Today

        by
        <a href="https://github.com/<%= raw @current_user_name %>" target="_blank">@<%= raw @current_user_name %>

    <%= textarea f, :text, id: "posting_text", class: class_with_error(f, :text, "post-body"), placeholder: "Text should describe what you made in prose. Don't forget to link to your project/blog post!" %>

        Use Markdown (formatting help).

          <a href="#" class="btn btn-preview" data-preview-url="<%= preview_posting_path(@conn, :preview) %>">Preview
          <%= submit "Post this", class: "btn btn-primary" %>

          What you type
          What you get

        <%= for term <- ["[Link](https://github.com/)", "**bold**", "*italics*", "***highlight***", "`inline code`", "Indent with four spaces to render code blocks:\n\n    # This is rendered as a\n    # code block."] do %>

<%= raw term%>

            <%= sanitized_inline_markdown(term) %>

        <% end %>

  <% end %>

  <%= if @editing? do %>

    <%= link "Delete this posting", to: posting_path(@conn, :delete, @posting), method: :delete, class: "btn btn-danger" %>
  <% end %>

<div class="post <%= @css_class %>">

    <div class="image" style="background-image: url(<%= raw "/avatar/github/#{@current_user_name}" %>)">

  <%= form_for @changeset, @action, fn f -> %>
    <%= text_input f, :title, id: "posting_title", class: class_with_error(f, :title, "post-title"), placeholder: "Title goes here" %>

      Today

        by
        <a href="https://github.com/<%= raw @current_user_name %>" target="_blank">@<%= raw @current_user_name %>

    <%= textarea f, :text, id: "posting_text", class: class_with_error(f, :text, "post-body"), placeholder: "Text should describe what you made in prose. Don't forget to link to your project/blog post!" %>

        Use Markdown (formatting help).

          <a href="#" class="btn btn-preview" data-preview-url="<%= preview_posting_path(@conn, :preview) %>">Preview
          <%= submit "Post this", class: "btn btn-primary" %>

          What you type
          What you get

        <%= for term <- ["[Link](https://github.com/)", "**bold**", "*italics*", "***highlight***", "`inline code`", "Indent with four spaces to render code blocks:\n\n    # This is rendered as a\n    # code block."] do %>

<%= raw term%>

            <%= sanitized_inline_markdown(term) %>

        <% end %>

  <% end %>

  <%= if @editing? do %>

    <%= link "Delete this posting", to: posting_path(@conn, :delete, @posting), method: :delete, class: "btn btn-danger" %>
  <% end %>


Add missing variable to tracking code

Add missing variable to tracking code


Update app layout title tag

Update app layout title tag

<!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>Who Speaks for Us?</title>
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">

Get Started

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

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

        <%= render @view_module, @view_template, assigns %>

<!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 Who!</title>
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">

Get Started

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

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

        <%= render @view_module, @view_template, assigns %>


Text update

Text update


Add data privacy link

Add data privacy link

      ElixirStatus lets you publish links back to stuff you created: new projects, blog posts or version updates.

      It is an open source project, built by community members
     with Elixir+Phoenix.

      Please contact René Föhring (@rrrene) or create an issue if anything seems broken or worthy of improvement.

      <%= if logged_in?(@conn) do %>
        Sign out
      <% else %>
        Sign in with GitHub
      <% end %>
      |
      Contact
      |
      Imprint
      |
      Data privacy
      |
      Blog

      ElixirStatus lets you publish links back to stuff you created: new projects, blog posts or version updates.

      It is an open source project, built by community members
     with Elixir+Phoenix.

      Please contact René Föhring (@rrrene) or create an issue if anything seems broken or worthy of improvement.

      <%= if logged_in?(@conn) do %>
        Sign out
      <% else %>
        Sign in with GitHub
      <% end %>
      |
      Contact
      |
      Imprint
      |
      Blog


Update sponsor link

Update sponsor link

Montreal's community for Elixir, a dynamic, functional language designed for building scalable and maintainable applications.

              <%= if @next_meetup do %>

<%= next_or_most_recent_event(@next_meetup.utc_datetime) %>

                  <%= @next_meetup.name %>

                  <%= format_montreal_time(@next_meetup.utc_datetime) %>

                  <%= @next_meetup.venue_name %>

                  <%= @next_meetup.venue_address %>

                <a href="<%= @next_meetup.url %>" class="btn">Register Now
              <% end %>

Recent Tweets

View more on Twitter

New Videos

            <%= for video <- @new_videos do %>

                <a href="<%= video.url %>" target="_blank">
                  <img src="<%= video.img_url %>">

                <%= video.title %>

                <%= human_date(video.published_at) %>

            <% end %>

View more on YouTube

Community

Become a member

Come to a meetup

Prepare and present a talk

Watch our meetup presentations

Sponsor an event

Resources

View the community playbook

Follow us on Twitter

Contribute to this website

Get help from community members on Slack (#montrealelixir)

Current Sponsors

CivilCode Inc. - Custom Software Development

Mirego

Past Event Sponsors

SweetIQ

Shopify

Montreal's community for Elixir, a dynamic, functional language designed for building scalable and maintainable applications.

              <%= if @next_meetup do %>

<%= next_or_most_recent_event(@next_meetup.utc_datetime) %>

                  <%= @next_meetup.name %>

                  <%= format_montreal_time(@next_meetup.utc_datetime) %>

                  <%= @next_meetup.venue_name %>

                  <%= @next_meetup.venue_address %>

                <a href="<%= @next_meetup.url %>" class="btn">Register Now
              <% end %>

Recent Tweets

View more on Twitter

New Videos

            <%= for video <- @new_videos do %>

                <a href="<%= video.url %>" target="_blank">
                  <img src="<%= video.img_url %>">

                <%= video.title %>

                <%= human_date(video.published_at) %>

            <% end %>

View more on YouTube

Community

Become a member

Come to a meetup

Prepare and present a talk

Watch our meetup presentations

Sponsor an event

Resources

View the community playbook

Follow us on Twitter

Contribute to this website

Get help from community members on Slack (#montrealelixir)

Current Sponsors

CivilCode Inc.

Mirego

Past Event Sponsors

SweetIQ

Shopify


contracts i18n

contracts i18n

 <%= gettext "Contracts" %>

          <%= for transaction <- @contracts do %>

              <a class="link" href="<%=transaction_path(@conn, :index, transaction.txid )%>">
                <%=transaction.txid%>

          <%end%>

 Contracts

          <%= for transaction <- @contracts do %>

              <a class="link" href="<%=transaction_path(@conn, :index, transaction.txid )%>">
                <%=transaction.txid%>

          <%end%>


Created new volunteer show page

Created new volunteer show page

          <%= Enum.join([ @volunteer.name, @volunteer.family_name ], " ") %>

        <%= if @conn.assigns.current_user.role == "Coordinator" do %>

            <%= link "Edit", to: teacher_path(@conn, :edit, @volunteer),
                             class: "mdl-button mdl-js-button mdl-button--raised"
            %>

        <% end %>

        <%= CoursePlanner.SharedView.card do %>
          <%= CoursePlanner.SharedView.card_content vpadding: true do %>

                <img
                  src="<%= CoursePlanner.SharedView.get_gravatar_url(@volunteer.email, 500) %>"
                  class="profile-picture"
                >

Name

                    <%= @volunteer.name %> <%= @volunteer.family_name %>

E-mail

                    <%= @volunteer.email %>

Phone Number

                    <%= @volunteer.phone_number %>

          <% end %>
        <% end %>

Show volunteer

     Full name:
    <%= @volunteer.name %>

     Nickname:
    <%= @volunteer.nickname %>

     Email:
    <%= @volunteer.email %>

     Phone Number:
    <%= @volunteer.phone_number %>

<%= link "Edit", to: volunteer_path(@conn, :edit, @volunteer) %>
<%= link "Back", to: volunteer_path(@conn, :index) %>


Remove Hire me link

Remove Hire me link

<!DOCTYPE html>
<html lang="<%= locale %>">

    <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="<%= gettext "Play memory/concentration game with friends over the Internet without registration" %>">
    <meta name="author" content="Max Gorin">
    <meta content='/images/landing.jpg' property='og:image'>
    <title><%= gettext "Registration-free multiplayer Memory game" %></title>
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">
    <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto">

      <%= if assigns[:mini_header] do %>

            <%= link to: "/" do %>

              Pairs One
            <% end %>

          <%= if assigns[:show_new_link] do %>

              <%= link gettext("New game"), to: game_path(@conn, :new), class: "btn btn-default" %>

          <% end %>

      <% else %>

            <%= link to: "/" do %>

              Pairs One
            <% end %>
             <%= gettext "Registration-free multiplayer Memory game" %>

      <% end %>

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

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

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

          <%= render @view_module, @view_template, assigns %>

          <select name="language" id="language" onchange="">
            <%= for {code, name} <- lang_select_options do %>
              <option value="<%= code %>" <%= if locale == code do "selected" end %>><%= name %></option>
            <% end %>
          </select>

          © <%= DateTime.utc_now.year %>
          <%= link "Max Gorin", to: "https://twitter.com/mxgrn" %>
          <%= link to: "https://github.com/mxgrn/pairs.one" do %>

            <%= gettext "Source code" %>
          <% end %>

    <%= unless @conn.host == "localhost" do %>
      <%= render "ga.html" %>
    <% end %>

<!DOCTYPE html>
<html lang="<%= locale %>">

    <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="<%= gettext "Play memory/concentration game with friends over the Internet without registration" %>">
    <meta name="author" content="Max Gorin">
    <meta content='/images/landing.jpg' property='og:image'>
    <title><%= gettext "Registration-free multiplayer Memory game" %></title>
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">
    <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto">

      <%= if assigns[:mini_header] do %>

            <%= link to: "/" do %>

              Pairs One
            <% end %>

          <%= if assigns[:show_new_link] do %>

              <%= link gettext("New game"), to: game_path(@conn, :new), class: "btn btn-default" %>

          <% end %>

      <% else %>

            <%= link to: "/" do %>

              Pairs One
            <% end %>
             <%= gettext "Registration-free multiplayer Memory game" %>

      <% end %>

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

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

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

          <%= render @view_module, @view_template, assigns %>

          <select name="language" id="language" onchange="">
            <%= for {code, name} <- lang_select_options do %>
              <option value="<%= code %>" <%= if locale == code do "selected" end %>><%= name %></option>
            <% end %>
          </select>

          © <%= DateTime.utc_now.year %>
          <%= link "Max Gorin", to: "https://twitter.com/mxgrn" %>

            <%= gettext "Hire me" %>

          <%= link to: "https://github.com/mxgrn/pairs.one" do %>

            <%= gettext "Source code" %>
          <% end %>

    <%= unless @conn.host == "localhost" do %>
      <%= render "ga.html" %>
    <% end %>


Text improvements.

Text improvements.

<%= render Vutuv.LayoutView, "flash.html", assigns %>

vutuv is more than just a career network:
Securely share whatever you want with whomever you want.

It's a little bit like LinkedIn but fast and free. And we will not flood your inbox with senseless e-mails. Bonus: It's open-source.

    <%= form_for @changeset, user_path(@conn, :create), [multipart: true, class: "imagebox__form"], fn f -> %>
      <%= if @changeset.action do %>

<%= gettext "Oops, something went wrong! Please check the errors below." %>

      <% end %>

Get started now. It only takes 30 seconds.

      <%= text_input f, :first_name, class: "imagebox__input", placeholder: "Enter your first name", autofocus: true %>
      <%= error_tag f, :first_name %>
      <%= text_input f, :last_name, class: "imagebox__input", placeholder: "Enter your last name" %>
      <%= error_tag f, :last_name %>
      <%= inputs_for f, :emails, fn ef -> %>
        <%= text_input ef, :value, class: "imagebox__input", placeholder: "Enter your email address" %>
        <%= error_tag ef, :value %>
      <% end %>
      <%= submit gettext("Sign up now"), class: "imagebox__input" %>
      <a href="<%= session_path(@conn, :new) %>" class="imagebox__alreadymember">Already a member? Sign in here.
    <% end %>

<%= render Vutuv.LayoutView, "flash.html", assigns %>

vutuv is more than just a career network:
Securly share whatever you want with whomever you want.

It's a little bit like LinkedIn but fast and free. And we will not flood your inbox with senseless e-mails. Bonus: It's open-source.

    <%= form_for @changeset, user_path(@conn, :create), [multipart: true, class: "imagebox__form"], fn f -> %>
      <%= if @changeset.action do %>

<%= gettext "Oops, something went wrong! Please check the errors below." %>

      <% end %>

Get started now. It only takes 30 seconds.

      <%= text_input f, :first_name, class: "imagebox__input", placeholder: "Type your first name", autofocus: true %>
      <%= error_tag f, :first_name %>
      <%= text_input f, :last_name, class: "imagebox__input", placeholder: "Enter your last name" %>
      <%= error_tag f, :last_name %>
      <%= inputs_for f, :emails, fn ef -> %>
        <%= text_input ef, :value, class: "imagebox__input", placeholder: "Enter your email" %>
        <%= error_tag ef, :value %>
      <% end %>
      <%= submit gettext("Sign up now"), class: "imagebox__input" %>
      <a href="<%= session_path(@conn, :new) %>" class="imagebox__alreadymember">Already a member? Sign in here.
    <% end %>


Commit changes to index.html.eex

Commit changes to index.html.eex

File was mistakenly not added to commit 22e3c6f

<%# header tag begins in parent template %>

<%= full_name(@user) %>'s Skills

<%= render Vutuv.LayoutView, "flash.html", assigns %>

  <%= gen_breadcrumbs([
    gettext("Users"),
    {full_name(@user), user_path(@conn, :show, @user)},
    gettext("Skills")]) %>

Skills

          <%= gettext "Skill name" %>

        <%= for user_skill <- @user_skills do %>

<%= link Vutuv.Skill.resolve_name(user_skill.skill_id), to: user_user_skill_path(@conn, :show, @user, user_skill) %>

          <%= if @current_user && same_user?(@user, @current_user) do %>
          <%= button to: user_user_skill_path(@conn, :delete, @user, user_skill), method: :delete, class: "delete button button--icon button--small", style: "height:25px;margin-right:-5px;", form: [class: "button button--icon button--small"] do %>

          <% end %>
          <% end %>

        <% end %>

    <%= if same_user?(@user, @current_user) do %>
      <%= link gettext("Add"), to: user_user_skill_path(@conn, :new, @current_user), class: "card__morelink" %>
    <% end %>

    <%= render Vutuv.SharedView, "_ad.html" %>

<%# header tag begins in parent template %>

<%= full_name(@user) %>'s Skills

<%= render Vutuv.LayoutView, "flash.html", assigns %>

  <%= gen_breadcrumbs([
    gettext("Users"),
    {full_name(@user), user_path(@conn, :show, @user)},
    gettext("Skills")]) %>

Skills

    <%= render "card_list.html", assigns %>

    <%= if same_user?(@user, @current_user) do %>
      <%= link gettext("Add"), to: user_user_skill_path(@conn, :new, @current_user), class: "card__morelink" %>
    <% end %>

    <%= render Vutuv.SharedView, "_ad.html" %>


fix issue with empty show help desk widget field

<div style="padding: 40px;">
  <%= raw(@content) %>

  <%= if assigns[:show_help_desk_widget] != nil and assigns[:show_help_desk_widget] == "Show" do %>
    <!-- Start of justicedemocrats Zendesk Widget script -->
    <script>/*<![CDATA[*/window.zEmbed||function(e,t){var n,o,d,i,s,a=[],r=document.createElement("iframe");window.zEmbed=function(){a.push(arguments)},window.zE=window.zE||window.zEmbed,r.src="javascript:false",r.title="",r.role="presentation",(r.frameElement||r).style.cssText="display: none",d=document.getElementsByTagName("script"),d=d[d.length-1],d.parentNode.insertBefore(r,d),i=r.contentWindow,s=i.document;try{o=s}catch(e){n=document.domain,r.src='javascript:var d=document.open();d.domain="'+n+'";void(0);',o=s}o.open()._l=function(){var e=this.createElement("script");n&&(this.domain=n),e.id="js-iframe-async",e.src="https://assets.zendesk.com/embeddable_framework/main.js",this.t=+new Date,this.zendeskHost="justicedemocrats.zendesk.com",this.zEQueue=a,this.body.appendChild(e)},o.write('<body onload="document._l();">'),o.close()}();
    /*]]>*/</script>
    <!-- End of justicedemocrats Zendesk Widget script -->
  <% end %>
</div>

<script>

  function show (el) {
    el.style.display = 'block';
  }

  function hide (el) {
    el.style.display = 'none';
  }

  function toggle (el) {
    if (el.style.display == 'none') {
      el.style.display = 'block';
    } else {
      el.style.display = 'none';
    }
  }

  function showHiddenContent (ev) {
    var el = document.querySelector('#vol-events');
    var action = el.getAttribute('data-action');

    if (action == 'show') {
      show(el)
    } else if (action == 'hide') {
      hide(el)
    } else {
      toggle(el)
    }
  }

  var buttons = Array.from(document.querySelectorAll('.show-events'));

  buttons.forEach(function (button) {
    button.addEventListener('click', showHiddenContent);
  })

</script>

<div style="padding: 40px;">
  <%= raw(@content) %>

  <%= if assigns[:show_help_desk_widget] and assigns[:show_help_desk_widget] == "Show" do %>
    <!-- Start of justicedemocrats Zendesk Widget script -->
    <script>/*<![CDATA[*/window.zEmbed||function(e,t){var n,o,d,i,s,a=[],r=document.createElement("iframe");window.zEmbed=function(){a.push(arguments)},window.zE=window.zE||window.zEmbed,r.src="javascript:false",r.title="",r.role="presentation",(r.frameElement||r).style.cssText="display: none",d=document.getElementsByTagName("script"),d=d[d.length-1],d.parentNode.insertBefore(r,d),i=r.contentWindow,s=i.document;try{o=s}catch(e){n=document.domain,r.src='javascript:var d=document.open();d.domain="'+n+'";void(0);',o=s}o.open()._l=function(){var e=this.createElement("script");n&&(this.domain=n),e.id="js-iframe-async",e.src="https://assets.zendesk.com/embeddable_framework/main.js",this.t=+new Date,this.zendeskHost="justicedemocrats.zendesk.com",this.zEQueue=a,this.body.appendChild(e)},o.write('<body onload="document._l();">'),o.close()}();
    /*]]>*/</script>
    <!-- End of justicedemocrats Zendesk Widget script -->
  <% end %>
</div>

<script>

  function show (el) {
    el.style.display = 'block';
  }

  function hide (el) {
    el.style.display = 'none';
  }

  function toggle (el) {
    if (el.style.display == 'none') {
      el.style.display = 'block';
    } else {
      el.style.display = 'none';
    }
  }

  function showHiddenContent (ev) {
    var el = document.querySelector('#vol-events');
    var action = el.getAttribute('data-action');

    if (action == 'show') {
      show(el)
    } else if (action == 'hide') {
      hide(el)
    } else {
      toggle(el)
    }
  }

  var buttons = Array.from(document.querySelectorAll('.show-events'));

  buttons.forEach(function (button) {
    button.addEventListener('click', showHiddenContent);
  })

</script>


Wrapped Farm Edit page in a row div

Wrapped Farm Edit page in a row div

Edit Farm

      Name
      <input type="text" class="form-control" id="farm-name" />

Location

      Where will you locate your farm?  You can search for a location,
      enter the latitude & longitude manully, or drag the map marker to
      the location you want.  This is where your farm's virtual farmhouse
      and equipment shed will be located.

          Latitude
          <input type="text" class="form-control" id="farm-latitude" />

          Longitude
          <input type="text" class="form-control" id="farm-longitude" />

        <button id="location-capture" role="button" class="btn btn-default">

          Use Device Location
        </button>

          <input type="text" class="form-control" id="location-address" placeholder="search by farm address" />

            <button id="location-search" type="button" class="btn btn-default">

            </button>

Fields

      Where are the fields you will use to grow crops?  Mark the
      boundaries of your fields below by clicking on the map, or
      by walking the borders of your field's real-world location
      with a mobile device, or by manually entering the latitude
      and longitude of points along the border.

Description

      Description
      <textarea class="form-control" rows="3" id="farm-description" ></textarea>

Save

Just click the button below to save your new farm!

      <button id="farm-save" class="btn btn-lg">

        Save
      </button>


reversed

reversed

Top 5 liked Podcasts

  <% last_count = 0 %>
    <%= for {[count, id, title], rank} <- Enum.with_index(@liked_podcasts) do %>

        <%= if count != last_count do %>
          <%= rank + 1 %>.:
        <% else %>

        <% end %>
        <%= link [fa_icon("podcast"), " ", truncate(title, 50)],
                 to: podcast_frontend_path(@conn, :show, id),
                 class: "btn btn-default btn-xs",
                 style: "color: #000" %>
        <%= count %> <%= fa_icon("user") %>
        <% last_count = count %>

    <% end %>

Top 5 liked Podcasts

  <% last_count = 0 %>
    <%= for {[count, id, title], rank} <- Enum.with_index(@liked_podcasts), last_count <- last_count do %>

        <%= if count != last_count do %>
          <%= rank + 1 %>.:
        <% else %>

        <% end %>
        <%= link [fa_icon("podcast"), " ", truncate(title, 50)],
                 to: podcast_frontend_path(@conn, :show, id),
                 class: "btn btn-default btn-xs",
                 style: "color: #000" %>
        <%= count %> <%= fa_icon("user") %>
        <% last_count = count %>

    <% end %>


experimental new posts template: iteration 2

  <%= for post <- @posts do %>

  <% img_src = hd(post.json_metadata["image"] || post.json_metadata["images"] || ["/images/"<> @conn.assigns.default_post_image] ) %>

        <a href="/authors/<%= post.author %>/<%= post.permlink %>">

          <img src="<%= img_src %>">

          <a class="header" href="/authors/<%= post.author %>/<%= post.permlink %>"><%= post.title %>

            <span class="author" href="/authors/<%= post.author %>">

               @<%= post.author  %>

              <%= hd(String.split(NaiveDateTime.to_string(post.created))) %>

            <%= format_excerpt(post) %>...

            <%= for tag <- post.tags do %>
            <a class="ui label" href="/tags/<%=tag%>">
              <%= format_tag(tag, post.blockchain) %>

            <% end %>

  <% end %>

    <%= for {v, i} <- generate_pagination_list(@current_page) do %>

    <a class="<%=if v == @current_page, do: "active" %> item"
      href="<%= @conn.request_path <> "?" <> URI.encode_query(%{"page"=> v}) %>">
      <%= v %>

    <% end %>

  <%= for post <- @posts do %>

  <% img_src = hd(post.json_metadata["image"] || post.json_metadata["images"] || ["/images/"<> @conn.assigns.default_post_image] ) %>

        <a href="/authors/<%= post.author %>/<%= post.permlink %>">

          <img src="<%= img_src %>">

        <a class="ui large blue ribbon label" href="/authors/<%= post.author %>">  @<%= post.author  %>

      <a class="ui huge header" href="/authors/<%= post.author %>/<%= post.permlink %>"> <%= post.title %>
      <%= hd(String.split(NaiveDateTime.to_string(post.created))) %>

        <%= format_excerpt(post) %>...

        <%= for tag <- post.tags do %>
        <a class="ui label" href="/tags/<%=tag%>">
          <%= format_tag(tag, post.blockchain) %>

        <% end %>

 <%=  %>

  <% end %>

    <%= for {v, i} <- generate_pagination_list(@current_page) do %>

    <a class="<%=if v == @current_page, do: "active" %> item"
      href="<%= @conn.request_path <> "?" <> URI.encode_query(%{"page"=> v}) %>">
      <%= v %>

    <% end %>


Allow output capturing

Allow output capturing

#!/usr/bin/env bash

# This is meant to be executed periodically. It will check if the application is
# running. If it's not, it will start it.

# on crontab:
#    * * * * * /bin/bash -l -c '/path/to/watchdog/watchdog.sh'

app="<%= app %>"
user="<%= user %>"
dir="/home/$user/$app/current"
log="$dir/log/$app.log"
touch $log # ensure existence

# test proof of life
alive="$dir/tmp/alive"
if [ -f $alive ]; then
  mtime=$(ls -l --time-style=+%s $alive | awk '{print $6}')
  let "last = $(date +%s) - 60"
  [ $mtime -gt $last ] && exit
fi
touch $alive # ensure existence

# start in an erlang VM
cmd="erl -boot $dir/boot/start -config $dir/boot/sys -env ERL_LIBS $dir/lib"
cmd="$cmd -name $app@localhost -noshell"

echo "$(date) Running: $cmd" >> $log

$cmd 2>&1 >> $log &

########################################
#
#     Some ways to run your app:
#
#     To run (embedded erlang):
#     ```
#         run_erl -daemon /home/$user/$app/pipes/ /home/$user/$app/log
#           "erl -boot $dir/boot/start
#                -config $dir/boot/sys
#                -env ERL_LIBS $dir/lib
#                -sname $app"
#     ```
#
#     To connect (embedded erlang):
#     ```
#         to_erl /home/$user/$app/pipes/erlang.pipe.1
#     ```
#
#     To run (interactive erlang):
#     ```
#         erl -boot $dir/boot/start
#             -config $dir/boot/sys
#             -env ERL_LIBS $dir/lib
#             -name $app@localhost
#     ```
#
#     To run (interactive elixir, using app's own `iex`):
#     ```
#         erl -boot $dir/boot/start
#             -config $dir/boot/sys
#             -env ERL_LIBS $dir/lib
#             -name $app@localhost
#             -noshell -user Elixir.IEx.CLI -extra --no-halt
#     ```
#
#     To run (detached elixir):
#     ```
#         iex --erl "-boot $dir/boot/start
#                    -config $dir/boot/sys
#                    -env ERL_LIBS $dir/lib"
#             --name $app@localhost
#             --detached
#     ```
#
#     To run (detached erlang):
#     ```
#         erl -boot $dir/boot/start
#             -config $dir/boot/sys
#             -env ERL_LIBS $dir/lib
#             -name $app@localhost
#             -detached
#     ```
#
#     To connect (interactive elixir):
#     ```
#         iex --remsh $app@localhost --sname connector
#     ```
#
#     To connect (interactive erlang):
#     ```
#         erl -remsh $app@localhost -sname connector
#     ```
#
#     To connect (interactive elixir, using app's own `iex`):
#     ```
#         erl -remsh $app@localhost -sname connector
#         # and then ...
#         ($app@localhost)1> 'Elixir.IEx':start().
#     ```
#

#!/usr/bin/env bash

# This is meant to be executed periodically. It will check if the application is
# running. If it's not, it will start it.

# on crontab:
#    * * * * * /bin/bash -l -c '/path/to/watchdog/watchdog.sh'

app="<%= app %>"
user="<%= user %>"
dir="/home/$user/$app/current"
log="$dir/log/$app.log"
touch $log # ensure existence

# test proof of life
alive="$dir/tmp/alive"
if [ -f $alive ]; then
  mtime=$(ls -l --time-style=+%s $alive | awk '{print $6}')
  let "last = $(date +%s) - 60"
  [ $mtime -gt $last ] && exit
fi
touch $alive # ensure existence

# start in a detached erlang VM
cmd="erl -boot $dir/boot/start -config $dir/boot/sys -env ERL_LIBS $dir/lib"
cmd="$cmd -name $app@localhost -detached"

echo "$(date) Running: $cmd" >> $log

$cmd 2>&1 >> $log

########################################
#
#     Some ways to run your app:
#
#     To run (embedded erlang):
#     ```
#         run_erl -daemon /home/$user/$app/pipes/ /home/$user/$app/log
#           "erl -boot $dir/boot/start
#                -config $dir/boot/sys
#                -env ERL_LIBS $dir/lib
#                -sname $app"
#     ```
#
#     To connect (embedded erlang):
#     ```
#         to_erl /home/$user/$app/pipes/erlang.pipe.1
#     ```
#
#     To run (interactive erlang):
#     ```
#         erl -boot $dir/boot/start
#             -config $dir/boot/sys
#             -env ERL_LIBS $dir/lib
#             -name $app@localhost
#     ```
#
#     To run (interactive elixir, using app's own `iex`):
#     ```
#         erl -boot $dir/boot/start
#             -config $dir/boot/sys
#             -env ERL_LIBS $dir/lib
#             -name $app@localhost
#             -noshell -user Elixir.IEx.CLI -extra --no-halt
#     ```
#
#     To run (detached elixir):
#     ```
#         iex --erl "-boot $dir/boot/start
#                    -config $dir/boot/sys
#                    -env ERL_LIBS $dir/lib"
#             --name $app@localhost
#             --detached
#     ```
#
#     To run (detached erlang):
#     ```
#         erl -boot $dir/boot/start
#             -config $dir/boot/sys
#             -env ERL_LIBS $dir/lib
#             -name $app@localhost
#             -detached
#     ```
#
#     To connect (interactive elixir):
#     ```
#         iex --remsh $app@localhost --sname connector
#     ```
#
#     To connect (interactive erlang):
#     ```
#         erl -remsh $app@localhost -sname connector
#     ```
#
#     To connect (interactive elixir, using app's own `iex`):
#     ```
#         erl -remsh $app@localhost -sname connector
#         # and then ...
#         ($app@localhost)1> 'Elixir.IEx':start().
#     ```
#


fix link to the user profile in the layout template

<!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 SGC!</title>
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">

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

<%= link current_user(@conn).username, to: user_path(@conn, :show, current_user(@conn).user_id) %>

<%= link "Logout", to: session_path(@conn, :delete) %>

            <% else %>

<%= link "Login", to: session_path(@conn, :new) %>

            <% end %>

SGC

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

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

        <%= render @view_module, @view_template, assigns %>

<!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 SGC!</title>
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">

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

<%= link current_user(@conn).username, to: user_path(@conn, :show, @user.user_id) %>

<%= link "Logout", to: session_path(@conn, :delete) %>

            <% else %>

<%= link "Login", to: session_path(@conn, :new) %>

            <% end %>

SGC

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

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

        <%= render @view_module, @view_template, assigns %>


Remove unused sidebar items

Remove unused sidebar items

      <img src="<%= static_path(@conn, "/images/logo.png") %>" class="logo"/>

ElixirJobs

<%= gettext "Find your next Elixir job the right way." %>

    <input type="checkbox" class="sidebar-checkbox" id="sidebar-checkbox">

      <%= gettext "Publish a job offer" %>

      <%= gettext "You can follow via" %>
      Twitter
      RSS

      <%= gettext "Running on Phoenix!" %>
      <%= gettext "Open Source" %>
      <%= gettext "About" %>

      <img src="<%= static_path(@conn, "/images/logo.png") %>" class="logo"/>

ElixirJobs

<%= gettext "Find your next Elixir job the right way." %>

    <input type="checkbox" class="sidebar-checkbox" id="sidebar-checkbox">

      <%= gettext "Publish a job offer" %>
      Login
      Register

      <%= gettext "You can follow via" %>
      Twitter
      RSS

      <%= gettext "Running on Phoenix!" %>
      <%= gettext "Open Source" %>
      <%= gettext "About" %>


Remove verbose copyright

Remove verbose copyright

<!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>XEE.JP</title>
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">
    <link rel="shortcut icon" href="<%= static_path(@conn, "/favicon.ico") %>">

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.6/css/materialize.min.css">

実験管理画面

テーマ一覧

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

            XEE.JP

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

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

              <% else %>

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

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

              <% end %>

        </dev>

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

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

      <%= render @view_module, @view_template, assigns %>

© 2015 Ryohei HAYASHI All Rights Reserved.

Powered by Xee System.

<!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>XEE.JP</title>
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">
    <link rel="shortcut icon" href="<%= static_path(@conn, "/favicon.ico") %>">

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.6/css/materialize.min.css">

実験管理画面

テーマ一覧

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

            XEE.JP

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

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

              <% else %>

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

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

              <% end %>

        </dev>

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

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

      <%= render @view_module, @view_template, assigns %>

© Copyright (C) 2015-2016 Ryohei HAYASHI All Rights Reserved.

Powered by Xee System.


update template

update template

<!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="author" content="<%= @blog_name %>">
    <meta property="og:url" content="<%= url(@conn) <> @conn.request_path %>"/>
    <meta property="og:type" content="website"/>

    <%= render "meta.html", assigns %>
    <meta property="og:site_name" content="<%= @blog_name %>"/>
    <title><%= title @conn %></title>

    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">
    <link href="<%= static_path(@conn, @blog_favicon) %>" rel="icon" type="image/x-icon">

    <link href='https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>

    <%= if @feeds_enabled do %>
      <%= if assigns[:page_type] == :tag do %>
        <link href="<%= feed_url @conn, :tag, @tag %>" rel="alternate" type="application/rss+xml" title="RSS feed for tag <%= @tag %>" />
      <% else %>
        <link href="<%= feed_url @conn, :index %>" rel="alternate" type="application/rss+xml" title="RSS feed" />
      <% end %>
    <% end %>

                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    Toggle navigation

                </button>

                  <%= @blog_name %>

                          Home

                    <%= for link <- @nav_links do %>

                        <a href="<%= link.path %>" class="navbar-brand"><%= link.name %>

                    <% end %>

    <%= render "header.html", assigns %>

      <%= @inner %>

                            <a href="https://www.facebook.com/<%= @facebook %>" target="_blank">

                            <a href="https://twitter.com/<%= @twitter %>" target="_blank">

                            <a href="https://github.com/<%= @github %>" target="_blank">

                        <%= if @feeds_enabled do %>

                            <a href="<%= feed_url @conn, :index %>" target="_blank">

                        <% end %>

Copyright © <%= @blog_name %> 2015 - <% {time, unit} = request_time @conn %> Rendered in <%= time |> safe_round |> trunc %> <%= unit%>

    <%= raw extra_html %>


Updates to win32 boot script

Updates to win32 boot script

- Fix console task
- Add support for RELEASE_CONFIG_DIR
- Add support for RELEASE_MUTABLE_DIR
- Fix detection and setup of ERTS
- Implement sys.config/vm.args generation

:: This batch file handles managing an Erlang node as a Windows service.
::
:: Commands provided:
::
:: * install - install the release as a Windows service
:: * start - start the service and Erlang node
:: * stop - stop the service and Erlang node
:: * restart - run the stop command and start command
:: * uninstall - uninstall the service and kill a running node
:: * ping - check if the node is running
:: * console - start the Erlang release in a `werl` Windows shell
:: * attach - connect to a running node and open an interactive console
:: * list - display a listing of installed Erlang services
:: * usage - display available commands

:: Set variables that describe the release
@set rel_name=<%= release_name %>
@set rel_vsn=<%= release_version %>
@set erts_vsn=<%= erts_vsn %>
@set erl_opts=<%= erl_opts %>

:: Discover the release root directory from the directory
:: of this script
@set script_dir=%~dp0
@for %%A in ("%script_dir%\..\..") do @(
  set release_root_dir=%%~fA
)
@set rel_dir=%release_root_dir%\releases\%rel_vsn%
@echo rel_dir is %rel_dir%

@if "%RELEASE_MUTABLE_DIR%"=="" (
  set mutable_dir=%release_root_dir%\var
) else (
  set mutable_dir=%RELEASE_MUTABLE_DIR
)
::@echo mutable_dir is %mutable_dir%

@if "%RELEASE_CONFIG_DIR%"=="" (
  set config_dir=%release_root_dir%
) else (
  set config_dir=%RELEASE_CONFIG_DIR%
)
::@echo config_dir is %config_dir%

@set log_dir=%mutable_dir%\log
::@echo log_dir is %log_dir%

:: Create directories which don't exist
@if not exist %mutable_dir% mkdir %mutable_dir%
@if not exist %config_dir% mkdir %config_dir%
@if not exist %log_dir% mkdir %log_dir%

@call :find_erts_dir
@call :find_sys_config
@call :find_vm_args
@call :set_boot_script_var

@set service_name=%rel_name%_%rel_vsn%
@set bindir=%erts_dir%\bin
@set progname=erl.exe
@set clean_boot_script=%release_root_dir%\bin\start_clean
@set erlsrv="%bindir%\erlsrv.exe"
@set epmd="%bindir%\epmd.exe"
@set escript="%bindir%\escript.exe"
@set werl="%bindir%\werl.exe"
@set nodetool="%release_root_dir%\bin\nodetool"

:: Extract node type and name from vm.args
@for /f "usebackq tokens=1-2" %%I in (`findstr /b "\-name \-sname" "%vm_args%"`) do @(
  set node_type=%%I
  set node_name=%%J
)

:: Extract cookie from vm.args
@for /f "usebackq tokens=1-2" %%I in (`findstr /b \-setcookie "%vm_args%"`) do @(
  set cookie=%%J
)

:: Write the erl.ini file to set up paths relative to this script
@call :write_ini

:: If a start.boot file is not present, copy one from the named .boot file
@if not exist "%rel_dir%\start.boot" (
  copy "%rel_dir%\%rel_name%.boot" "%rel_dir%\start.boot" >nul
)

@if "%1"=="install" @goto install
@if "%1"=="uninstall" @goto uninstall
@if "%1"=="start" @goto start
@if "%1"=="stop" @goto stop
@if "%1"=="restart" @call :stop && @goto start
@if "%1"=="upgrade" @goto relup
@if "%1"=="downgrade" @goto relup
@if "%1"=="console" @goto console
@if "%1"=="ping" @goto ping
@if "%1"=="list" @goto list
@if "%1"=="attach" @goto attach
@if "%1"=="" @goto usage
@echo Unknown command: %1

@goto :eof

:: Find the ERTS dir
:find_erts_dir
@if "%erts_vsn%"=="" (
  call :use_system_erts
) else (
  call :use_bundled_erts
)
@goto :eof

:: Load system ERTS info
:use_system_erts
@for /f "delims=" %%i in ('where erl') do set system_erl="%%i"
@if %system_erl%=="" (
  echo failed to locate the Erlang Runtime System!
  exit 1
)
@set system_root_dir_cmd=%system_erl% -noshell -eval "io:format(\"~s\", [filename:nativename(code:root_dir())])." -s init stop
@for /f "delims=" %%i in (`%%system_root_dir_cmd%%`) do set system_root=%%i
@set system_erts_vsn_cmd=%system_erl% -noshell -eval "Ver=erlang:system_info(version),io:format(\"~s\", [Ver])" -s init stop
@for /f "delims=" %%i in (`%%system_erts_vsn_cmd%%`) do set system_erts_vsn=%%i
@set erl=%system_erl%
@set erts_vsn=%system_erts_vsn%
@set rootdir=%system_root%
@set erts_dir=%rootdir%\erts-%erts_vsn%
@goto :eof

:: Load bundled ERTS info
:use_bundled_erts
@set erts_dir=%release_root_dir%\erts-%erts_vsn%
@set erl=%erts_dir%\bin\erl
@set rootdir=%release_root_dir%
@goto :eof

:: Find the sys.config file
:find_sys_config
@set possible_sys=%release_config_dir%\sys.config
@if exist %possible_sys% (
  set sys_config_src=%possible_sys%
) else (
  set sys_config_src=%rel_dir%\sys.config
)
@set sys_config_target=%config_dir%\sys.config
:: Replace environment variables
@powershell -command "$content = get-content %sys_config_src%; [regex]::matches($content, '\${[\w\d_-]+}') | foreach { $content = $content.Replace($_.value, [System.Environment]::GetEnvironmentVariable($_.value)) }; out-file -filepath %sys_config_target% -inputobject $content -encoding ascii"
@set sys_config=%sys_config_target%
@goto :eof

:find_vm_args
@set possible_vmargs=%release_config_dir%\vm.args
@if exist %possible_vmargs% (
  set vmargs_src=%possible_vmargs%
) else (
  set vmargs_src=%rel_dir%\vm.args
)
@set vmargs_target=%config_dir%\vm.args
:: Replace environment variables
@powershell -command "$content = get-content %vmargs_src%; [regex]::matches($content, '\${[\w\d_-]+}') | foreach { $content = $content.Replace($_.value, [System.Environment]::GetEnvironmentVariable($_.value)) }; out-file -filepath %vmargs_target% -inputobject $content -encoding ascii"
@set vm_args=%vmargs_target%
@goto :eof

:: set boot_script variable
:set_boot_script_var
@if exist %rel_dir%\%rel_name%.boot (
  set boot_script=%rel_dir%\%rel_name%
) else (
  set boot_script=%rel_dir%\start
)
@goto :eof

:: Write the erl.ini file
:write_ini
@set erl_ini=%erts_dir%\bin\erl.ini
@set converted_bindir=%bindir:\=\\%
@set converted_rootdir=%rootdir:\=\\%
@echo [erlang] > "%erl_ini%"
@echo Bindir=%converted_bindir% >> "%erl_ini%"
@echo Progname=%progname% >> "%erl_ini%"
@echo Rootdir=%converted_rootdir% >> "%erl_ini%"
@goto :eof

:: Display usage information
:usage
@echo usage: %~n0 ^(install^|uninstall^|start^|stop^|restart^|upgrade^|downgrade^|console^|ping^|list^|attach^)
@goto :eof

:: Install the release as a Windows service
:: or install the specified version passed as argument
:install
set args=%erl_opts% -setcookie %cookie% ++ -rootdir \"%rootdir%\"
set start_erl=%erts_dir%\bin\start_erl.exe
set description=Erlang node %node_name% in %rootdir%
@if "" == "%2" (
  :: Install the service
  %erlsrv% add %service_name% %node_type% "%node_name%" -c "%description%" ^
            -w "%rootdir%" -m "%start_erl%" -args "%args%" -args_file "%vm_args%" ^
            -stopaction "init:stop()."
) else (
  :: relup and reldown
  goto relup
)
@goto :eof

:: Uninstall the Windows service
:uninstall
@%erlsrv% remove %service_name%
@%epmd% -kill
@goto :eof

:: Start the Windows service
:start
@%erlsrv% start %service_name%
@goto :eof

:: Stop the Windows service
:stop
@%erlsrv% stop %service_name%
@goto :eof

:: Relup and reldown
:relup
@if "" == "%2" (
  echo Missing package argument
  echo Usage: %rel_name% %1 {package base name}
  echo NOTE {package base name} MUST NOT include the .tar.gz suffix
  set ERRORLEVEL=1
  exit /b %ERRORLEVEL%
)
@%escript% "%rootdir%/bin/install_upgrade.escript" "%rel_name%" "%node_name%" "%cookie%" "%2"
@goto :eof

:: Start a console
:console
@start "%rel_name% console" %werl% -boot "%boot_script%" ^
       -config "%sys_config%"  ^
       -args_file "%vm_args%" ^
       -user Elixir.IEx.CLI ^
       -extra --no-halt +iex
@goto :eof

:: Ping the running node
:ping
@%escript% %nodetool% ping %node_type% "%node_name%" -setcookie "%cookie%"
@goto :eof

:: List installed Erlang services
:list
@%erlsrv% list %service_name%
@goto :eof

:: Attach to a running node
:attach
@start "%node_name% attach" %werl% -boot "%clean_boot_script%" ^
       -remsh %node_name% %node_type% console -setcookie %cookie%
@goto :eof

:: This batch file handles managing an Erlang node as a Windows service.
::
:: Commands provided:
::
:: * install - install the release as a Windows service
:: * start - start the service and Erlang node
:: * stop - stop the service and Erlang node
:: * restart - run the stop command and start command
:: * uninstall - uninstall the service and kill a running node
:: * ping - check if the node is running
:: * console - start the Erlang release in a `werl` Windows shell
:: * attach - connect to a running node and open an interactive console
:: * list - display a listing of installed Erlang services
:: * usage - display available commands

:: Set variables that describe the release
@set rel_name=<%= rel_name %>
@set rel_vsn=<%= rel_vsn %>
@set erts_vsn=<%= erts_vsn %>
@set erl_opts=<%= erl_opts %>

:: Discover the release root directory from the directory
:: of this script
@set script_dir=%~dp0
@for %%A in ("%script_dir%\..") do @(
  set release_root_dir=%%~fA
)
@set rel_dir=%release_root_dir%\releases\%rel_vsn%

@call :find_erts_dir
@call :find_sys_config
@call :set_boot_script_var

@set service_name=%rel_name%_%rel_vsn%
@set bindir=%erts_dir%\bin
@set vm_args=%rel_dir%\vm.args
@set progname=erl.exe
@set clean_boot_script=%release_root_dir%\bin\start_clean
@set erlsrv="%bindir%\erlsrv.exe"
@set epmd="%bindir%\epmd.exe"
@set escript="%bindir%\escript.exe"
@set werl="%bindir%\werl.exe"
@set nodetool="%release_root_dir%\bin\nodetool"

:: Extract node type and name from vm.args
@for /f "usebackq tokens=1-2" %%I in (`findstr /b "\-name \-sname" "%vm_args%"`) do @(
  set node_type=%%I
  set node_name=%%J
)

:: Extract cookie from vm.args
@for /f "usebackq tokens=1-2" %%I in (`findstr /b \-setcookie "%vm_args%"`) do @(
  set cookie=%%J
)

:: Write the erl.ini file to set up paths relative to this script
@call :write_ini

:: If a start.boot file is not present, copy one from the named .boot file
@if not exist "%rel_dir%\start.boot" (
  copy "%rel_dir%\%rel_name%.boot" "%rel_dir%\start.boot" >nul
)

@if "%1"=="install" @goto install
@if "%1"=="uninstall" @goto uninstall
@if "%1"=="start" @goto start
@if "%1"=="stop" @goto stop
@if "%1"=="restart" @call :stop && @goto start
@if "%1"=="upgrade" @goto relup
@if "%1"=="downgrade" @goto relup
@if "%1"=="console" @goto console
@if "%1"=="ping" @goto ping
@if "%1"=="list" @goto list
@if "%1"=="attach" @goto attach
@if "%1"=="" @goto usage
@echo Unknown command: "%1"

@goto :eof

:: Find the ERTS dir
:find_erts_dir
@set possible_erts_dir=%release_root_dir%\erts-%erts_vsn%
@if exist "%possible_erts_dir%" (
  call :set_erts_dir_from_default
) else (
  call :set_erts_dir_from_erl
)
@goto :eof

:: Set the ERTS dir from the passed in erts_vsn
:set_erts_dir_from_default
@set erts_dir=%possible_erts_dir%
@set rootdir=%release_root_dir%
@goto :eof

:: Set the ERTS dir from erl
:set_erts_dir_from_erl
@for /f "delims=" %%i in ('where erl') do @(
  set erl=%%i
)
@set dir_cmd="%erl%" -noshell -eval "io:format(\"~s\", [filename:nativename(code:root_dir())])." -s init stop
@for /f %%i in ('%%dir_cmd%%') do @(
  set erl_root=%%i
)
@set erts_dir=%erl_root%\erts-%erts_vsn%
@set rootdir=%erl_root%
@goto :eof

:: Find the sys.config file
:find_sys_config
@set possible_sys=%rel_dir%\sys.config
@if exist %possible_sys% (
  set sys_config=-config "%possible_sys%"
)
@goto :eof

:: set boot_script variable
:set_boot_script_var
@if exist "%rel_dir%\%rel_name%.boot" (
  set boot_script=%rel_dir%\%rel_name%
) else (
  set boot_script=%rel_dir%\start
)
@goto :eof

:: Write the erl.ini file
:write_ini
@set erl_ini=%erts_dir%\bin\erl.ini
@set converted_bindir=%bindir:\=\\%
@set converted_rootdir=%rootdir:\=\\%
@echo [erlang] > "%erl_ini%"
@echo Bindir=%converted_bindir% >> "%erl_ini%"
@echo Progname=%progname% >> "%erl_ini%"
@echo Rootdir=%converted_rootdir% >> "%erl_ini%"
@goto :eof

:: Display usage information
:usage
@echo usage: %~n0 ^(install^|uninstall^|start^|stop^|restart^|upgrade^|downgrade^|console^|ping^|list^|attach^)
@goto :eof

:: Install the release as a Windows service
:: or install the specified version passed as argument
:install
set args=%erl_opts% -setcookie %cookie% ++ -rootdir \"%rootdir%\"
set start_erl=%erts_dir%\bin\start_erl.exe
set description=Erlang node %node_name% in %rootdir%
@if "" == "%2" (
  :: Install the service
  %erlsrv% add %service_name% %node_type% "%node_name%" -c "%description%" ^
            -w "%rootdir%" -m "%start_erl%" -args "%args%" ^
            -stopaction "init:stop()."
) else (
  :: relup and reldown
  goto relup
)
@goto :eof

:: Uninstall the Windows service
:uninstall
@%erlsrv% remove %service_name%
@%epmd% -kill
@goto :eof

:: Start the Windows service
:start
@%erlsrv% start %service_name%
@goto :eof

:: Stop the Windows service
:stop
@%erlsrv% stop %service_name%
@goto :eof

:: Relup and reldown
:relup
@if "" == "%2" (
  echo Missing package argument
  echo Usage: %rel_name% %1 {package base name}
  echo NOTE {package base name} MUST NOT include the .tar.gz suffix
  set ERRORLEVEL=1
  exit /b %ERRORLEVEL%
)
@%escript% "%rootdir%/bin/install_upgrade.escript" "%rel_name%" "%node_name%" "%cookie%" "%2"
@goto :eof

:: Start a console
:console
@start "%rel_name% console" %werl% -boot "%boot_script%" %sys_config%  ^
       -args_file "%vm_args%"
@goto :eof

:: Ping the running node
:ping
@%escript% %nodetool% ping %node_type% "%node_name%" -setcookie "%cookie%"
@goto :eof

:: List installed Erlang services
:list
@%erlsrv% list %service_name%
@goto :eof

:: Attach to a running node
:attach
@start "%node_name% attach" %werl% -boot "%clean_boot_script%" ^
       -remsh %node_name% %node_type% console -setcookie %cookie%
@goto :eof


use JD for jd, BNC for bnc

use JD for jd, BNC for bnc

<%= render Core.LayoutView, "h1.html", [brand: @brand, text: "Call Voters"] %>
<% csl =
  cond do
    @calling_script_link != nil and String.contains?(@calling_script_link, "https://") -> @calling_script_link
    @calling_script_link -> core_deployment(@brand) <> @calling_script_link
    true -> nil
  end
%>
<% abbrev = String.upcase(@brand) %>

  <%= if @brand == "jd" do %>

  <% end %>

  <%= if (not @mobile) do %>
    <%= render Core.LayoutView, "left-nav.html", assigns %>
  <% end %>

    <%= if @on_hours or @draft do %>
      <%= if (@candidate["slug"] in @callable_slugs) or @draft do %>

          <%= raw(@candidate_calling_page) %>

           First,

            Read the guide on how to make calls for <%= abbrev %>

           Second,
          <a target="_blank" class="primary-button" href="<%= csl %>">
            Read the calling script

           Third,
          <a target="_blank" class="primary-button" href="<%= core_deployment(@brand) <> "/call" %>">
            Claim your login

           Fourth,

            Login to our dialer, and get calling!

 Calling hours

              We make calls from 5PM - 9PM on weekdays and 10AM - 9PM on
              weekends in the candidates' local time zone,
              so check back anytime you want to make calls.

              However, your login information will change each day, so you'll
              need to reclaim it.

 Questions?

              Please email
              <% email =
                case @brand do
                  "jd" -> "dialer@justicedemocrats.com"
                  "bnc" -> "dialer@brandnewcongress.org"
                end
              %>

              <a href="mailto:<%= email %>" target="-blank">
                <%= email %>
              .
              We'll get back to you as soon as we can.

      <% else %>

        <%= if @candidate do %>

            We've made all of our calls for <%= @candidate["title"] %> for
            today!

        <% else %>

            Sorry, we don't have a candidate in your district yet.

        <% end %>

 Please make calls for one of our other candidates:

          <%= for cand <- @callable_candidates do %>

 <a href="<%= "/act/call/#{cand.slug}" %>" target="_blank">
                <%= cand.name %>

          <% end %>

      <% end %>

    <% else %>

      <%= if @candidate !== nil and length(@callable_candidates) > 0 do %>

          Since we only make calls from 5PM - 9PM on weekdays and 10AM - 9PM on weekends
          in the candidates' local time zone,
          we're not calling voters in <%= @candidate["title"] %>'s district right now.

 Please make calls for one of our other candidates:

          <%= for cand <- @callable_candidates do %>

 <a href="<%= "/act/call/#{cand.slug}" %>" target="_blank">
                <%= cand.name %>

          <% end %>

      <% else %>

          At the moment, we're making calls from 5PM - 9PM on weekdays and
          10AM - 9PM on Saturday and 12 noon to 9PM on Sunday in the candidates'
          local time zone.

          Please fill out

            this form

          and we'll help you get set up soon.

      <% end %>

    <% end %>

<%= render Core.LayoutView, "h1.html", [brand: @brand, text: "Call Voters"] %>
<% csl =
  cond do
    @calling_script_link != nil and String.contains?(@calling_script_link, "https://") -> @calling_script_link
    @calling_script_link -> core_deployment(@brand) <> @calling_script_link
    true -> nil
  end
%>

  <%= if @brand == "jd" do %>

  <% end %>

  <%= if (not @mobile) do %>
    <%= render Core.LayoutView, "left-nav.html", assigns %>
  <% end %>

    <%= if @on_hours or @draft do %>
      <%= if (@candidate["slug"] in @callable_slugs) or @draft do %>

          <%= raw(@candidate_calling_page) %>

           First,

            Read the guide on how to make calls for BNC

           Second,
          <a target="_blank" class="primary-button" href="<%= csl %>">
            Read the calling script

           Third,
          <a target="_blank" class="primary-button" href="<%= core_deployment(@brand) <> "/call" %>">
            Claim your login

           Fourth,

            Login to our dialer, and get calling!

 Calling hours

              We make calls from 5PM - 9PM on weekdays and 10AM - 9PM on
              weekends in the candidates' local time zone,
              so check back anytime you want to make calls.

              However, your login information will change each day, so you'll
              need to reclaim it.

 Questions?

              Please email
              <% email =
                case @brand do
                  "jd" -> "dialer@justicedemocrats.com"
                  "bnc" -> "dialer@brandnewcongress.org"
                end
              %>

              <a href="mailto:<%= email %>" target="-blank">
                <%= email %>
              .
              We'll get back to you as soon as we can.

      <% else %>

        <%= if @candidate do %>

            We've made all of our calls for <%= @candidate["title"] %> for
            today!

        <% else %>

            Sorry, we don't have a candidate in your district yet.

        <% end %>

 Please make calls for one of our other candidates:

          <%= for cand <- @callable_candidates do %>

 <a href="<%= "/act/call/#{cand.slug}" %>" target="_blank">
                <%= cand.name %>

          <% end %>

      <% end %>

    <% else %>

      <%= if @candidate !== nil and length(@callable_candidates) > 0 do %>

          Since we only make calls from 5PM - 9PM on weekdays and 10AM - 9PM on weekends
          in the candidates' local time zone,
          we're not calling voters in <%= @candidate["title"] %>'s district right now.

 Please make calls for one of our other candidates:

          <%= for cand <- @callable_candidates do %>

 <a href="<%= "/act/call/#{cand.slug}" %>" target="_blank">
                <%= cand.name %>

          <% end %>

      <% else %>

          At the moment, we're making calls from 5PM - 9PM on weekdays and
          10AM - 9PM on Saturday and 12 noon to 9PM on Sunday in the candidates'
          local time zone.

          Please fill out

            this form

          and we'll help you get set up soon.

      <% end %>

    <% end %>


Update app name in header

Update app name in header

<!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><%= gettext "Shall We Play a Game?" %></title>
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">

<%= link gettext("64squares"), to: page_path(@conn, :index) %>

          <%= if current_user(@conn) do %>
            <%= current_user(@conn).name %> (<%= current_user(@conn).email %>)
            |
            <%= link gettext("Log out"),
                  to: session_path(@conn, :delete),
                  method: :delete %>
          <% else %>
            <%= link gettext("Register"), to: registration_path(@conn, :new) %>
            |
            <%= link gettext("Log in"), to: session_path(@conn, :new) %>
          <% end %>

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

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

        <%= render @view_module, @view_template, assigns %>

<!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><%= gettext "Shall We Play a Game?" %></title>
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">

<%= link gettext("Chess"), to: page_path(@conn, :index) %>

          <%= if current_user(@conn) do %>
            <%= current_user(@conn).name %> (<%= current_user(@conn).email %>)
            |
            <%= link gettext("Log out"),
                  to: session_path(@conn, :delete),
                  method: :delete %>
          <% else %>
            <%= link gettext("Register"), to: registration_path(@conn, :new) %>
            |
            <%= link gettext("Log in"), to: session_path(@conn, :new) %>
          <% end %>

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

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

        <%= render @view_module, @view_template, assigns %>


Add description meta tag

Add description meta tag

<!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="A real-time application for conducting Agile retrospectives">
    <meta name="author" content="">
    <title>RemoteRetro</title>
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/semantic-ui/semantic.min.css") %>">
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">

  <body class="<%= if @view_module.include_backdrop, do: "photo-backdrop" %>">

      <%= render @view_module, @view_template, assigns %>

    <%= if @view_module.include_js do %>

    <% end %>

<!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>RemoteRetro</title>
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/semantic-ui/semantic.min.css") %>">
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">

  <body class="<%= if @view_module.include_backdrop, do: "photo-backdrop" %>">

      <%= render @view_module, @view_template, assigns %>

    <%= if @view_module.include_js do %>

    <% end %>


test deploy

test deploy

<!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 Webmonitor!</title>
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">

        webmonitor

      <%= if user_signed_in?(@conn) do %>
        Monitors
        |
        <%= link "Sign Out", to: "/session", method: :delete %>
      <% else %>
        Sign In
        |
        Sign Up
      <% end %>
      |
      <%= if user_signed_in?(@conn) do %>
        <%= safe_get @current_user, :email  %>
      <% end %>

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

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

        <%= render @view_module, @view_template, assigns %>

CH CH CHANGES


update title and description

update title and description

<!doctype html>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <title>POST Bot for Slack</title>
  <meta name="description" content="A Slack bot to get valuable feedback on your articles.">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css">
  <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">

    <%= render @view_module, @view_template, assigns %>

<!doctype html>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <title>Hello EspiDni!</title>
  <meta name="description" content="">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css">
  <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">

    <%= render @view_module, @view_template, assigns %>


Change title

Change title

<!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.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, minimal-ui" />
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Community Sheep Simulator v0.1</title>
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">

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

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

        <%= render @view_module, @view_template, assigns %>

<!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.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, minimal-ui" />
    <meta name="description" content="">
    <meta name="author" content="">

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

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

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

        <%= render @view_module, @view_template, assigns %>


Adds Attendances to the menu

Adds Attendances to the 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 CoursePlanner!</title>
    <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:300,400,500,700" type="text/css">
    <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">

          Course Planner

            <%= CoursePlanner.Coherence.ViewHelpers.signout_link(@conn, "Sign out", "mdl-navigation__link") %>
            <img
              class="profile-bubble__image"
              src="<%= CoursePlanner.SharedView.get_gravatar_url( @conn.assigns.current_user.email ) %>"
            />

      <%= CoursePlanner.SharedView.navbar "Course Planner" do %>
        <%= CoursePlanner.SharedView.navbar_item "Dashboard", @conn, dashboard_path(@conn, :show) %>
        <%= CoursePlanner.SharedView.navbar_separator %>
        <%= CoursePlanner.SharedView.navbar_item "Coordinators", @conn, coordinator_path(@conn, :index) %>
        <%= CoursePlanner.SharedView.navbar_item "Students", @conn, student_path(@conn, :index) %>
        <%= CoursePlanner.SharedView.navbar_item "Teachers", @conn, teacher_path(@conn, :index) %>
        <%= CoursePlanner.SharedView.navbar_item "Volunteers", @conn, volunteer_path(@conn, :index) %>
        <%= CoursePlanner.SharedView.navbar_item "All users", @conn, user_path(@conn, :index) %>
        <%= CoursePlanner.SharedView.navbar_separator %>
        <%= CoursePlanner.SharedView.navbar_item "Courses", @conn, course_path(@conn, :index) %>
        <%= CoursePlanner.SharedView.navbar_item "Terms", @conn, term_path(@conn, :index) %>
        <%= CoursePlanner.SharedView.navbar_separator %>
        <%= CoursePlanner.SharedView.navbar_item "Offered Courses", @conn, offered_course_path(@conn, :index) %>
        <%= CoursePlanner.SharedView.navbar_item "Classes", @conn, class_path(@conn, :index) %>
        <%= CoursePlanner.SharedView.navbar_item "Attendances", @conn, attendance_path(@conn, :index) %>
        <%= CoursePlanner.SharedView.navbar_item "Tasks", @conn, task_path(@conn, :index) %>
      <% end %>

            <%= render @view_module, @view_template, assigns %>

      <button class="mdl-snackbar__action" type="button"></button>

<!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 CoursePlanner!</title>
    <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:300,400,500,700" type="text/css">
    <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">

          Course Planner

            <%= CoursePlanner.Coherence.ViewHelpers.signout_link(@conn, "Sign out", "mdl-navigation__link") %>
            <img
              class="profile-bubble__image"
              src="<%= CoursePlanner.SharedView.get_gravatar_url( @conn.assigns.current_user.email ) %>"
            />

      <%= CoursePlanner.SharedView.navbar "Course Planner" do %>
        <%= CoursePlanner.SharedView.navbar_item "Dashboard", @conn, dashboard_path(@conn, :show) %>
        <%= CoursePlanner.SharedView.navbar_separator %>
        <%= CoursePlanner.SharedView.navbar_item "Coordinators", @conn, coordinator_path(@conn, :index) %>
        <%= CoursePlanner.SharedView.navbar_item "Students", @conn, student_path(@conn, :index) %>
        <%= CoursePlanner.SharedView.navbar_item "Teachers", @conn, teacher_path(@conn, :index) %>
        <%= CoursePlanner.SharedView.navbar_item "Volunteers", @conn, volunteer_path(@conn, :index) %>
        <%= CoursePlanner.SharedView.navbar_item "All users", @conn, user_path(@conn, :index) %>
        <%= CoursePlanner.SharedView.navbar_separator %>
        <%= CoursePlanner.SharedView.navbar_item "Courses", @conn, course_path(@conn, :index) %>
        <%= CoursePlanner.SharedView.navbar_item "Terms", @conn, term_path(@conn, :index) %>
        <%= CoursePlanner.SharedView.navbar_separator %>
        <%= CoursePlanner.SharedView.navbar_item "Offered Courses", @conn, offered_course_path(@conn, :index) %>
        <%= CoursePlanner.SharedView.navbar_item "Classes", @conn, class_path(@conn, :index) %>
        <%= CoursePlanner.SharedView.navbar_item "Tasks", @conn, task_path(@conn, :index) %>
      <% end %>

            <%= render @view_module, @view_template, assigns %>

      <button class="mdl-snackbar__action" type="button"></button>


Fix broken add-button js (NaN not a valid cost)

<div class="tab-pane js-stock-type <%= active(@stock_type, @stock_by_type)%>" id="<%= @stock_type %>">

      <%= @stock_type %> <%= gettext("remaining:") %>
      <span class="js-credit-count credit-amount" data-credit-type="<%= @type_id %>" >
        <%=  @credits[@stock_type] %>

      <%= for stock <- @stocks do %>
        <div class="js-stock-row stock-entry <%= stock.storage %>" data-stock-id="<%= stock.id %>">

              <%= if stock.image do %>
                <%= img_tag(image_url(stock), class: "stock-image") %>
              <% end %>

<%= stock_description(stock) %>

<%= stock.packaging %>

<%= gettext("Price: ") %>

                    <%= stock.credits_per_package %>

                  <%= gettext(" noms") %>

            <%= stock.quantity %> <%= gettext(" available") %>

            <div class="js-quantity-control <%= hidden_quantity(stock, @package) %>  quantity_control_trash-container">

                <button class="js-remove-stock plus-minus-button" type="button">
                  <svg class="minus-svg" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs></defs><title><%= gettext("Minus") %></title><path class="js-remove-stock add_sub-svg" d="M832.771,625H167.229a125,125,0,1,1,0-250H832.771a125,125,0,0,1,0,250Z"/></svg>
                </button>

                  <%= quantity(stock, @package) %>

                <button class="js-add-stock plus-minus-button" type="button">
                  <svg class="plus-svg" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs></defs><title> <%= gettext("Plus") %></title><path class=" add_sub-svg" d="M832.771,375H625V167.229a125,125,0,1,0-250,0V375H167.229a125,125,0,1,0,0,250H375V832.771a125,125,0,0,0,250,0V625H832.771a125,125,0,0,0,0-250Z"/></svg>
                </button>

              <button class="clear-action js-clear-stock" type="button">
                <svg class="trashcan-svg js-clear-stock" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><title><%= gettext("Trashcan") %></title><path d="M720.22 133.17H630c-.16-35.28-15.12-66.23-42.2-87.17-23.29-18-54.25-27.93-87.17-27.93S436.75 28 413.46 46c-27.09 20.95-42 51.89-42.17 87.18H280A82.78 82.78 0 0 0 197.22 216v44.19h604a1.74 1.74 0 0 0 1.74-1.74V216a82.78 82.78 0 0 0-82.74-82.83zM441.78 82.62c15-11.6 36.46-18.26 58.85-18.26s43.84 6.64 58.85 18.26c16 12.34 24.08 29.35 24.19 50.56H417.59c.11-21.18 8.24-38.18 24.19-50.56zM744.39 298.51H254.1v599.71A82.78 82.78 0 0 0 336.88 981h326.47a82.78 82.78 0 0 0 82.78-82.78v-598a1.74 1.74 0 0 0-1.74-1.71zM414.14 881.42a19.84 19.84 0 0 1-39.68 0V439.09a19.84 19.84 0 0 1 39.68 0zm105.81 0a19.84 19.84 0 0 1-39.68 0V439.09a19.84 19.84 0 0 1 39.68 0zm107.14 0a19.84 19.84 0 1 1-39.68 0V439.09a19.84 19.84 0 1 1 39.68 0z"/></svg>
              </button>

            <button class="js-add-stock add-to-cart js-add-cart <%= hidden_add_to_cart(stock, @package) %>" type="button" >
              <svg class="shopping-cart-svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 5000 5000">title><%= gettext("Shopping Cart") %></title><path  d="M4695.2 989.5H952.4l-48-169.6c-1.9-60.7-52.2-109.8-113.3-109.8H187.9c-62.4 0-113.4 51-113.4 113.4v35c0 62.4 51 113.4 113.4 113.4h487.4l84.3 298 363.9 1611.5c0 39.8 9 77.1 24.7 109.2l-166.9 633c-2.2 8.4-3.4 16.8-3.6 25.2-8.8 16.1-13.8 34.5-13.8 54v66.8c0 62.4 51 113.4 113.4 113.4h70c-107.6 43.8-183.4 149.3-183.4 272.6 0 162.5 131.7 294.2 294.2 294.2s294.2-131.7 294.2-294.2c0-123.3-75.9-228.9-183.4-272.6h2757c-107.6 43.8-183.4 149.3-183.4 272.6 0 162.5 131.7 294.2 294.2 294.2s294.2-131.7 294.2-294.2c0-123.3-75.9-228.9-183.4-272.6h70c62.4 0 113.4-51 113.4-113.4v-66.8c0-62.4-51-113.4-113.4-113.4H1333.2l134-508.3 3228-340.6c100.4 0 181.8-97.1 181.8-216.8V1206.3c0-119.7-81.4-216.8-181.8-216.8z"/></svg>
              <%= gettext("Add to Cart") %>
            </button>

      <% end %>

<div class="tab-pane js-stock-type <%= active(@stock_type, @stock_by_type)%>" id="<%= @stock_type %>">

      <%= @stock_type %> <%= gettext("remaining:") %>
      <span class="js-credit-count credit-amount" data-credit-type="<%= @type_id %>" >
        <%=  @credits[@stock_type] %>

      <%= for stock <- @stocks do %>
        <div class="js-stock-row stock-entry <%= stock.storage %>" data-stock-id="<%= stock.id %>">

              <%= if stock.image do %>
                <%= img_tag(image_url(stock), class: "stock-image") %>
              <% end %>

<%= stock_description(stock) %>

<%= stock.packaging %>

<%= gettext("Price: ") %><%= stock.credits_per_package %> <%= gettext(" noms") %>

            <%= stock.quantity %> <%= gettext(" available") %>

            <div class="js-quantity-control <%= hidden_quantity(stock, @package) %>  quantity_control_trash-container">

                <button class="js-remove-stock plus-minus-button" type="button">
                  <svg class="minus-svg" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs></defs><title><%= gettext("Minus") %></title><path class="js-remove-stock add_sub-svg" d="M832.771,625H167.229a125,125,0,1,1,0-250H832.771a125,125,0,0,1,0,250Z"/></svg>
                </button>

                  <%= quantity(stock, @package) %>

                <button class="js-add-stock plus-minus-button" type="button">
                  <svg class="plus-svg" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs></defs><title> <%= gettext("Plus") %></title><path class=" js-add-stock add_sub-svg" d="M832.771,375H625V167.229a125,125,0,1,0-250,0V375H167.229a125,125,0,1,0,0,250H375V832.771a125,125,0,0,0,250,0V625H832.771a125,125,0,0,0,0-250Z"/></svg>
                </button>

              <button class="clear-action js-clear-stock" type="button">
                <svg class="trashcan-svg js-clear-stock" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><title><%= gettext("Trashcan") %></title><path d="M720.22 133.17H630c-.16-35.28-15.12-66.23-42.2-87.17-23.29-18-54.25-27.93-87.17-27.93S436.75 28 413.46 46c-27.09 20.95-42 51.89-42.17 87.18H280A82.78 82.78 0 0 0 197.22 216v44.19h604a1.74 1.74 0 0 0 1.74-1.74V216a82.78 82.78 0 0 0-82.74-82.83zM441.78 82.62c15-11.6 36.46-18.26 58.85-18.26s43.84 6.64 58.85 18.26c16 12.34 24.08 29.35 24.19 50.56H417.59c.11-21.18 8.24-38.18 24.19-50.56zM744.39 298.51H254.1v599.71A82.78 82.78 0 0 0 336.88 981h326.47a82.78 82.78 0 0 0 82.78-82.78v-598a1.74 1.74 0 0 0-1.74-1.71zM414.14 881.42a19.84 19.84 0 0 1-39.68 0V439.09a19.84 19.84 0 0 1 39.68 0zm105.81 0a19.84 19.84 0 0 1-39.68 0V439.09a19.84 19.84 0 0 1 39.68 0zm107.14 0a19.84 19.84 0 1 1-39.68 0V439.09a19.84 19.84 0 1 1 39.68 0z"/></svg>
              </button>

            <button class="js-add-stock add-to-cart js-add-cart <%= hidden_add_to_cart(stock, @package) %>" type="button" >
              <svg class="shopping-cart-svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 5000 5000">title><%= gettext("Shopping Cart") %></title><path  d="M4695.2 989.5H952.4l-48-169.6c-1.9-60.7-52.2-109.8-113.3-109.8H187.9c-62.4 0-113.4 51-113.4 113.4v35c0 62.4 51 113.4 113.4 113.4h487.4l84.3 298 363.9 1611.5c0 39.8 9 77.1 24.7 109.2l-166.9 633c-2.2 8.4-3.4 16.8-3.6 25.2-8.8 16.1-13.8 34.5-13.8 54v66.8c0 62.4 51 113.4 113.4 113.4h70c-107.6 43.8-183.4 149.3-183.4 272.6 0 162.5 131.7 294.2 294.2 294.2s294.2-131.7 294.2-294.2c0-123.3-75.9-228.9-183.4-272.6h2757c-107.6 43.8-183.4 149.3-183.4 272.6 0 162.5 131.7 294.2 294.2 294.2s294.2-131.7 294.2-294.2c0-123.3-75.9-228.9-183.4-272.6h70c62.4 0 113.4-51 113.4-113.4v-66.8c0-62.4-51-113.4-113.4-113.4H1333.2l134-508.3 3228-340.6c100.4 0 181.8-97.1 181.8-216.8V1206.3c0-119.7-81.4-216.8-181.8-216.8z"/></svg>
              <%= gettext("Add to Cart") %>
            </button>

      <% end %>


Write beautiful race condition protection when db comes up slow.

#!/usr/bin/env sh
set -eu

<%= if @docker do %>mix deps.get
<%= if @node_assets do %>
(cd lib/<%= @name %>/www ; npm install)<% end %>
<%= if @ecto do %>
# NOTE there is a race condition between the db service starting
# and the project itself starting. This code will retry until the db can be connected to.
attempts=20
for i in `seq $attempts`; do
    mix ecto.create >/dev/null && break
    echo "Attempt $i / $attempts - failed to create db for the Repo"
    sleep 1
done

if [ $i -eq $attempts ]; then
    echo "Could not connect to the database, exiting"
    exit 2;
fi

mix ecto.migrate
<% end %>
elixir --sname app -S mix run --no-halt
<% end %>

#!/usr/bin/env sh

<%= if @docker do %>mix deps.get

<%= if @node_assets do %>(cd lib/<%= @name %>/www ; npm install)
<% end %>
<%= if @ecto do %>mix do ecto.create, ecto.migrate
<% end %>
elixir --sname app -S mix run --no-halt
<% end %>


feat(admin): home -> dashboard

feat(admin): home -> dashboard

<!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>Admin</title>
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/admin.css") %>">

      Lyn Admin

        <li class="nav-item <%= active_class(@conn, admin_path(@conn, :dashboard)) %>">
          <a class="nav-link" href="<%= admin_path(@conn, :dashboard) %>">Dashboard (current)

        <li class="nav-item <%= active_class(@conn, admin_path(@conn, :index, "objects")) %>">
          <a class="nav-link" href="<%= admin_path(@conn, :index, "objects") %>">Objects (current)

        <li class="nav-item <%= active_class(@conn, admin_path(@conn, :index, "users")) %>">
          <a class="nav-link" href="<%= admin_path(@conn, :index, "users") %>">Users (current)

          System

            <a class="dropdown-item" href="<%= admin_path(@conn, :index, "object_types") %>">Object Types (current)
            <a class="dropdown-item" href="<%= admin_path(@conn, :index, "languages") %>">Languages (current)
            <a class="dropdown-item" href="<%= admin_path(@conn, :index, "domains") %>">Domains (current)
            <a class="dropdown-item" href="<%= admin_path(@conn, :index, "sites") %>">Sites (current)

            <a class="dropdown-item" href="<%= maintenance_path(@conn, :index) %>">Maintenance (current)

      <form class="form-inline pull-xs-right">
        <input class="form-control" type="text" placeholder="Search">
        <button class="btn btn-default" type="submit">Search</button>
      </form>

        <%
          sidebar_file = sidebar(@conn)
        %>
        <%= if sidebar_file do %>

            <%= render Lyn.Admin.SidebarView, sidebar_file, assigns %>

        <% end %>
        <div id="main" <%= if !sidebar_file do %>class="full-width"<% end %>>

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

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

            <%= render @view_module, @view_template, assigns %>

<!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>Admin</title>
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/admin.css") %>">

      Lyn Admin

        <li class="nav-item <%= active_class(@conn, admin_path(@conn, :dashboard)) %>">
          <a class="nav-link" href="<%= admin_path(@conn, :dashboard) %>">Home (current)

        <li class="nav-item <%= active_class(@conn, admin_path(@conn, :index, "objects")) %>">
          <a class="nav-link" href="<%= admin_path(@conn, :index, "objects") %>">Objects (current)

        <li class="nav-item <%= active_class(@conn, admin_path(@conn, :index, "users")) %>">
          <a class="nav-link" href="<%= admin_path(@conn, :index, "users") %>">Users (current)

          System

            <a class="dropdown-item" href="<%= admin_path(@conn, :index, "object_types") %>">Object Types (current)
            <a class="dropdown-item" href="<%= admin_path(@conn, :index, "languages") %>">Languages (current)
            <a class="dropdown-item" href="<%= admin_path(@conn, :index, "domains") %>">Domains (current)
            <a class="dropdown-item" href="<%= admin_path(@conn, :index, "sites") %>">Sites (current)

            <a class="dropdown-item" href="<%= maintenance_path(@conn, :index) %>">Maintenance (current)

      <form class="form-inline pull-xs-right">
        <input class="form-control" type="text" placeholder="Search">
        <button class="btn btn-default" type="submit">Search</button>
      </form>

        <%
          sidebar_file = sidebar(@conn)
        %>
        <%= if sidebar_file do %>

            <%= render Lyn.Admin.SidebarView, sidebar_file, assigns %>

        <% end %>
        <div id="main" <%= if !sidebar_file do %>class="full-width"<% end %>>

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

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

            <%= render @view_module, @view_template, assigns %>