fix html

fix html

<%#
if params["search"].present?
  # search
  content_for :title, "#{params["search"]}の検索結果"
  content_for :keywords, params["search"]
elsif params[:tag].present?
  # tag
  content_for :title, "#{params[:tag]}"
  content_for :keywords, params[:tag]
else
  content_for :title, "最新動画"
end

#content_for :description, @entries.first.content if @entries.first.present?
%>

<% if false do %>
  mobile:<%= mobile? @conn %>
  desktop:<%= desktop? @conn %>
<%= end %>

        <form style='<%= if mobile?(@conn), do: "padding: 5px 15px; margin-top: -9px; margin-bottom: 0;" %>'
              class="navbar-form" role="search" action="<%= entry_path(@conn, :index) %>">

          <%= take_hidden_field_tags @conn, ~w(list divas) %>

          <div class='input-group <%= if mobile?(@conn), do: "input-group-sm" %>'
               style='display: inline-table; width: <%= if mobile?(@conn), do: 100, else: 114 %>%;'>

              <input style='width: 100%;' class="form-control search-query typeahead"
                     type="search" name="search"
                     placeholder="<%= gettext "Search XXX Videos" %>"
                     value='<%= @conn.params["search"] %><%= @conn.params["tag"] %>'
                     autocomplete='on' />

            <%= gettext "Let fill out search word for XXX videos" %>

              <button class="btn btn-default" type="submit"></button>

        </form>

          <%= if @conn.params["search"] do %>
            <%= gettext "Relevant Video Results: %{name}", name: @conn.params["search"] %>
          <% else %>
            <%= gettext "Recently XXX Videos" %>
          <% end %>

          <%
          ten_min_params = take_params(@conn, ~w(list page search site_name tag divas))
          unless @conn.params["t600"], do: ten_min_params = Map.merge ten_min_params, %{"t600" => 1}
          %>
          <a href="<%= entry_path @conn, :index, ten_min_params %>"
              type="button"
              class="btn btn-default <%= if mobile?(@conn), do: "btn-sm" %> <%= if @conn.params["t600"], do: "active" %>">
            <%= gettext "Over 10 Min" %>

          <%= if desktop? @conn do %>
            <a href="<%= entry_path @conn, :index, take_params(@conn, ~w(t600 page search site_name tag divas)) %>"
                type="button"
                class="btn btn-default <%= unless @conn.params["list"], do: "active" %>">

            <a href="<%= entry_path @conn, :index, take_params(@conn, ~w(t600 page search site_name tag divas), list: 1) %>"
                type="button"
                class="btn btn-default <%= if @conn.params["list"], do: "active" %>">

          <% end %>

          <%= if @conn.params["search"] do %>
            <%= @conn.params["search"] %>
            <%= gettext "Search - %{num} results", num: number_with_delimiter(@entries.total_entries) %>
          <% else %>
            <%= number_with_delimiter(@entries.total_entries) %> <%= gettext "Showing" %>
          <% end %>

      <div id='entries' style='<%= if mobile?(@conn), do: "margin-top: -16px;" %>'>
        <%= render "_entries.html", conn: @conn, entries: @entries %>

            <%= pagination_links @conn, @entries %>

            <%#= paginate @entries %>
            <%#= link_to_next_page @entries,
                  t('views.pagination.next'),
                  remote: true,
                  params: params do
            %>
              <%# ページがありません %>
            <%# end %>

             <%= gettext "Relevant Tag" %>

            <%= for term <- @entries.tirexs[:facets][:tags][:terms] do %>

                <a href="<%= entrytag_path @conn, :index, term[:term]  %><%= if @conn.params["list"], do: "?list=#{@conn.params["list"]}" %>"
                   title="<%= gettext "Jump to %{tag}'s video results", tag: term[:term] %>"
                   rel="category tag nofollow"
                >
                  <h2 style='<%= if tags_exists(@conn, term[:term]), do: "color: #d9534f; font-weight: bold;" %>'
                      class="no-heading-style"><%= term[:term] %>(<%= term[:count] %>)

            <% end %>

      <% if false do %>

             <%= gettext "Relevant Diva" %>

            <%= for term <- @entries.tirexs[:facets][:divas][:terms] do %>

                <a href="<%= entrydiva_path @conn, :index, term[:term]  %><%= if @conn.params["list"], do: "?list=#{@conn.params["list"]}" %>"
                   title="<%= gettext "Jump to %{diva}'s video results", diva: term[:term] %>"
                   rel="category tag nofollow"
                >
                  <h2 style='<%= if tags_exists(@conn, term[:term]), do: "color: #d9534f; font-weight: bold;" %>'
                      class="no-heading-style"><%= term[:term] %>(<%= term[:count] %>)

            <% end %>

      <% end %>

<%#
if params["search"].present?
  # search
  content_for :title, "#{params["search"]}の検索結果"
  content_for :keywords, params["search"]
elsif params[:tag].present?
  # tag
  content_for :title, "#{params[:tag]}"
  content_for :keywords, params[:tag]
else
  content_for :title, "最新動画"
end

#content_for :description, @entries.first.content if @entries.first.present?
%>

<% if false do %>
  mobile:<%= mobile? @conn %>
  desktop:<%= desktop? @conn %>
<%= end %>

        <form style='<%= if mobile? @conn do %> "padding: 5px 15px; margin-top: -9px; margin-bottom: 0;" <% end %>'
              class="navbar-form" role="search" action="<%= entry_path(@conn, :index) %>">

          <%= take_hidden_field_tags @conn, ~w(list divas) %>

          <div class='input-group <%= if mobile?(@conn), do: "input-group-sm" %>'
               style='display: inline-table; width: <%= if mobile?(@conn), do: 100, else: 114 %>%;'>

              <input style='width: 100%;' class="form-control search-query typeahead"
                     type="search" name="search"
                     placeholder="<%= gettext "Search XXX Videos" %>"
                     value='<%= @conn.params["search"] %><%= @conn.params["tag"] %>'
                     autocomplete='on' />

            <%= gettext "Let fill out search word for XXX videos" %>

              <button class="btn btn-default" type="submit"></button>

        </form>

          <%= if @conn.params["search"] do %>
            <%= gettext "Relevant Video Results: %{name}", name: @conn.params["search"] %>
          <% else %>
            <%= gettext "Recently XXX Videos" %>
          <% end %>

          <%
          ten_min_params = take_params(@conn, ~w(list page search site_name tag divas))
          unless @conn.params["t600"], do: ten_min_params = Map.merge ten_min_params, %{"t600" => 1}
          %>
          <a href="<%= entry_path @conn, :index, ten_min_params %>"
              type="button"
              class="btn btn-default <%= if mobile? @conn do %>btn-sm<% end %> <%= if @conn.params["t600"] do %>active<% end %>">
            <%= gettext "Over 10 Min" %>

          <%= if desktop? @conn do %>
            <a href="<%= entry_path @conn, :index, take_params(@conn, ~w(t600 page search site_name tag divas)) %>"
                type="button"
                class="btn btn-default <%= unless @conn.params["list"] do %>active<% end %>">

            <a href="<%= entry_path @conn, :index, take_params(@conn, ~w(t600 page search site_name tag divas), list: 1) %>"
                type="button"
                class="btn btn-default <%= if @conn.params["list"] do %>active<% end %>">

          <% end %>

          <%= if @conn.params["search"] do %>
            <%= @conn.params["search"] %>
            <%= gettext "Search - %{num} results", num: number_with_delimiter(@entries.total_entries) %>
          <% else %>
            <%= number_with_delimiter(@entries.total_entries) %> <%= gettext "Showing" %>
          <% end %>

        <%= render "_entries.html", conn: @conn, entries: @entries %>

            <%= pagination_links @conn, @entries %>

            <%#= paginate @entries %>
            <%#= link_to_next_page @entries,
                  t('views.pagination.next'),
                  remote: true,
                  params: params do
            %>
              <%# ページがありません %>
            <%# end %>

             <%= gettext "Relevant Tag" %>

            <%= for term <- @entries.tirexs[:facets][:tags][:terms] do %>

                <a href="<%= entrytag_path @conn, :index, term[:term]  %><%= if @conn.params["list"], do: "?list=#{@conn.params["list"]}" %>"
                   title="<%= gettext "Jump to %{tag}'s video results", tag: term[:term] %>"
                   rel="category tag nofollow"
                >
                  <h2 style='<%= if tags_exists(@conn, term[:term]), do: "color: #d9534f; font-weight: bold;" %>'
                      class="no-heading-style"><%= term[:term] %>(<%= term[:count] %>)

            <% end %>

      <% if false do %>

             <%= gettext "Relevant Diva" %>

            <%= for term <- @entries.tirexs[:facets][:divas][:terms] do %>

                <a href="<%= entrydiva_path @conn, :index, term[:term]  %><%= if @conn.params["list"], do: "?list=#{@conn.params["list"]}" %>"
                   title="<%= gettext "Jump to %{diva}'s video results", diva: term[:term] %>"
                   rel="category tag nofollow"
                >
                  <h2 style='<%= if tags_exists(@conn, term[:term]), do: "color: #d9534f; font-weight: bold;" %>'
                      class="no-heading-style"><%= term[:term] %>(<%= term[:count] %>)

            <% end %>

      <% end %>


Protect against edge-case where honeybadger.js request fails or gets blocked

<!DOCTYPE html>

    <link rel="preconnect" href="<%= Routes.static_url(@conn, "/") %>">
    <link rel="shortcut icon" href="<%= Routes.static_url(@conn, "/images/favicon.ico") %>">
    <%= if Application.get_env(:remote_retro, :env) == :prod do %>

    <% else %>

    <% end %>
    <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="google-site-verification" content="T5W8sjrjt-BmTK5SYTjPM-FQZD8oGNatTNAJSyRex7o" />
    <meta name="author" content="">
    <title><%= assigns[:title] || "RemoteRetro.org | Free. World-class. Agile retrospectives." %></title>

    <link rel="stylesheet" href="<%= Routes.static_url(@conn, "/css/semantic-ui/semantic.min.css") %>">
    <link rel="stylesheet" href="<%= app_css(@conn) %>">
    <link rel="apple-touch-icon" href="<%= Routes.static_url(@conn, "/images/apple-touch-icon.png") %>">

    <%= if Application.get_env(:remote_retro, :env) == :test do %>

    <% end %>

  <body class="<%= assigns[:body_class] %>">

    <%= unless assigns[:omit_header] do %>

RemoteRetro

Built by

<img height="21" width="21" src="<%= Routes.static_url(@conn, "/images/stride_logo.png") %>" alt="Stride" />

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

              Log Out

          <% end %>

    <% end %>
      <%= @inner_content %>

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

    <% end %>


add refcode to now header

add refcode to now header

<%
  background_color = case @brand do
    "bnc" -> "white"
    "jd" -> "#5B919F"
  end
%>

<header class="header" style="background-color: <%= background_color %>">

    <a href="https://<%= homepage(@brand) %>">
      <%= if @brand == "jd" do %>

        <%= if @mobile do %>
          <img class="mobile" src="<%= static_path(@conn, "/images/horizontal-logo-jd.png")%>" />
        <% else %>
          <img class="desktop" src="<%= static_path(@conn, "/images/horizontal-logo-jd.png")%>" />
        <% end %>

      <% else %>

        <%= if @mobile do %>
          <img class="mobile" src="<%= static_path(@conn, "/images/horizontal-logo-smaller-bnc.png")%>" />
        <% else %>
          <img class="desktop" src="<%= static_path(@conn, "/images/horizontal-logo-bnc.png")%>" />
        <% end %>

      <% end %>

    <%= if (not @mobile) do %>
      <a class="donate-link" target="_blank" href="https://<%= homepage(@brand) %>/donate?refcode=nowheader">
        Support <%= abbr(@brand) %>

    <% end %>

<%= if @mobile do %>

<% else %>

<% end %>

<%
  background_color = case @brand do
    "bnc" -> "white"
    "jd" -> "#5B919F"
  end
%>

<header class="header" style="background-color: <%= background_color %>">

    <a href="https://<%= homepage(@brand) %>">
      <%= if @brand == "jd" do %>

        <%= if @mobile do %>
          <img class="mobile" src="<%= static_path(@conn, "/images/horizontal-logo-jd.png")%>" />
        <% else %>
          <img class="desktop" src="<%= static_path(@conn, "/images/horizontal-logo-jd.png")%>" />
        <% end %>

      <% else %>

        <%= if @mobile do %>
          <img class="mobile" src="<%= static_path(@conn, "/images/horizontal-logo-smaller-bnc.png")%>" />
        <% else %>
          <img class="desktop" src="<%= static_path(@conn, "/images/horizontal-logo-bnc.png")%>" />
        <% end %>

      <% end %>

    <%= if (not @mobile) do %>
      <a class="donate-link" target="_blank" href="https://<%= homepage(@brand) %>/donate">
        Support <%= abbr(@brand) %>

    <% end %>

<%= if @mobile do %>

<% else %>

<% end %>


Clean up partial template variable

Clean up partial template variable

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

  <title><%= title() %></title>

  <link rel="stylesheet" href="<%= Routes.static_path(@conn, "/css/app.css") %>">

  <%= render "favicons.html" %>
  <%= render "analytics.html" %>
</head>

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

  <title><%= title() %></title>

  <link rel="stylesheet" href="<%= Routes.static_path(@conn, "/css/app.css") %>">

  <%= render "favicons.html", conn: @conn %>
  <%= render "analytics.html" %>
</head>


Link bootstrap 4 locally.

Link bootstrap 4 locally.

<!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="Live earthquakes dashboard">
    <meta name="author" content="Renato Moya">

    <title>eqdash</title>

    <link rel="stylesheet" href="<%= static_path(@conn, "/css/bootstrap.css") %>">
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">

        eqdash
        live earthquakes dashboard

      <%= 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="Live earthquakes dashboard">
    <meta name="author" content="Renato Moya">

    <title>eqdash</title>

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" integrity="sha384-y3tfxAZXuh4HwSYylfB+J125MxIs6mR5FOHamPBG064zB+AFeWH94NdvaCBm8qnd" crossorigin="anonymous">

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

        eqdash
        live earthquakes dashboard

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


bold example title

bold example title

A liquid democracy where anyone can vote on anything.

Featured

				<%= for poll <- @examples do %>

						<a href="/polls/<%= poll.id %>">

<%= poll.title %>
<%= raw poll.tagline %>

							<div class="score" style="background-color: <%= Liquio.HtmlPollView.score_color poll %>;">
								<%= if poll.results.mean do %>
									<%= if poll.choice_type == "probability" do %>
										<%= round(poll.results.mean * 100) %>%
									<% else %>
										<%= number_format(poll.results.mean) %>
									<% end %>
								<% else %>
									?
								<% end %>

				<% end %>

Key features

				Delegations

				Not everyone is an expert at everything. That's why you can give your vote to people you trust, but can override it at any time.

				References

				Helping voters make more accurate decisions. People not familiar with the subject can also quickly learn more about it.

				Trust metrics

				Attempt to prevent a single person from having multiple identities. Everyone can choose their own or make a new one.

				Objectivity

				References and delegations work well with polls that are not subjective. <a href="/polls/<%= @polls.not_the_best_idea.id %>">Vanilla Ice Cream Flavor Rating — not the best idea.

				No censorship

				Trust metrics contain all subjective logic. The default trust metric lives here. You can always choose a different one.

				Transparency

				The source code is available under MIT license. All data is publicly available through the API for anyone to view or analyze.

	Liquio is still in early development. You can view the source code on GitHub. Feedback and contributions are welcome.


fix block class

fix block class

Block Information

Block | <%= @block.index %>

<a href="<%= blocks_path(@conn, :index) %>" alt="Back to all transactions" title="Back to all transactions" class="back-link">Back to all blocks

<%= gettext "Block index" %>

<%= @block.index %>

      <%= get_explanation("block_index") %>

<%= gettext "Transactions" %>

<%= @block.tx_count %>

      <%= get_explanation("block_transactions") %>

<%= gettext "Hash" %>

<%= @block.hash %>

      <%= get_explanation("block_hash") %>

<%= gettext "Time" %>

<%= compare_time_and_get_minutes(@block.time)%>

      <%= get_explanation("block_time") %>

<%= gettext "Version" %>

<%= @block.version %>

      <%= get_explanation("block_version") %>

<%= gettext "Merkle root" %>

<%= @block.merkleroot %>

      <%= get_explanation("block_merkle_root") %>

Validator

      <a href="<%= address_path(@conn, :index, @block.nextconsensus)%>" alt="View wallet address" title="View wallet address" class="large-blue-link wallet-address"><%= @block.nextconsensus %>
      <%= get_explanation("block_validator") %>

Size

<%= @block.size %> <%= gettext "bytes" %>

      <%= get_explanation("block_size") %>

<%= gettext "Transactions" %>

<%= gettext "Type" %>

<%= gettext "Transaction ID" %>

<%= gettext "Completed on" %>

All transaction information

      <%= for transaction <- @transactions do %>
        <div class="full-width-bar <%= get_class(transaction.type)%>">

            <%= if transaction.type == "ContractTransaction" do %>

<%= gettext "Contract" %>

            <% end %>
            <%= if transaction.type == "ClaimTransaction" do %>

<%= gettext "Gas Claim" %>

            <% end %>
            <%= if transaction.type == "InvocationTransaction" do %>

<%= gettext "Invocation" %>

            <% end %>
            <%= if transaction.type == "IssueTransaction" do %>

<%= gettext "Asset Issue" %>

            <% end %>
            <%= if transaction.type == "RegisterTransaction" do %>

<%= gettext "Asset Register" %>

            <% end %>
            <%= if transaction.type == "PublishTransaction" do %>

<%= gettext "Contract Publish" %>

            <% end %>
            <%= if transaction.type == "MinerTransaction" do %>

<%= gettext "Miner" %>

            <% end %>

              <a href="<%=transaction_path(@conn, :index, transaction.txid )%>" alt="View transaction" title="View transaction" class="large-blue-link col-6-width"><%= transaction.txid %>…

                <%=
                  {:ok, date_time} = DateTime.from_unix(transaction.time, :second)
                  DateTime.to_date(date_time)
                %> |
                <%=
                  {:ok, date_time} = DateTime.from_unix(transaction.time, :second)
                  DateTime.to_time(date_time)
                %>

          <button class="btn-accordion"><img src="<%= static_path(@conn, "/images/ICON_DownArrow.svg") %>" alt="Accordion down arrow" title="Accordion down arrow" class="accordion-down-arrow" width="13px" height="8px" /></button>

              <%= if transaction.type != "ClaimTransaction" and transaction.vin != [] do %>

<%= gettext "Sent from" %>

                <%= for vin <- transaction.vin do %>

                    <a href='<%= address_path(@conn, :index, vin.address_hash)%>' alt="View wallet address" title="View wallet address" class="large-blue-link wallet-address"><%= vin.address_hash %>

<%= Helpers.round_or_not(vin.value) %> <%= Api.get_asset_name(vin.asset) %>

                <% end %>
              <% end %>
              <%= if transaction.type == "ClaimTransaction" do %>

<%= gettext "Claimed from" %>

                <%= for claim <- transaction.claims do %>

                    <a href='<%= address_path(@conn, :index, claim.address_hash)%>' alt="View wallet address" title="View wallet address" class="large-blue-link wallet-address"><%= claim.address_hash %>

<%= Helpers.round_or_not(claim.value) %> <%= Api.get_asset_name(claim.asset) %>

                <% end %>
              <% end %>

            <img src="<%= static_path(@conn, "/images/ICON_Sent-arrow.svg")%>" alt="Sent arrow" title="Sent arrow" class="transaction-sent-arrow" />

              <%= if transaction.vouts != [] do %>

<%= gettext "Sent to" %>

                <%= for vout <- transaction.vouts do %>

                    <a href='<%= address_path(@conn, :index, vout.address_hash)%>' alt="View wallet address" title="View wallet address" class="large-blue-link wallet-address"><%= vout.address_hash %>

<%=Helpers.round_or_not(vout.value) %> <%= Api.get_asset_name(vout.asset) %>

                <% end %>
              <% end %>
              <%= if transaction.type == "RegisterTransaction" do %>

<%= gettext "Registered" %>

                  <a href='<%= address_path(@conn, :index, transaction.asset.admin)%>' alt="View wallet address" title="View wallet address" class="large-blue-link wallet-address"><%= transaction.asset.admin %>

<%= Helpers.round_or_not(transaction.asset.amount) %> <%= Api.get_asset_name(transaction.txid) %>

              <% end %>

Network fee: <%=transaction.net_fee%> <%= gettext "GAS" %> · <%= gettext "System Fee" %>: <%=transaction.sys_fee%> <%= gettext "GAS" %> · <%= gettext "Data Size" %>: <%=transaction.size%> bytes

      <% end %>

Transactions <%= get_current_min_qtd(@page, @block.tx_count) %> to <%= get_current_max_qtd(@page, @block.tx_count) %> of <%= @block.tx_count %>

      <%= if @page != "1" do %>
        <%= get_previous_page(@conn, @block.hash, @page) %>
      <% end %>
      <%= if check_last(@page, @block.tx_count) do %>
        <%= get_next_page(@conn, @block.hash, @page) %>
      <% end %>

<%= gettext "Bytecode Invocation Script" %>

      <%= get_explanation("bytecode_invocation_script") %>

      <%= for script <- @block.script do %>
        <%= if check_if_invocation(script) do %>

<%= get_inv(script) %>

        <% end %>
      <% end %>

<%= gettext "Bytecode Verification Script" %>

      <%= get_explanation("bytecode_verification_script") %>

      <%= for script <- @block.script do %>
        <%= if check_if_verification(script) do %>

<%= get_ver(script) %>

        <% end %>
      <% end %>

<%= gettext "Opcode Invocation Script" %>

      <%= get_explanation("opcode_invocation_script") %>

        <%= for script <- @block.script do %>
          <%= if check_if_invocation(script) do %>
            <%= for operation <- parse_invocation(script) do %>
              <%= operation %>
            <% end %>
          <% end %>
        <% end %>

<%= gettext "Opcode Verification Script" %>

      <%= get_explanation("opcode_verification_script") %>

      <%= for script <- @block.script do %>
        <%= if check_if_verification(script) do %>
        <%= for operation <- parse_verification(script) do %>
          <%= operation %>
        <% end %>
        <% end %>
      <% end %>


desigin

desigin

<%#
# Change Title, Keywords, Description automatically.
content_for :title, @entry.title
content_for :keywords, @entry.id.to_s
content_for :description, "#{@entry.title}: #{@entry.content}"
%>

<%#  %>

      <%= if false do %>
      <%# if is_mobile? @conn do %>
        <%# adsenses = Adsense.random_list.mobiled %>
        <%# if adsenses.exists? do %>

            <%# adsamp(adsenses, 3).each.with_index(1) do |adsense, index| %>
              <%#= render partial: 'entries_list_adsense', locals: {
                adsense: adsense,
                index: index,
                adsense_category: 'show_top_entries_list'
              } %>
            <%# end %>

        <%# end %>
      <%# end %>
      <% end %>

      <%#- cache ['show_entry', request.smart_phone?, request.mobile?, @entry] do -%>

            <%= title_with_link @conn, @entry %>

          <%= if desktop? @conn do %><%# adsense %>

                <%# Adsense.show_movie_left.immobiled.order('updated_at ASC').each.with_index do |ad, i| %>

                    <a href='<%#= ad.url %>'
                         class='col-md-2 adsense'
                         rel='nofollow'
                         onclick="ga('send', 'event', 'show_left', 'click', 'show_left_click<%#= i %>');"
                      >
                        <%#= image_tag ad.adimages.sample.image.url(:size_250x500) if ad.adimages.exists? %>

                <%# end %>

          <% end %>

            <%= if desktop? @conn do %><%# adsense %>

            <% end %>

              <meta itemprop="url" content="<%= entry_path @conn, :show, @entry.id, @entry.title %>" />
              <meta itemprop="name" content="<%= @entry.title %>" />
              <meta itemprop="headline" content="<%= @entry.title %>" />
              <meta itemprop="description" content="<%= @entry.content %>" />
              <meta itemprop="image" content="<%= if length(@entry.thumbs) > 0, do: thumb = List.first(@entry.thumbs); thumb.__struct__.get_thumb(thumb) %>">
              <meta itemprop="thumbnailUrl" content="<%= if length(@entry.thumbs) > 0, do: thumb = List.first(@entry.thumbs); thumb.__struct__.get_thumb(thumb) %>" />
              <meta itemprop="duration" content="<%#= Duration.new(@entry.time).iso8601 %>" />
              <meta itemprop="timeRequired" content="<%#= Duration.new(@entry.time).iso8601 %>" />
              <%# <meta itemprop="contentUrl" content="http://www.example.com/video123.flv" /> %>
              <%# <meta itemprop="embedUrl" content="http://www.example.com/videoplayer.swf?video=123" /> %>
              <%# <meta itemprop="expires" content="2012-01-30T19:00:00+09:00" /> %>
              <meta itemprop="uploadDate" content="<%#= @entry.published_at.iso8601 %>" />
              <meta itemprop="datePublished" content="<%#= @entry.published_at.iso8601 %>" />
              <meta itemprop="keywords" content="<%= Enum.join(Enum.map(@entry.tags, fn(tag) -> tag.name end), ",") %>" />

              <%= if mobile?(@conn) && @entry.site.__struct__.japan_whores?(@entry.site) do %>
                <img src='<%= static_path @conn, "/images/no-video.jpg" %>' />
              <% end %>
              <%#= if !@entry.should_index? do %>

              <%# end %>
              <%= if !(mobile?(@conn) && @entry.site.__struct__.japan_whores?(@entry.site)) do %>

<%= raw @entry.embed_code %>

              <% end %>

                <%= for tag <- Enum.take(@entry.tags, (if desktop?(@conn), do: 5, else: 2)) do %>
                  <a href="<%#= entries_path tag.name %>" title="<%= gettext "Jump to %{tag}'s video results", tag: tag.name %>" rel="category tag">
                    <%= tag.name %>

                <% end %>

                <%= time_ago_in_words @entry.published_at %><%= gettext " ago" %>
                <%= round(@entry.time / 60) %><%= gettext " Min" %>

<%= simple_format @entry.content %>

          <%= if desktop?(@conn) do %><%# adsense %>

                <%#= Adsense.show_movie_right.immobiled.order('updated_at ASC').each.with_index do |ad, i| %>

                    <a href='<%#= ad.url %>'
                         class='col-md-2 adsense'
                         rel='nofollow'
                         onclick="ga('send', 'event', 'show_left', 'click', 'show_right_click<%#= i %>');"
                      >
                        <%#= image_tag ad.adimages.sample.image.url(:size_250x500) if ad.adimages.exists? %>

                <%# end %>

          <% end %>

<%= gettext "Customers Who Watched This Video Also Watched" %>

      <%# end %>

      <%= render "_entries_list.html", conn: @conn, entries: @related_entries %>

<%#
# Change Title, Keywords, Description automatically.
content_for :title, @entry.title
content_for :keywords, @entry.id.to_s
content_for :description, "#{@entry.title}: #{@entry.content}"
%>

<%#  %>

      <%= if false do %>
      <%# if is_mobile? @conn do %>
        <%# adsenses = Adsense.random_list.mobiled %>
        <%# if adsenses.exists? do %>

            <%# adsamp(adsenses, 3).each.with_index(1) do |adsense, index| %>
              <%#= render partial: 'entries_list_adsense', locals: {
                adsense: adsense,
                index: index,
                adsense_category: 'show_top_entries_list'
              } %>
            <%# end %>

        <%# end %>
      <%# end %>
      <% end %>

      <%#- cache ['show_entry', request.smart_phone?, request.mobile?, @entry] do -%>

            <%= title_with_link @conn, @entry %>

          <%= if false && desktop? @conn do %><%# adsense %>

                <%# Adsense.show_movie_left.immobiled.order('updated_at ASC').each.with_index do |ad, i| %>

                    <a href='<%#= ad.url %>'
                         class='col-md-2 adsense'
                         rel='nofollow'
                         onclick="ga('send', 'event', 'show_left', 'click', 'show_left_click<%#= i %>');"
                      >
                        <%#= image_tag ad.adimages.sample.image.url(:size_250x500) if ad.adimages.exists? %>

                <%# end %>

          <% end %>

            <%= if desktop? @conn do %><%# adsense %>

                  <%# Adsense.show_movie_top.immobiled.order('updated_at ASC').each.with_index do |ad, i| %>

                      <a href='<%#= ad.url %>'
                           class='col-md-2 adsense'
                           rel='nofollow'
                           onclick="ga('send', 'event', 'show_top', 'click', 'show_top_click<%#= i %>');"
                        >
                          <%#= image_tag ad.adimages.sample.image.url, width: '528' if ad.adimages.exists? %>

                  <%# end %>

            <% end %>

              <meta itemprop="url" content="<%= entry_path @conn, :show, @entry.id, @entry.title %>" />
              <meta itemprop="name" content="<%= @entry.title %>" />
              <meta itemprop="headline" content="<%= @entry.title %>" />
              <meta itemprop="description" content="<%= @entry.content %>" />
              <meta itemprop="image" content="<%= if length(@entry.thumbs) > 0, do: thumb = List.first(@entry.thumbs); thumb.__struct__.get_thumb(thumb) %>">
              <meta itemprop="thumbnailUrl" content="<%= if length(@entry.thumbs) > 0, do: thumb = List.first(@entry.thumbs); thumb.__struct__.get_thumb(thumb) %>" />
              <meta itemprop="duration" content="<%#= Duration.new(@entry.time).iso8601 %>" />
              <meta itemprop="timeRequired" content="<%#= Duration.new(@entry.time).iso8601 %>" />
              <%# <meta itemprop="contentUrl" content="http://www.example.com/video123.flv" /> %>
              <%# <meta itemprop="embedUrl" content="http://www.example.com/videoplayer.swf?video=123" /> %>
              <%# <meta itemprop="expires" content="2012-01-30T19:00:00+09:00" /> %>
              <meta itemprop="uploadDate" content="<%#= @entry.published_at.iso8601 %>" />
              <meta itemprop="datePublished" content="<%#= @entry.published_at.iso8601 %>" />
              <meta itemprop="keywords" content="<%= Enum.join(Enum.map(@entry.tags, fn(tag) -> tag.name end), ",") %>" />

              <%= if mobile?(@conn) && @entry.site.__struct__.japan_whores?(@entry.site) do %>
                <img src='<%= static_path @conn, "/images/no-video.jpg" %>' />
              <% end %>
              <%#= if !@entry.should_index? do %>

              <%# end %>
              <%= if !(mobile?(@conn) && @entry.site.__struct__.japan_whores?(@entry.site)) do %>

<%= raw @entry.embed_code %>

              <% end %>

                <%= for tag <- Enum.take(@entry.tags, (if desktop?(@conn), do: 5, else: 2)) do %>
                  <a href="<%#= entries_path tag.name %>" title="<%= gettext "Jump to %{tag}'s video results", tag: tag.name %>" rel="category tag">
                    <%= tag.name %>

                <% end %>

                <%= time_ago_in_words @entry.published_at %><%= gettext " ago" %>
                <%= round(@entry.time / 60) %><%= gettext " Min" %>

<%= simple_format @entry.content %>

          <%= if false && desktop?(@conn) do %><%# adsense %>

                <%#= Adsense.show_movie_right.immobiled.order('updated_at ASC').each.with_index do |ad, i| %>

                    <a href='<%#= ad.url %>'
                         class='col-md-2 adsense'
                         rel='nofollow'
                         onclick="ga('send', 'event', 'show_left', 'click', 'show_right_click<%#= i %>');"
                      >
                        <%#= image_tag ad.adimages.sample.image.url(:size_250x500) if ad.adimages.exists? %>

                <%# end %>

          <% end %>

<%= gettext "Customers Who Watched This Video Also Watched" %>

      <%# end %>

      <%= render "_entries.html", conn: @conn, entries: @related_entries %>


Add GitHub link

Add GitHub link

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

<%= link "Mr. Rebase", to: "/" %>

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

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

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

        <%= link "See on GitHub", to: "https://github.com/wojtekmach/mr-rebase" %>


feat(admin): prettify form

feat(admin): prettify form

<%
first_language_id = List.first(@languages).id
%>
<%= form_for @changeset, @action, fn f -> %>
  <%= if @changeset.action do %>

Oops, something went wrong! Please check the errors below.

  <% end %>

  <%= for {id, column} <- @model.admin_fields do %>
    <%= render "form_group.html", f: f, skip_id: :id, id: id, column: column %>
  <% end %>

  <%= if Kernel.function_exported?(@model, :admin_outer_texts, 0) do %>

      <%= for language <- @languages do %>

          <a class="nav-link <%= if first_language_id === language.id do %>active<% end %>" data-toggle="tab" href="#outer_text_<%= language.id %>" role="tab">
            <%= language.name %>

      <% end %>

      <%= inputs_for f, @model.admin_outer_texts.assoc, fn of -> %>
        <div class="tab-pane <%= if first_language_id === of.data.language_id do %>active<% end %>" id="outer_text_<%= of.data.language_id %>" role="tabpanel">

              <%= for {id, column} <- @model.admin_outer_texts.model.admin_fields do %>
                <%= render "form_group.html", f: of, skip_id: :id, id: id, column: column %>
              <% end %>

      <% end %>

  <% end %>

    <%= submit "Submit", class: "btn btn-primary" %>

<% end %>


point learn more link to phoenixframework.org

<!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") %>">

          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
            Toggle navigation

          </button>
          Phoenix Chat

source

Learn more about the Phoenix Framework

    <%= @inner %>


viewing request templates

viewing request templates

<%= @request.title %>

    <%= @request.body %>

  <%= link "Edit", to: request_path(@conn, :edit, @request), class: "btn btn-default" %>
  <%= link "Back", to: request_path(@conn, :index), class: "btn btn-default" %>

Show request

    Title:
    <%= @request.title %>

    Body:
    <%= @request.body %>

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


test copy change.

test copy change.


Tag index template for poole theme updated to handle tag names with spaces

Tags

	 <%= Enum.map(@content, fn(tag) -> %>
		<a class="round tag-cloud" href="/tags/<%= Dnevnik.Utils.IO.url_slug(tag) %>.html"><%= tag %>
	 <% end) %>

Tags

	 <%= Enum.map(@content, fn(tag) -> %>
		<a class="round tag-cloud" href="/tags/<%= tag %>.html"><%= tag %>
	 <% end) %>


Fix unescaped ampersands when calling awk for REPLACE_OS_VARS=true. See bitwalker/exrm#390

#!/bin/sh

set -e

# Set VERBOSE to enable verbose logging of the boot script
#VERBOSE=true
if [ ! -z $DEBUG_BOOT ]; then
    set -x
fi;
# Disable flow control for run_erl
# Flow control can cause several problems. On Linux, if you
# accidentally hit Ctrl-S (instead of Ctrl-D to detach) and
# then some other key, the entire beam process will hang when
# attempting to write to stdout. On Solaris, the beam process
# will hang on writing if ScrollLock is on.
RUN_ERL_DISABLE_FLOWCNTRL="${RUN_ERL_DISABLE_FLOWCNTRL:-true}"
# Path to this script
SCRIPT=$(readlink $0 || true)
if [ -z $SCRIPT ]; then
    SCRIPT=$0
fi;
# Parent directory of this script
SCRIPT_DIR="$(cd `dirname "$SCRIPT"` && pwd -P)"
# Root directory of all releases
RELEASE_ROOT_DIR="$(cd "$SCRIPT_DIR/../.." && pwd -P)"
# Name of the release
REL_NAME="<%= release_name %>"
# Current version of the release
REL_VSN="<%= release_version %>"
# Current version of ERTS being used
# If this is not present/unset, it will be detected
<%= unless is_nil(erts_vsn) do %>ERTS_VSN="<%= erts_vsn %>"<% end %>
# VM code loading mode, embedded by default, can also be interactive
# See http://erlang.org/doc/man/code.html
CODE_LOADING_MODE="${CODE_LOADING_MODE:-embedded}"
# Path to start_erl.data
START_ERL_DATA="$RELEASE_ROOT_DIR/releases/start_erl.data"
# Directory containing the current version of this release
REL_DIR="$RELEASE_ROOT_DIR/releases/$REL_VSN"
# The lib directory for this release
REL_LIB_DIR="$RELEASE_ROOT_DIR/lib"
# Options passed to erl
ERL_OPTS="<%= release.profile.erl_opts %>"
# When stdout is piped to a file, this is the directory those files will
# be stored in. defaults to /log in the release root directory
RUNNER_LOG_DIR="${RUNNER_LOG_DIR:-$RELEASE_ROOT_DIR/log}"
# A string of extra options to pass to erl, here for plugins
EXTRA_OPTS=""

# Pre-start/stop event hook paths
PRE_START_HOOK="$REL_DIR/hooks/pre_start"
POST_START_HOOK="$REL_DIR/hooks/post_start"
PRE_STOP_HOOK="$REL_DIR/hooks/pre_stop"
POST_STOP_HOOK="$REL_DIR/hooks/post_stop"

# Get node pid
get_pid() {
    if output="$(nodetool rpcterms os getpid)"
    then
        echo "$output" | sed -e 's/"//g'
        return 0
    else
        echo "$output"
        return 1
    fi
}

# Generate a unique nodename
gen_nodename() {
    id="longname$(gen_id)-${NAME}"
    "$BINDIR/erl" -boot start_clean -eval '[Host] = tl(string:tokens(atom_to_list(node()),"@")), io:format("~s~n", [Host]), halt()' -noshell ${NAME_TYPE} $id
}

# Generate a random id
gen_id() {
    od -t x -N 4 /dev/urandom | head -n1 | awk '{print $2}'
}

# Control a node
# Use like `nodetool "ping"`
nodetool() {
    command="$1"; shift

    "$ERTS_DIR/bin/escript" "$ROOTDIR/bin/nodetool" "$NAME_TYPE" "$NAME" \
                            -setcookie "$COOKIE" "$command" $@
}

# Run an escript in the node's environment
# Use like `escript "path/to/escript"`
escript() {
    shift; scriptpath="$1"; shift
    export RELEASE_ROOT_DIR

    "$ERTS_DIR/bin/escript" "$ROOTDIR/$scriptpath" $@
}

# Private. For determining the version of ERTS available to the release
_detect_erts_vsn() {
    "$BINDIR/erl" -boot start_clean -eval 'Ver = erlang:system_info(version), io:format("~s~n", [Ver]), halt()' -noshell
}

# Private. Gets a list of code paths for this release
_get_code_paths() {
    "$ERTS_DIR/bin/escript" "$ROOTDIR/bin/release_utils.escript" "get_code_paths" "$ROOTDIR" "$ERTS_DIR" "$REL_DIR" "$REL_NAME"
}

# Private. For setting ERTS_DIR and ROOTDIR
_find_erts_dir() {
    __erts_dir="$RELEASE_ROOT_DIR/erts-$ERTS_VSN"
    if [ -d "$__erts_dir" ]; then
        ERTS_DIR="$__erts_dir";
        ROOTDIR="$RELEASE_ROOT_DIR"
    else
        __erl="$(which erl)"
        code="io:format(\"~s\", [code:root_dir()]), halt()."
        __erl_root="$("$__erl" -noshell -eval "$code")"
        ERTS_DIR="$__erl_root/erts-$ERTS_VSN"
        ROOTDIR="$__erl_root"
    fi
}

# Private. Open a shell on a remote node
_rem_sh() {
    # Generate a unique id used to allow multiple remsh to the same node
    # transparently
    id="remsh$(gen_id)-${NAME}"

    # Get the node's ticktime so that we use the same thing.
    TICKTIME="$(nodetool rpcterms net_kernel get_net_ticktime)"

    # Setup remote shell command to control node
    if [ ! -z "$USE_ERL_SHELL" ]; then
        exec "$BINDIR/erl" \
            -hidden \
            -boot start_clean -boot_var ERTS_LIB_DIR "$ERTS_LIB_DIR" \
            -kernel net_ticktime $TICKTIME \
            "$NAME_TYPE" "$id" -remsh "$NAME" -setcookie "$COOKIE"
    else
        __code_paths=$(_get_code_paths)
        exec "$BINDIR/erl" \
            -pa "$CONSOLIDATED_DIR" \
            ${__code_paths} \
            -hidden -noshell \
            -boot start_clean -boot_var ERTS_LIB_DIR "$ERTS_LIB_DIR" \
            -kernel net_ticktime $TICKTIME \
            -user Elixir.IEx.CLI "$NAME_TYPE" "$id" -setcookie "$COOKIE" \
            -extra --no-halt +iex -"$NAME_TYPE" "$id" --cookie "$COOKIE" --remsh "$NAME"
    fi
}

# Output a start command for the last argument of run_erl
_start_command() {
    printf "exec \"%s\" \"%s\" -- %s %s" "$RELEASE_ROOT_DIR/bin/$REL_NAME" \
           "$START_OPTION" "${ARGS}" "${EXTRA_OPTS}"
}

# Do a textual replacement of ${VAR} occurances in $1 and pipe to $2
_replace_os_vars() {
    awk '
        function escape(s) {
            gsub(/'\&'/, "\\\\&", s);
            return s;
        }
        {
            while(match($0,"[$]{[^}]*}")) {
                var=substr($0,RSTART+2,RLENGTH-3);
                gsub("[$]{"var"}", escape(ENVIRON[var]))
            }
        }1' < "$1" > "$2"
}

# If ERTS_VSN is not set, detect it
if [ -z "$ERTS_VSN" ]; then
    ERTS_VSN="$(_detect_erts_vsn)"
    echo "$ERTS_VSN $REL_VSN" > "$START_ERL_DATA"
fi

# Allow override of where to look for config files
# By default it's $CWD/
if [ -z "$RELEASE_CONFIG_DIR" ]; then
    RELEASE_CONFIG_DIR="$RELEASE_ROOT_DIR"
fi

# Set VMARGS_PATH, the path to the vm.args file to use
# Use $RELEASE_CONFIG_DIR/vm.args if exists, otherwise releases/VSN/vm.args
if [ -z "$VMARGS_PATH" ]; then
    if [ -f "$RELEASE_CONFIG_DIR/vm.args" ]; then
        VMARGS_PATH="$RELEASE_CONFIG_DIR/vm.args"
    else
        VMARGS_PATH="$REL_DIR/vm.args"
    fi
fi

orig_vmargs_path="$VMARGS_PATH.orig"
if [ $REPLACE_OS_VARS ]; then
    #Make sure we don't break dev mode by keeping the symbolic link to
    #the user's vm.args
    if [ ! -L "$orig_vmargs_path" ]; then
       #we're in copy mode, rename the vm.args file to vm.args.orig
       mv "$VMARGS_PATH" "$orig_vmargs_path"
    fi

    _replace_os_vars "$orig_vmargs_path" "$VMARGS_PATH"
 else
    #We don't need to replace env. vars, just rename the
    #symlink vm.args.orig to vm.args, and keep it as a
    #symlink.
    if [ -L "$orig_vmargs_path" ]; then
       mv "$orig_vmargs_path" "$VMARGS_PATH"
    fi
fi

# Make sure log directory exists
mkdir -p "$RUNNER_LOG_DIR"

# Set SYS_CONFIG_PATH, the path to the sys.config file to use
# Use $RELEASE_CONFIG_DIR/sys.config if exists, otherwise releases/VSN/sys.config
if [ -z "$SYS_CONFIG_PATH" ]; then
    if [ -f "$RELEASE_CONFIG_DIR/sys.config" ]; then
        SYS_CONFIG_PATH="$RELEASE_CONFIG_DIR/sys.config"
    else
        SYS_CONFIG_PATH="$REL_DIR/sys.config"
    fi
fi

orig_sys_config_path="$SYS_CONFIG_PATH.orig"
if [ $REPLACE_OS_VARS ]; then
    #Make sure we don't break dev mode by keeping the symbolic link to
    #the user's sys.config
    if [ ! -L "$orig_sys_config_path" ]; then
       #We're in copy mode, rename sys.config to sys.config.orig
       mv "$SYS_CONFIG_PATH" "$orig_sys_config_path"
    fi

    _replace_os_vars "$orig_sys_config_path" "$SYS_CONFIG_PATH"
 else
    #We don't need to replace env. vars, just rename the
    #symlink sys.config.orig to sys.config. Keep it as
    #a symlink.
    if [ -L "$orig_sys_config_path" ]; then
       mv "$orig_sys_config_path"  "$SYS_CONFIG_PATH"
    fi
fi

# Extract the target node name from node.args
# Should be `-sname somename` or `-name somename@somehost`
NAME_ARG=$(egrep '^-s?name' "$VMARGS_PATH" || true)
if [ -z "$NAME_ARG" ]; then
    echo "vm.args needs to have either -name or -sname parameter."
    exit 1
fi

# Extract the name type and name from the NAME_ARG for REMSH
# NAME_TYPE should be -name or -sname
NAME_TYPE="$(echo "$NAME_ARG" | awk '{print $1}')"
# NAME will be either `somename` or `somename@somehost`
NAME="$(echo "$NAME_ARG" | awk '{print $2}')"

# Where the pipe will be stored when using `start`
# This is used so you can attach the running application to the current
# shell using `attach`
PIPE_DIR="${PIPE_DIR:-$RELEASE_ROOT_DIR/tmp/erl_pipes/$NAME/}"

# Extract the target cookie
COOKIE_ARG="$(grep '^-setcookie' "$VMARGS_PATH" || true)"
DEFAULT_COOKIE_FILE="$HOME/.erlang.cookie"
if [ -z "$COOKIE_ARG" ]; then
    if [ -f "$DEFAULT_COOKIE_FILE" ]; then
        COOKIE="$(cat "$DEFAULT_COOKIE_FILE")"
    else
        printf "a secret cookie must be provided in one of the following ways:\n  - with vm.args using the -setcookie parameter,\n  or\n  by writing the cookie to '$DEFAULT_COOKIE_FILE', with permissions set to 0400"
        exit 1
    fi
else
    # Extract cookie name from COOKIE_ARG
    COOKIE="$(echo "$COOKIE_ARG" | awk '{print $2}')"
fi

_find_erts_dir
export ROOTDIR="$RELEASE_ROOT_DIR"
export BINDIR="$ERTS_DIR/bin"
export EMU="beam"
export PROGNAME="erl"
export LD_LIBRARY_PATH="$ERTS_DIR/lib:$LD_LIBRARY_PATH"
ERTS_LIB_DIR="$ERTS_DIR/../lib"
CONSOLIDATED_DIR="$ROOTDIR/lib/${REL_NAME}-${REL_VSN}/consolidated"

cd "$ROOTDIR"

# User can specify an sname without @hostname
# This will fail when creating remote shell
# So here we check for @ and add @hostname if missing
case $NAME in
    *@*)
        # Nothing to do
        ;;
    *)
        NAME=$NAME@$(gen_nodename)
        ;;
esac

# Check the first argument for instructions
case "$1" in
    start|start_boot)

        # Make sure there is not already a node running
        #RES=`$NODETOOL ping`
        #if [ "$RES" = "pong" ]; then
        #    echo "Node is already running!"
        #    exit 1
        #fi
        # Save this for later.
        CMD=$1
        case "$1" in
            start)
                shift
                START_OPTION="console"
                HEART_OPTION="start"
                ;;
            start_boot)
                shift
                START_OPTION="console_boot"
                HEART_OPTION="start_boot"
                ;;
        esac
        ARGS="$@"
        RUN_PARAM="$@"

        [ -f "$PRE_START_HOOK" ] && . "$PRE_START_HOOK"

        # Set arguments for the heart command
        set -- "$SCRIPT_DIR/$REL_NAME" "$HEART_OPTION"
        [ "$RUN_PARAM" ] && set -- "$@" "$RUN_PARAM"

        # Export the HEART_COMMAND
        HEART_COMMAND="$RELEASE_ROOT_DIR/bin/$REL_NAME $CMD"
        export HEART_COMMAND

        mkdir -p "$PIPE_DIR"

        "$BINDIR/run_erl" -daemon "$PIPE_DIR" "$RUNNER_LOG_DIR" \
                          "$(_start_command)"

        [ -f "$POST_START_HOOK" ] && . "$POST_START_HOOK"
        ;;

    stop)
        [ -f "$PRE_STOP_HOOK" ] && . "$PRE_STOP_HOOK"
        # Wait for the node to completely stop...
        PID="$(get_pid)"
        if ! nodetool "stop"; then
            exit 1
        fi
        while $(kill -s 0 "$PID" 2>/dev/null);
        do
            sleep 1
        done
        [ -f "$POST_STOP_HOOK" ] && . "$POST_STOP_HOOK"
        ;;

    restart)
        [ -f "$PRE_START_HOOK" ] && . "$PRE_START_HOOK"
        ## Restart the VM without exiting the process
        if ! nodetool "restart"; then
            exit 1
        fi
        ;;

    reboot)
        [ -f "$PRE_START_HOOK" ] && . "$PRE_START_HOOK"
        ## Restart the VM completely (uses heart to restart it)
        if ! nodetool "reboot"; then
            exit 1
        fi
        ;;

    pid)
        ## Get the VM's pid
        if ! get_pid; then
            exit 1
        fi
        ;;

    ping)
        ## See if the VM is alive
        if ! nodetool "ping"; then
            exit 1
        fi
        ;;

    escript)
        ## Run an escript under the node's environment
        if ! escript $@; then
            exit 1
        fi
        ;;

    attach)
        # Make sure a node IS running
        if ! nodetool "ping" > /dev/null; then
            echo "Node is not running!"
            exit 1
        fi

        shift
        exec "$BINDIR/to_erl" "$PIPE_DIR"
        ;;

    remote_console)
        # Make sure a node IS running
        if ! nodetool "ping" > /dev/null; then
            echo "Node is not running!"
            exit 1
        fi

        shift
        _rem_sh
        ;;

    upgrade|downgrade|install)
        if [ -z "$2" ]; then
            echo "Missing package argument"
            echo "Usage: $REL_NAME $1 {package base name}"
            echo "NOTE {package base name} MUST NOT include the .tar.gz suffix"
            exit 1
        fi

        # Make sure a node IS running
        if ! nodetool "ping" > /dev/null; then
            echo "Node is not running!"
            exit 1
        fi

        exec "$BINDIR/escript" "$ROOTDIR/bin/install_upgrade.escript" \
             "install" "$REL_NAME" "$NAME_TYPE" "$NAME" "$COOKIE" "$2"
        ;;

    unpack)
        if [ -z "$2" ]; then
            echo "Missing package argument"
            echo "Usage: $REL_NAME $1 {package base name}"
            echo "NOTE {package base name} MUST NOT include the .tar.gz suffix"
            exit 1
        fi

        # Make sure a node IS running
        if ! nodetool "ping" > /dev/null; then
            echo "Node is not running!"
            exit 1
        fi

        exec "$BINDIR/escript" "$ROOTDIR/bin/install_upgrade.escript" \
             "unpack" "$REL_NAME" "$NAME_TYPE" "$NAME" "$COOKIE" "$2"
        ;;

    console|console_clean|console_boot)
        # .boot file typically just $REL_NAME (ie, the app name)
        # however, for debugging, sometimes start_clean.boot is useful.
        # For e.g. 'setup', one may even want to name another boot script.
        case "$1" in
            console)
                if [ -f "$REL_DIR/$REL_NAME.boot" ]; then
                  BOOTFILE="$REL_DIR/$REL_NAME"
                else
                  BOOTFILE="$REL_DIR/start"
                fi
                ;;
            console_clean)
                BOOTFILE="$ROOTDIR/bin/start_clean"
                ;;
            console_boot)
                shift
                BOOTFILE="$1"
                shift
                ;;
        esac
        # Setup beam-required vars
        EMU="beam"
        PROGNAME="${0#*/}"

        export EMU
        export PROGNAME

        # Store passed arguments since they will be erased by `set`
        ARGS="$@"

        # Start the VM, executing pre_start hook along
        # the way. We can't run the post_start hook because
        # the console will crash with no TTY attached
        [ -f "$PRE_START_HOOK" ] && . "$PRE_START_HOOK"

        __code_paths=$(_get_code_paths)
        # Build an array of arguments to pass to exec later on
        # Build it here because this command will be used for logging.
        set -- "$BINDIR/erlexec" \
            -boot "$BOOTFILE" \
            -boot_var ERTS_LIB_DIR "$ERTS_LIB_DIR" \
            -env ERL_LIBS "$REL_LIB_DIR" \
            -pa "$CONSOLIDATED_DIR" \
            ${__code_paths} \
            -args_file "$VMARGS_PATH" \
            -config "$SYS_CONFIG_PATH" \
            -mode "$CODE_LOADING_MODE" \
            ${ERL_OPTS} \
            -user Elixir.IEx.CLI \
            -extra --no-halt +iex

        # Dump environment info for logging purposes
        if [ ! -z $VERBOSE ]; then
            echo "Exec: $@" -- ${1+$ARGS} ${EXTRA_OPTS}
            echo "Root: $ROOTDIR"

            # Log the startup
            echo "$RELEASE_ROOT_DIR"
        fi;

        logger -t "$REL_NAME[$$]" "Starting up"

        exec "$@" -- ${1+$ARGS} ${EXTRA_OPTS}
        ;;

    foreground)
        # start up the release in the foreground for use by runit
        # or other supervision services

        [ -f "$REL_DIR/$REL_NAME.boot" ] && BOOTFILE="$REL_NAME" || BOOTFILE=start
        FOREGROUNDOPTIONS="-noshell -noinput +Bd"

        # Setup beam-required vars
        EMU=beam
        PROGNAME="${0#*/}"

        export EMU
        export PROGNAME

        # Store passed arguments since they will be erased by `set`
        ARGS="$@"

        # Start the VM, executing pre and post start hooks
        [ -f "$PRE_START_HOOK" ] && . "$PRE_START_HOOK"

        # Build an array of arguments to pass to exec later on
        # Build it here because this command will be used for logging.
        set -- "$BINDIR/erlexec" $FOREGROUNDOPTIONS \
            -boot "$REL_DIR/$BOOTFILE" \
            -boot_var ERTS_LIB_DIR "$ERTS_LIB_DIR" \
            -env ERL_LIBS "$REL_LIB_DIR" \
            -pa "$CONSOLIDATED_DIR" \
            -args_file "$VMARGS_PATH" \
            -config "$SYS_CONFIG_PATH" \
            -mode "$CODE_LOADING_MODE" \
            ${ERL_OPTS} \
            -extra ${EXTRA_OPTS}

        # Dump environment info for logging purposes
        if [ ! -z $VERBOSE ]; then
            echo "Exec: $@" -- ${1+$ARGS}
            echo "Root: $ROOTDIR"
        fi;

        "$@" -- ${1+$ARGS} &
        __bg_pid=$!
        [ -f "$POST_START_HOOK" ] && . "$POST_START_HOOK"
        wait $__bg_pid
        ;;
    rpc)
        # Make sure a node IS running
        if ! nodetool "ping" > /dev/null; then
            echo "Node is not running!"
            exit 1
        fi

        shift

        nodetool rpc $@
        ;;
    rpcterms)
        # Make sure a node IS running
        if ! nodetool "ping" > /dev/null; then
            echo "Node is not running!"
            exit 1
        fi

        shift

        nodetool rpcterms $@
        ;;
    eval)
        # Make sure a node IS running
        if ! nodetool "ping" > /dev/null; then
            echo "Node is not running!"
            exit 1
        fi

        shift
        nodetool "eval" $@
        ;;
    command)
        # Execute as command-line utility
        #
        # Like the escript command, this does not start the OTP application.
        # If your command depends on a running OTP application,
        # use
        #
        #     {:ok, _} = Application.ensure_all_started(:your_app)

        shift
        MODULE="$1"; shift
        FUNCTION="$1"; shift

        # Save extra arguments
        ARGS="$@"

        # Build arguments for erlexec
        set -- "$ERL_OPTS"
        [ "$SYS_CONFIG_PATH" ] && set -- "$@" -config "$SYS_CONFIG_PATH"
        set -- "$@" -boot_var ERTS_LIB_DIR "$ERTS_LIB_DIR"
        set -- "$@" -noshell
        set -- "$@" -boot start_clean
        set -- "$@" -s "$MODULE" "$FUNCTION"

        $BINDIR/erlexec $@ -extra $ARGS
        exit "$?"
        ;;
    *)
        __command_path="$REL_DIR/commands/$1"
        if [ -f "$__command_path" ]; then
            . "$__command_path"
        else
            echo "Usage: $REL_NAME {start|start_boot <file>|foreground|stop|restart|reboot|pid|ping|console|console_clean|console_boot <file>|attach|remote_console|upgrade|downgrade|install|escript|rpc|rpcterms|eval|command <module> <function> <args>}"
            exit 1
        fi
        ;;
esac

exit 0

#!/bin/sh

set -e

# Set VERBOSE to enable verbose logging of the boot script
#VERBOSE=true
if [ ! -z $DEBUG_BOOT ]; then
    set -x
fi;
# Disable flow control for run_erl
# Flow control can cause several problems. On Linux, if you
# accidentally hit Ctrl-S (instead of Ctrl-D to detach) and
# then some other key, the entire beam process will hang when
# attempting to write to stdout. On Solaris, the beam process
# will hang on writing if ScrollLock is on.
RUN_ERL_DISABLE_FLOWCNTRL="${RUN_ERL_DISABLE_FLOWCNTRL:-true}"
# Path to this script
SCRIPT=$(readlink $0 || true)
if [ -z $SCRIPT ]; then
    SCRIPT=$0
fi;
# Parent directory of this script
SCRIPT_DIR="$(cd `dirname "$SCRIPT"` && pwd -P)"
# Root directory of all releases
RELEASE_ROOT_DIR="$(cd "$SCRIPT_DIR/../.." && pwd -P)"
# Name of the release
REL_NAME="<%= release_name %>"
# Current version of the release
REL_VSN="<%= release_version %>"
# Current version of ERTS being used
# If this is not present/unset, it will be detected
<%= unless is_nil(erts_vsn) do %>ERTS_VSN="<%= erts_vsn %>"<% end %>
# VM code loading mode, embedded by default, can also be interactive
# See http://erlang.org/doc/man/code.html
CODE_LOADING_MODE="${CODE_LOADING_MODE:-embedded}"
# Path to start_erl.data
START_ERL_DATA="$RELEASE_ROOT_DIR/releases/start_erl.data"
# Directory containing the current version of this release
REL_DIR="$RELEASE_ROOT_DIR/releases/$REL_VSN"
# The lib directory for this release
REL_LIB_DIR="$RELEASE_ROOT_DIR/lib"
# Options passed to erl
ERL_OPTS="<%= release.profile.erl_opts %>"
# When stdout is piped to a file, this is the directory those files will
# be stored in. defaults to /log in the release root directory
RUNNER_LOG_DIR="${RUNNER_LOG_DIR:-$RELEASE_ROOT_DIR/log}"
# A string of extra options to pass to erl, here for plugins
EXTRA_OPTS=""

# Pre-start/stop event hook paths
PRE_START_HOOK="$REL_DIR/hooks/pre_start"
POST_START_HOOK="$REL_DIR/hooks/post_start"
PRE_STOP_HOOK="$REL_DIR/hooks/pre_stop"
POST_STOP_HOOK="$REL_DIR/hooks/post_stop"

# Get node pid
get_pid() {
    if output="$(nodetool rpcterms os getpid)"
    then
        echo "$output" | sed -e 's/"//g'
        return 0
    else
        echo "$output"
        return 1
    fi
}

# Generate a unique nodename
gen_nodename() {
    id="longname$(gen_id)-${NAME}"
    "$BINDIR/erl" -boot start_clean -eval '[Host] = tl(string:tokens(atom_to_list(node()),"@")), io:format("~s~n", [Host]), halt()' -noshell ${NAME_TYPE} $id
}

# Generate a random id
gen_id() {
    od -t x -N 4 /dev/urandom | head -n1 | awk '{print $2}'
}

# Control a node
# Use like `nodetool "ping"`
nodetool() {
    command="$1"; shift

    "$ERTS_DIR/bin/escript" "$ROOTDIR/bin/nodetool" "$NAME_TYPE" "$NAME" \
                            -setcookie "$COOKIE" "$command" $@
}

# Run an escript in the node's environment
# Use like `escript "path/to/escript"`
escript() {
    shift; scriptpath="$1"; shift
    export RELEASE_ROOT_DIR

    "$ERTS_DIR/bin/escript" "$ROOTDIR/$scriptpath" $@
}

# Private. For determining the version of ERTS available to the release
_detect_erts_vsn() {
    "$BINDIR/erl" -boot start_clean -eval 'Ver = erlang:system_info(version), io:format("~s~n", [Ver]), halt()' -noshell
}

# Private. Gets a list of code paths for this release
_get_code_paths() {
    "$ERTS_DIR/bin/escript" "$ROOTDIR/bin/release_utils.escript" "get_code_paths" "$ROOTDIR" "$ERTS_DIR" "$REL_DIR" "$REL_NAME"
}

# Private. For setting ERTS_DIR and ROOTDIR
_find_erts_dir() {
    __erts_dir="$RELEASE_ROOT_DIR/erts-$ERTS_VSN"
    if [ -d "$__erts_dir" ]; then
        ERTS_DIR="$__erts_dir";
        ROOTDIR="$RELEASE_ROOT_DIR"
    else
        __erl="$(which erl)"
        code="io:format(\"~s\", [code:root_dir()]), halt()."
        __erl_root="$("$__erl" -noshell -eval "$code")"
        ERTS_DIR="$__erl_root/erts-$ERTS_VSN"
        ROOTDIR="$__erl_root"
    fi
}

# Private. Open a shell on a remote node
_rem_sh() {
    # Generate a unique id used to allow multiple remsh to the same node
    # transparently
    id="remsh$(gen_id)-${NAME}"

    # Get the node's ticktime so that we use the same thing.
    TICKTIME="$(nodetool rpcterms net_kernel get_net_ticktime)"

    # Setup remote shell command to control node
    if [ ! -z "$USE_ERL_SHELL" ]; then
        exec "$BINDIR/erl" \
            -hidden \
            -boot start_clean -boot_var ERTS_LIB_DIR "$ERTS_LIB_DIR" \
            -kernel net_ticktime $TICKTIME \
            "$NAME_TYPE" "$id" -remsh "$NAME" -setcookie "$COOKIE"
    else
        __code_paths=$(_get_code_paths)
        exec "$BINDIR/erl" \
            -pa "$CONSOLIDATED_DIR" \
            ${__code_paths} \
            -hidden -noshell \
            -boot start_clean -boot_var ERTS_LIB_DIR "$ERTS_LIB_DIR" \
            -kernel net_ticktime $TICKTIME \
            -user Elixir.IEx.CLI "$NAME_TYPE" "$id" -setcookie "$COOKIE" \
            -extra --no-halt +iex -"$NAME_TYPE" "$id" --cookie "$COOKIE" --remsh "$NAME"
    fi
}

# Output a start command for the last argument of run_erl
_start_command() {
    printf "exec \"%s\" \"%s\" -- %s %s" "$RELEASE_ROOT_DIR/bin/$REL_NAME" \
           "$START_OPTION" "${ARGS}" "${EXTRA_OPTS}"
}

# If ERTS_VSN is not set, detect it
if [ -z "$ERTS_VSN" ]; then
    ERTS_VSN="$(_detect_erts_vsn)"
    echo "$ERTS_VSN $REL_VSN" > "$START_ERL_DATA"
fi

# Allow override of where to look for config files
# By default it's $CWD/
if [ -z "$RELEASE_CONFIG_DIR" ]; then
    RELEASE_CONFIG_DIR="$RELEASE_ROOT_DIR"
fi

# Set VMARGS_PATH, the path to the vm.args file to use
# Use $RELEASE_CONFIG_DIR/vm.args if exists, otherwise releases/VSN/vm.args
if [ -z "$VMARGS_PATH" ]; then
    if [ -f "$RELEASE_CONFIG_DIR/vm.args" ]; then
        VMARGS_PATH="$RELEASE_CONFIG_DIR/vm.args"
    else
        VMARGS_PATH="$REL_DIR/vm.args"
    fi
fi

orig_vmargs_path="$VMARGS_PATH.orig"
if [ $REPLACE_OS_VARS ]; then
    #Make sure we don't break dev mode by keeping the symbolic link to
    #the user's vm.args
    if [ ! -L "$orig_vmargs_path" ]; then
       #we're in copy mode, rename the vm.args file to vm.args.orig
       mv "$VMARGS_PATH" "$orig_vmargs_path"
    fi

    awk '{while(match($0,"[$]{[^}]*}")) {var=substr($0,RSTART+2,RLENGTH -3);gsub("[$]{"var"}",ENVIRON[var])}}1' < "$orig_vmargs_path" > "$VMARGS_PATH"
 else
    #We don't need to replace env. vars, just rename the
    #symlink vm.args.orig to vm.args, and keep it as a
    #symlink.
    if [ -L "$orig_vmargs_path" ]; then
       mv "$orig_vmargs_path" "$VMARGS_PATH"
    fi
fi

# Make sure log directory exists
mkdir -p "$RUNNER_LOG_DIR"

# Set SYS_CONFIG_PATH, the path to the sys.config file to use
# Use $RELEASE_CONFIG_DIR/sys.config if exists, otherwise releases/VSN/sys.config
if [ -z "$SYS_CONFIG_PATH" ]; then
    if [ -f "$RELEASE_CONFIG_DIR/sys.config" ]; then
        SYS_CONFIG_PATH="$RELEASE_CONFIG_DIR/sys.config"
    else
        SYS_CONFIG_PATH="$REL_DIR/sys.config"
    fi
fi

orig_sys_config_path="$SYS_CONFIG_PATH.orig"
if [ $REPLACE_OS_VARS ]; then
    #Make sure we don't break dev mode by keeping the symbolic link to
    #the user's sys.config
    if [ ! -L "$orig_sys_config_path" ]; then
       #We're in copy mode, rename sys.config to sys.config.orig
       mv "$SYS_CONFIG_PATH" "$orig_sys_config_path"
    fi

    awk '{while(match($0,"[$]{[^}]*}")) {var=substr($0,RSTART+2,RLENGTH -3);gsub("[$]{"var"}",ENVIRON[var])}}1' < "$orig_sys_config_path" > "$SYS_CONFIG_PATH"
 else
    #We don't need to replace env. vars, just rename the
    #symlink sys.config.orig to sys.config. Keep it as
    #a symlink.
    if [ -L "$orig_sys_config_path" ]; then
       mv "$orig_sys_config_path"  "$SYS_CONFIG_PATH"
    fi
fi

# Extract the target node name from node.args
# Should be `-sname somename` or `-name somename@somehost`
NAME_ARG=$(egrep '^-s?name' "$VMARGS_PATH" || true)
if [ -z "$NAME_ARG" ]; then
    echo "vm.args needs to have either -name or -sname parameter."
    exit 1
fi

# Extract the name type and name from the NAME_ARG for REMSH
# NAME_TYPE should be -name or -sname
NAME_TYPE="$(echo "$NAME_ARG" | awk '{print $1}')"
# NAME will be either `somename` or `somename@somehost`
NAME="$(echo "$NAME_ARG" | awk '{print $2}')"

# Where the pipe will be stored when using `start`
# This is used so you can attach the running application to the current
# shell using `attach`
PIPE_DIR="${PIPE_DIR:-$RELEASE_ROOT_DIR/tmp/erl_pipes/$NAME/}"

# Extract the target cookie
COOKIE_ARG="$(grep '^-setcookie' "$VMARGS_PATH" || true)"
DEFAULT_COOKIE_FILE="$HOME/.erlang.cookie"
if [ -z "$COOKIE_ARG" ]; then
    if [ -f "$DEFAULT_COOKIE_FILE" ]; then
        COOKIE="$(cat "$DEFAULT_COOKIE_FILE")"
    else
        printf "a secret cookie must be provided in one of the following ways:\n  - with vm.args using the -setcookie parameter,\n  or\n  by writing the cookie to '$DEFAULT_COOKIE_FILE', with permissions set to 0400"
        exit 1
    fi
else
    # Extract cookie name from COOKIE_ARG
    COOKIE="$(echo "$COOKIE_ARG" | awk '{print $2}')"
fi

_find_erts_dir
export ROOTDIR="$RELEASE_ROOT_DIR"
export BINDIR="$ERTS_DIR/bin"
export EMU="beam"
export PROGNAME="erl"
export LD_LIBRARY_PATH="$ERTS_DIR/lib:$LD_LIBRARY_PATH"
ERTS_LIB_DIR="$ERTS_DIR/../lib"
CONSOLIDATED_DIR="$ROOTDIR/lib/${REL_NAME}-${REL_VSN}/consolidated"

cd "$ROOTDIR"

# User can specify an sname without @hostname
# This will fail when creating remote shell
# So here we check for @ and add @hostname if missing
case $NAME in
    *@*)
        # Nothing to do
        ;;
    *)
        NAME=$NAME@$(gen_nodename)
        ;;
esac

# Check the first argument for instructions
case "$1" in
    start|start_boot)

        # Make sure there is not already a node running
        #RES=`$NODETOOL ping`
        #if [ "$RES" = "pong" ]; then
        #    echo "Node is already running!"
        #    exit 1
        #fi
        # Save this for later.
        CMD=$1
        case "$1" in
            start)
                shift
                START_OPTION="console"
                HEART_OPTION="start"
                ;;
            start_boot)
                shift
                START_OPTION="console_boot"
                HEART_OPTION="start_boot"
                ;;
        esac
        ARGS="$@"
        RUN_PARAM="$@"

        [ -f "$PRE_START_HOOK" ] && . "$PRE_START_HOOK"

        # Set arguments for the heart command
        set -- "$SCRIPT_DIR/$REL_NAME" "$HEART_OPTION"
        [ "$RUN_PARAM" ] && set -- "$@" "$RUN_PARAM"

        # Export the HEART_COMMAND
        HEART_COMMAND="$RELEASE_ROOT_DIR/bin/$REL_NAME $CMD"
        export HEART_COMMAND

        mkdir -p "$PIPE_DIR"

        "$BINDIR/run_erl" -daemon "$PIPE_DIR" "$RUNNER_LOG_DIR" \
                          "$(_start_command)"

        [ -f "$POST_START_HOOK" ] && . "$POST_START_HOOK"
        ;;

    stop)
        [ -f "$PRE_STOP_HOOK" ] && . "$PRE_STOP_HOOK"
        # Wait for the node to completely stop...
        PID="$(get_pid)"
        if ! nodetool "stop"; then
            exit 1
        fi
        while $(kill -s 0 "$PID" 2>/dev/null);
        do
            sleep 1
        done
        [ -f "$POST_STOP_HOOK" ] && . "$POST_STOP_HOOK"
        ;;

    restart)
        [ -f "$PRE_START_HOOK" ] && . "$PRE_START_HOOK"
        ## Restart the VM without exiting the process
        if ! nodetool "restart"; then
            exit 1
        fi
        ;;

    reboot)
        [ -f "$PRE_START_HOOK" ] && . "$PRE_START_HOOK"
        ## Restart the VM completely (uses heart to restart it)
        if ! nodetool "reboot"; then
            exit 1
        fi
        ;;

    pid)
        ## Get the VM's pid
        if ! get_pid; then
            exit 1
        fi
        ;;

    ping)
        ## See if the VM is alive
        if ! nodetool "ping"; then
            exit 1
        fi
        ;;

    escript)
        ## Run an escript under the node's environment
        if ! escript $@; then
            exit 1
        fi
        ;;

    attach)
        # Make sure a node IS running
        if ! nodetool "ping" > /dev/null; then
            echo "Node is not running!"
            exit 1
        fi

        shift
        exec "$BINDIR/to_erl" "$PIPE_DIR"
        ;;

    remote_console)
        # Make sure a node IS running
        if ! nodetool "ping" > /dev/null; then
            echo "Node is not running!"
            exit 1
        fi

        shift
        _rem_sh
        ;;

    upgrade|downgrade|install)
        if [ -z "$2" ]; then
            echo "Missing package argument"
            echo "Usage: $REL_NAME $1 {package base name}"
            echo "NOTE {package base name} MUST NOT include the .tar.gz suffix"
            exit 1
        fi

        # Make sure a node IS running
        if ! nodetool "ping" > /dev/null; then
            echo "Node is not running!"
            exit 1
        fi

        exec "$BINDIR/escript" "$ROOTDIR/bin/install_upgrade.escript" \
             "install" "$REL_NAME" "$NAME_TYPE" "$NAME" "$COOKIE" "$2"
        ;;

    unpack)
        if [ -z "$2" ]; then
            echo "Missing package argument"
            echo "Usage: $REL_NAME $1 {package base name}"
            echo "NOTE {package base name} MUST NOT include the .tar.gz suffix"
            exit 1
        fi

        # Make sure a node IS running
        if ! nodetool "ping" > /dev/null; then
            echo "Node is not running!"
            exit 1
        fi

        exec "$BINDIR/escript" "$ROOTDIR/bin/install_upgrade.escript" \
             "unpack" "$REL_NAME" "$NAME_TYPE" "$NAME" "$COOKIE" "$2"
        ;;

    console|console_clean|console_boot)
        # .boot file typically just $REL_NAME (ie, the app name)
        # however, for debugging, sometimes start_clean.boot is useful.
        # For e.g. 'setup', one may even want to name another boot script.
        case "$1" in
            console)
                if [ -f "$REL_DIR/$REL_NAME.boot" ]; then
                  BOOTFILE="$REL_DIR/$REL_NAME"
                else
                  BOOTFILE="$REL_DIR/start"
                fi
                ;;
            console_clean)
                BOOTFILE="$ROOTDIR/bin/start_clean"
                ;;
            console_boot)
                shift
                BOOTFILE="$1"
                shift
                ;;
        esac
        # Setup beam-required vars
        EMU="beam"
        PROGNAME="${0#*/}"

        export EMU
        export PROGNAME

        # Store passed arguments since they will be erased by `set`
        ARGS="$@"

        # Start the VM, executing pre_start hook along
        # the way. We can't run the post_start hook because
        # the console will crash with no TTY attached
        [ -f "$PRE_START_HOOK" ] && . "$PRE_START_HOOK"

        __code_paths=$(_get_code_paths)
        # Build an array of arguments to pass to exec later on
        # Build it here because this command will be used for logging.
        set -- "$BINDIR/erlexec" \
            -boot "$BOOTFILE" \
            -boot_var ERTS_LIB_DIR "$ERTS_LIB_DIR" \
            -env ERL_LIBS "$REL_LIB_DIR" \
            -pa "$CONSOLIDATED_DIR" \
            ${__code_paths} \
            -args_file "$VMARGS_PATH" \
            -config "$SYS_CONFIG_PATH" \
            -mode "$CODE_LOADING_MODE" \
            ${ERL_OPTS} \
            -user Elixir.IEx.CLI \
            -extra --no-halt +iex

        # Dump environment info for logging purposes
        if [ ! -z $VERBOSE ]; then
            echo "Exec: $@" -- ${1+$ARGS} ${EXTRA_OPTS}
            echo "Root: $ROOTDIR"

            # Log the startup
            echo "$RELEASE_ROOT_DIR"
        fi;

        logger -t "$REL_NAME[$$]" "Starting up"

        exec "$@" -- ${1+$ARGS} ${EXTRA_OPTS}
        ;;

    foreground)
        # start up the release in the foreground for use by runit
        # or other supervision services

        [ -f "$REL_DIR/$REL_NAME.boot" ] && BOOTFILE="$REL_NAME" || BOOTFILE=start
        FOREGROUNDOPTIONS="-noshell -noinput +Bd"

        # Setup beam-required vars
        EMU=beam
        PROGNAME="${0#*/}"

        export EMU
        export PROGNAME

        # Store passed arguments since they will be erased by `set`
        ARGS="$@"

        # Start the VM, executing pre and post start hooks
        [ -f "$PRE_START_HOOK" ] && . "$PRE_START_HOOK"

        # Build an array of arguments to pass to exec later on
        # Build it here because this command will be used for logging.
        set -- "$BINDIR/erlexec" $FOREGROUNDOPTIONS \
            -boot "$REL_DIR/$BOOTFILE" \
            -boot_var ERTS_LIB_DIR "$ERTS_LIB_DIR" \
            -env ERL_LIBS "$REL_LIB_DIR" \
            -pa "$CONSOLIDATED_DIR" \
            -args_file "$VMARGS_PATH" \
            -config "$SYS_CONFIG_PATH" \
            -mode "$CODE_LOADING_MODE" \
            ${ERL_OPTS} \
            -extra ${EXTRA_OPTS}

        # Dump environment info for logging purposes
        if [ ! -z $VERBOSE ]; then
            echo "Exec: $@" -- ${1+$ARGS}
            echo "Root: $ROOTDIR"
        fi;

        "$@" -- ${1+$ARGS} &
        __bg_pid=$!
        [ -f "$POST_START_HOOK" ] && . "$POST_START_HOOK"
        wait $__bg_pid
        ;;
    rpc)
        # Make sure a node IS running
        if ! nodetool "ping" > /dev/null; then
            echo "Node is not running!"
            exit 1
        fi

        shift

        nodetool rpc $@
        ;;
    rpcterms)
        # Make sure a node IS running
        if ! nodetool "ping" > /dev/null; then
            echo "Node is not running!"
            exit 1
        fi

        shift

        nodetool rpcterms $@
        ;;
    eval)
        # Make sure a node IS running
        if ! nodetool "ping" > /dev/null; then
            echo "Node is not running!"
            exit 1
        fi

        shift
        nodetool "eval" $@
        ;;
    command)
        # Execute as command-line utility
        #
        # Like the escript command, this does not start the OTP application.
        # If your command depends on a running OTP application,
        # use
        #
        #     {:ok, _} = Application.ensure_all_started(:your_app)

        shift
        MODULE="$1"; shift
        FUNCTION="$1"; shift

        # Save extra arguments
        ARGS="$@"

        # Build arguments for erlexec
        set -- "$ERL_OPTS"
        [ "$SYS_CONFIG_PATH" ] && set -- "$@" -config "$SYS_CONFIG_PATH"
        set -- "$@" -boot_var ERTS_LIB_DIR "$ERTS_LIB_DIR"
        set -- "$@" -noshell
        set -- "$@" -boot start_clean
        set -- "$@" -s "$MODULE" "$FUNCTION"

        $BINDIR/erlexec $@ -extra $ARGS
        exit "$?"
        ;;
    *)
        __command_path="$REL_DIR/commands/$1"
        if [ -f "$__command_path" ]; then
            . "$__command_path"
        else
            echo "Usage: $REL_NAME {start|start_boot <file>|foreground|stop|restart|reboot|pid|ping|console|console_clean|console_boot <file>|attach|remote_console|upgrade|downgrade|install|escript|rpc|rpcterms|eval|command <module> <function> <args>}"
            exit 1
        fi
        ;;
esac

exit 0


html fixes

html fixes

Transaction Information

  <span class="fa <%= get_icon(@transaction.type) %>">
  <%= get_type(@transaction.type) %>
  | Hash:
  <%= @transaction.txid %>

<a href="<%= transactions_path(@conn, :index) %>" alt="Back to all transactions" title="Back to all transactions" class="back-link"><%= gettext "Back to all transactions" %>

      <%= if @transaction.type == "ClaimTransaction" do %>

<%= gettext "Claimed from" %>

        <%= for input <- @transaction.claims do %>

            <a href="<%= address_path(@conn, :index, input.address_hash)%>" alt="View wallet address" title="View wallet address" class="large-blue-link wallet-address"><%= input.address_hash %>

<%= Helpers.round_or_not(input.value) %> <%= Api.get_asset_name(input.asset) %>

        <% end %>
      <% end %>
      <%= if @transaction.type != "ClaimTransaction" and @transaction.vin != []  do %>

<%= gettext "Sent from" %>

        <%= for input <- @transaction.vin do %>

    				<a href="<%= address_path(@conn, :index, input.address_hash)%>" alt="View wallet address" title="View wallet address" class="large-blue-link wallet-address"><%= input.address_hash %>

<%= Helpers.round_or_not(input.value) %> <%= Api.get_asset_name(input.asset) %>

        <% end %>
      <% end %>

		<img src="<%= static_path(@conn, "/images/ICON_Sent-arrow.svg")%>" alt="Sent arrow" title="Sent arrow" class="transaction-sent-arrow" />

      <%= if @transaction.vouts != [] do %>

<%= gettext "Sent to" %>

        <%= for vout <- @transaction.vouts do %>

    				<a href="<%= address_path(@conn, :index, vout.address_hash)%>" alt="View wallet address" title="View wallet address" class="large-blue-link wallet-address"><%= vout.address_hash %>

<%= Helpers.round_or_not(vout.value) %> <%= Api.get_asset_name(vout.asset) %>

        <% end %>
      <% end %>
      <%= if @transaction.type == "RegisterTransaction" do %>

<%= gettext "Registered" %>

          <a href="<%= address_path(@conn, :index, @transaction.asset.admin)%>" alt="View wallet address" title="View wallet address" class="large-blue-link wallet-address"><%= @transaction.asset.admin %>

<%= Helpers.round_or_not(@transaction.asset.amount) %> <%= Api.get_asset_name(@transaction.txid) %>

      <% end %>

<%= gettext "Time" %>

<%= compare_time_and_get_minutes(@transaction.time) %>

      <%= get_explanation("transaction_time") %>

<%= gettext "Network Fee" %>

<%= @transaction.net_fee %>

      <%= get_explanation("transaction_network_fees") %>

<%= gettext "System Fee" %>

<%= @transaction.sys_fee %>

      <%= get_explanation("transaction_system_fees") %>

<%= gettext "Included in Block" %>

<a href="<%= block_path( @conn, :index, @transaction.block_hash) %>" alt="View transaction" title="View transaction" class="large-blue-link col-4-width"><%= @transaction.block_height %>

<%= gettext "Size" %>

<%= @transaction.size %> <%= gettext "bytes" %>

      <%= get_explanation("transaction_size") %>

<%= gettext "Bytecode Invocation Script" %>

      <%= get_explanation("bytecode_invocation_script") %>

			<%= for script <- @transaction.scripts do %>

<%= get_inv(script) %>

			<% end %>

<%= gettext "Bytecode Verification Script" %>

      <%= get_explanation("bytecode_verification_script") %>

			<%= for script <- @transaction.scripts do %>

<%= get_ver(script) %>

			<% end %>

<%= if @transaction.attributes != [] do %>

 <%= gettext "Bytecode Attributes" %>
		<%= for att <- @transaction.attributes do %>

<%= gettext "Usage: " %> <%=att["usage"]%>

<%= att["data"] %>

		<% end %>

<% end %>

<%= if @transaction.script != nil do %>

<%= gettext "Bytecode Script" %>

<%= @transaction.script %>

<% end %>

<%= gettext "Opcode Invocation Script" %>

      <%= get_explanation("opcode_invocation_script") %>

        <%= for script <- @transaction.scripts do %>
          <%= for operation <- parse_invocation(script) do %>
            <%= operation %>
          <% end %>
        <% end %>

<%= gettext "Opcode Verification Script" %>

      <%= get_explanation("opcode_verification_script") %>

        <%= for script <- @transaction.scripts do %>
          <%= for operation <- parse_verification(script) do %>
            <%= operation %>
          <% end %>
        <% end %>

<%= if @transaction.attributes != [] do %>

 <%= gettext "Opcode Attributes" %>
		<%= for att <- @transaction.attributes do %>

<%= gettext "Usage:" %> <%=att["usage"]%>

<%= Disassembler.parse_script(att["data"]) %>

		<% end %>

<% end %>

<%= if @transaction.script != nil do %>

<%= gettext "Opcode Script" %>

<%= Disassembler.parse_script(@transaction.script) %>

<% end %>

Transaction Information

  <span class="fa <%= get_icon(@transaction.type) %>">
  <%= get_type(@transaction.type) %>
  | Hash:
  <%= @transaction.txid %>

<a href="<%= transactions_path(@conn, :index) %>" alt="Back to all transactions" title="Back to all transactions" class="back-link"><%= gettext "Back to all transactions" %>

      <%= if @transaction.type == "ClaimTransaction" do %>

<%= gettext "Claimed from" %>

        <%= for input <- @transaction.claims do %>

            <a href="<%= address_path(@conn, :index, input.address_hash)%>" alt="View wallet address" title="View wallet address" class="large-blue-link wallet-address"><%= input.address_hash %>

<%= Helpers.round_or_not(input.value) %> <%= Api.get_asset_name(input.asset) %>

        <% end %>
      <% end %>
      <%= if @transaction.type != "ClaimTransaction" and @transaction.vin != []  do %>

<%= gettext "Sent from" %>

        <%= for input <- @transaction.vin do %>

    				<a href="<%= address_path(@conn, :index, input.address_hash)%>" alt="View wallet address" title="View wallet address" class="large-blue-link wallet-address"><%= input.address_hash %>

<%= Helpers.round_or_not(input.value) %> <%= Api.get_asset_name(input.asset) %>

        <% end %>
      <% end %>

		<img src="<%= static_path(@conn, "/images/ICON_Sent-arrow.svg")%>" alt="Sent arrow" title="Sent arrow" class="transaction-sent-arrow" />

      <%= if @transaction.vouts != [] do %>

<%= gettext "Sent to" %>

        <%= for vout <- @transaction.vouts do %>

    				<a href="<%= address_path(@conn, :index, vout.address_hash)%>" alt="View wallet address" title="View wallet address" class="large-blue-link wallet-address"><%= vout.address_hash %>

<%= Helpers.round_or_not(vout.value) %> <%= Api.get_asset_name(vout.asset) %>

        <% end %>
      <% end %>
      <%= if @transaction.type == "RegisterTransaction" do %>

<%= gettext "Registered" %>

          <a href="<%= address_path(@conn, :index, @transaction.asset.admin)%>" alt="View wallet address" title="View wallet address" class="large-blue-link wallet-address"><%= @transaction.asset.admin %>

<%= Helpers.round_or_not(@transaction.asset.amount) %> <%= Api.get_asset_name(@transaction.txid) %>

      <% end %>

<%= gettext "Time" %>

<%= compare_time_and_get_minutes(@transaction.time) %>

      <%= get_explanation("transaction_time") %>

<%= gettext "Network Fee" %>

<%= @transaction.net_fee %>

      <%= get_explanation("transaction_network_fees") %>

<%= gettext "System Fee" %>

<%= @transaction.sys_fee %>

      <%= get_explanation("transaction_system_fees") %>

<%= gettext "Included in Block" %>

<a href="<%= block_path( @conn, :index, @transaction.block_hash) %>" alt="View transaction" title="View transaction" class="large-blue-link col-4-width"><%= @transaction.block_height %>

<%= gettext "Size" %>

<%= @transaction.size %> <%= gettext "bytes" %>

      <%= get_explanation("transaction_size") %>

<%= gettext "Bytecode Invocation Script" %>

      <%= get_explanation("bytecode_invocation_script") %>

			<%= for script <- @transaction.scripts do %>

<%= get_inv(script) %>

			<% end %>

<%= gettext "Bytecode Verification Script" %>

      <%= get_explanation("bytecode_verification_script") %>

			<%= for script <- @transaction.scripts do %>

<%= get_ver(script) %>

			<% end %>

<%= if @transaction.attributes != [] do %>

 <%= gettext "Bytecode Attributes" %>
		<%= for att <- @transaction.attributes do %>

<%= gettext "Usage" %> <%=att["usage"]%>

<%= att["script"] %>

		<% end %>

<% end %>

<%= if @transaction.script != nil do %>

<%= gettext "Bytecode Script" %>

<%= @transaction.script %>

<% end %>

<%= gettext "Opcode Invocation Script" %>

      <%= get_explanation("opcode_invocation_script") %>

        <%= for script <- @transaction.scripts do %>
          <%= for operation <- parse_invocation(script) do %>
            <%= operation %>
          <% end %>
        <% end %>

<%= gettext "Opcode Verification Script" %>

      <%= get_explanation("opcode_verification_script") %>

        <%= for script <- @transaction.scripts do %>
          <%= for operation <- parse_verification(script) do %>
            <%= operation %>
          <% end %>
        <% end %>

<%= if @transaction.attributes != [] do %>

 <%= gettext "Opcode Attributes" %>
		<%= for att <- @transaction.attributes do %>

<%= gettext "Usage" %> <%=att["usage"]%>

<%= Disassembler.parse_script(att["data"]) %>

		<% end %>

<% end %>

<%= if @transaction.script != nil do %>

<%= gettext "Opcode Script" %>

<%= Disassembler.parse_script(@transaction.script) %>

<% end %>


fix: no plenking

fix: no plenking

<%= @reply.title %>

			<a rel="author" href="<%= @reply.author_url %>"><img alt="" class="u-photo avatar" src="<%= cache_path(@conn, :show, url: @reply.author_avatar) %>">
      <a class="p-name u-url" rel="author" href="<%= @reply.author_url %>"><%= @reply.author %>,

    <time class="dt-published" datetime="<%= Wwwtech.Mention.inserted_at_timex(@reply) |> DateFormat.format!("%FT%T%:z", :strftime) %>">
      <a class="u-url" href="<%= @reply.source_url %>"><%= Wwwtech.LayoutView.time_ago_in_words(Wwwtech.Mention.inserted_at_timex(@reply)) %>
    </time>

<%= @reply.excerpt %>

<%= @reply.title %>

			<a rel="author" href="<%= @reply.author_url %>"><img alt="" class="u-photo avatar" src="<%= cache_path(@conn, :show, url: @reply.author_avatar) %>">
      <a class="p-name u-url" rel="author" href="<%= @reply.author_url %>"><%= @reply.author %>
    ,

    <time class="dt-published" datetime="<%= Wwwtech.Mention.inserted_at_timex(@reply) |> DateFormat.format!("%FT%T%:z", :strftime) %>">
      <a class="u-url" href="<%= @reply.source_url %>"><%= Wwwtech.LayoutView.time_ago_in_words(Wwwtech.Mention.inserted_at_timex(@reply)) %>
    </time>

<%= @reply.excerpt %>


Fix title of login page

Fix title of login page

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>ExMoney Signin</title>

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

  <body>
    <div class="container">
      <%= render @view_module, @view_template, assigns %>
    </div>
  </body>
</html>

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>Signin Template for Bootstrap</title>

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

  <body>
    <div class="container">
      <%= render @view_module, @view_template, assigns %>
    </div>
  </body>
</html>


add no index tag #45

add no index tag #45

<!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="robots" content="noindex">

    <title>Action for Children</title>
    <link href="https://fonts.googleapis.com/css?family=Rubik:400,500" rel="stylesheet">
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">

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

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

      <%= if @conn.assigns.user do %>
        <%= link "logout", to: session_path(@conn, :delete, @conn.assigns.user), method: "delete", class: "no-underline db dark-red absolute right-1" %>
      <% end %>

        <%= 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>Action for Children</title>
    <link href="https://fonts.googleapis.com/css?family=Rubik:400,500" rel="stylesheet">
    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">

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

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

      <%= if @conn.assigns.user do %>
        <%= link "logout", to: session_path(@conn, :delete, @conn.assigns.user), method: "delete", class: "no-underline db dark-red absolute right-1" %>
      <% end %>

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


double the margin-top on the footer

double the margin-top on the footer

                <img src="<%=  Routes.static_path(@conn, "/images/eef-logo-transparent-inverted.png") %>" width="75" height="75" alt="">

Supporting the BEAM community

Links

                        <form action="https://ErlangEcosystemFoundation.wildapricot.org/sys/login/OAuthLogin"
                            method="get" class="mt-2">
                          <input type="hidden" name="scope" value="contacts_me" />
                          <input type="hidden" name="client_id" value="5fl5gzaiih" />
                          <input type="hidden" name="response_type" value="authorization_code" />
                          <input type="hidden" name="claimed_account_id" value="292325" />
                          <input type="hidden" name="state" value="WaWpIntegrationLogin" />
                          <input type="hidden" name="redirect_uri" value="https://erlef.org/" />
                          <input type="submit" name="waLoginAction"
                                             style="padding: 0px;
                                                    background:
                                                    none;border: none;
                                                    color: rgba(255, 255, 255, 0.7);
                                                    text-decoration: underline;
                                                    cursor: pointer;"
                                             value="Membership details" title="Login" />
                      </form>

Join us!

Sponsors

Become a sponsor!

Working Groups

Grants

News

Events

Contact

Bylaws

FAQ

Recent Tweets

                      Tweets by TheErlef

                  <% now = DateTime.utc_now() %>

Upcoming events

                  <%= for event <- @events  do %>
                    <% {:ok, date, _offset} = DateTime.from_iso8601(event["datetime"]) %>
                    <%= if Timex.diff(now, date, :months) == 0 do %>

                        <a href="<%= event["url"] %>"><%= event["title"] %>

                    <% end %>
                  <% end %>

This work is licensed under a
       Creative Commons Attribution-ShareAlike 4.0 International License.


use a default color that matches steem/golos palette

  <%= for post <- @posts do %>
  <% img_src = hd(post.json_metadata["image"]) %>

        <a href="/posts/<%= post.permlink %>"> <img src="<%= img_src %>">
        <%= post.category %>

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

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

            <% end %>

  <% end %>

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

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

      <% end %>


Change elixirstatus -> ElixirStatus

Change elixirstatus -> ElixirStatus

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

ElixirStatus

<%= gettext "Announce your new project, blog post or version update." %>

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

      <%= gettext "Home" %>
      <%= if logged_in?(@conn) do %>
        <a class="sidebar-nav-item" href="<%= posting_path(@conn, :user, current_user(@conn).user_name) %>"><%= gettext "Your posts" %>
      <% end %>
      <a class="sidebar-nav-item" href="<%= page_path(@conn, :about) %>"><%= gettext "About" %>
      <%= gettext "You can follow via" %>
      NEW! ElixirWeekly
      Twitter
      RSS
      <%= gettext "Running on Phoenix!" %>
      <%= gettext "Open Source" %>

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

elixirstatus

<%= gettext "Announce your new project, blog post or version update." %>

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

      <%= gettext "Home" %>
      <%= if logged_in?(@conn) do %>
        <a class="sidebar-nav-item" href="<%= posting_path(@conn, :user, current_user(@conn).user_name) %>"><%= gettext "Your posts" %>
      <% end %>
      <a class="sidebar-nav-item" href="<%= page_path(@conn, :about) %>"><%= gettext "About" %>
      <%= gettext "You can follow via" %>
      NEW! ElixirWeekly
      Twitter
      RSS
      <%= gettext "Running on Phoenix!" %>
      <%= gettext "Open Source" %>


Make participant info smaller in schedule performance items

<div
  class="schedule-item"
  title="<%= appearances_info(@performance) %>"
  data-cc-id="<%= @performance.contest_category.id %>"
  data-id="<%= @performance.id %>"
  data-minutes="<%= scheduled_minutes(@performance) %>"
  style="height: <%= item_height(@performance) %>"
  >

    <%= format_datetime(@performance.stage_time, :time) %>

        <%= short_category_info(@performance) %>

        <%= formatted_duration(@performance) %>

    <%= if scheduled_minutes(@performance) >= 10 and @round > 0 do %>

        <%= short_participant_info(@performance) %>

    <% end %>

  <div
    class="playtime-bar"
    style="height: <%= playtime_percentage(@performance) %>"
    >


display datetimes consistently for articles and comments

Oh, wie schön ist... Kanada!

    <%= for article <- @articles do %>

<%= link article.title, to: article_path(@conn, :show, article) %> <%= formatted_datetime(article.inserted_at) %>

      <% end %>

Oh, wie schön ist... Kanada!

    <%= for article <- @articles do %>

<%= link article.title, to: article_path(@conn, :show, article) %> <%= formatted_datetime(article.inserted_at) %> Uhr

      <% end %>


Fixing empty resource lists in resource/list.html

<%= if @tag do %>

tag: <%= @tag %>

<a href='<%=
  ParamSession.gen_url(@conn, "/resource/tag-cloud")
  %>' class="btn">Back to tag cloud

  <%= for resource <- (@resources.true || []) do %>

<a href="<%=
      ParamSession.gen_url(@conn, "/resource/review/#{resource.id}?list=true")
      %>"><%= resource.name %>

  <% end %>

<% #--------------------------------------------------------------- %>

<%= else %>

Resources contributed by MOOC learners

<a href="<%=
  ParamSession.gen_url(@conn, "/resource/tag-cloud")
  %>" class="btn">See resources from my SIG in a tag cloud

Resources from your SIG

  <%= for resource <- (@resources.true || []) do %>

<a href="<%=
      ParamSession.gen_url(@conn, "/resource/review/#{resource.id}?list=true")
      %>"><%= resource.name %>

  <% end %>

Generic resources from other SIGs

  <%= for resource <- (@resources.false || []) do %>

<a href="<%=
      ParamSession.gen_url(@conn, "/resource/review/#{resource.id}?list=true")
      %>"><%= resource.name %>

  <% end %>

<% end %>

<%= if @tag do %>

tag: <%= @tag %>

<a href='<%=
  ParamSession.gen_url(@conn, "/resource/tag-cloud")
  %>' class="btn">Back to tag cloud

<%= for resource <- @resources.true do %>

<a href="<%=
    ParamSession.gen_url(@conn, "/resource/review/#{resource.id}?list=true")
    %>"><%= resource.name %>

<% end %>

<%= else %>

Resources contributed by MOOC learners

<a href="<%=
    ParamSession.gen_url(@conn, "/resource/tag-cloud")
    %>" class="btn">See resources from my SIG in a tag cloud

Resources from your SIG

<%= for resource <- @resources.true do %>

<a href="<%=
    ParamSession.gen_url(@conn, "/resource/review/#{resource.id}?list=true")
    %>"><%= resource.name %>

<% end %>

Generic resources from other SIGs

<%= for resource <- @resources.false do %>

<a href="<%=
    ParamSession.gen_url(@conn, "/resource/review/#{resource.id}?list=true")
    %>"><%= resource.name %>

<% end %>

<% end %>


Show company name with member

Show company name with member

<%= @member.name %>

Member with <%= link @company.name, to: company_path(@conn, :show, @company) %>

    Email:
    <%= @member.email %>

    Phone:
    <%= @member.phone %>

    Active:
    <%= @member.active %>

<%= link "Edit", to: company_member_path(@conn, :edit, @company, @member) %>
|
<%= link "Back", to: company_member_path(@conn, :index, @company) %>
|
<%= link "Delete", to: company_member_path(@conn, :delete, @company, @member), method: :delete, data: [confirm: "Are you sure?"], class: "btn btn-danger btn-xs" %>

Show member

    Name:
    <%= @member.name %>

    Email:
    <%= @member.email %>

    Phone:
    <%= @member.phone %>

    Active:
    <%= @member.active %>

<%= link "Edit", to: company_member_path(@conn, :edit, @company, @member) %>
|
<%= link "Back", to: company_member_path(@conn, :index, @company) %>
|
<%= link "Delete", to: company_member_path(@conn, :delete, @company, @member), method: :delete, data: [confirm: "Are you sure?"], class: "btn btn-danger btn-xs" %>


Add navbar to app layout

Add navbar to app layout

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

          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            Toggle navigation

          </button>
          PullHub

            <%= if @user do %>

                <%= link "Repositories", to: repository_path(@conn, :index) %>

            <% end %>

            <%= if @user do %>

                <%= link "Log out", to: auth_path(@conn, :delete), method: :delete %>

            <%= else %>

                <%= link "Login", to: auth_path(@conn, :request, :github) %>

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

Get Started

            <%= if @user do %>

                <%= link "Log out", to: auth_path(@conn, :delete), method: :delete %>

            <%= else %>

                <%= link "Login", to: auth_path(@conn, :request, :github) %>

            <% end %>

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

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

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