Only show coc link input on grant form if required

Congrats!

Expect a copy of your grant proposal coming from eef-grant-submissions@beam.eco

Grant request process

          Intro
          FAQ
          Form

Introduction

The current focus of the foundation is on increasing and
              expanding the
              community so we will favour grants that are targeted to
              beneficiaries that
              are new to Erlang/Elixir and the ecosystem. We prefer grants that
              support
              online workshops, online training materials, hands-on trainings,
              development
              work (open source) and diversity efforts. On non-beam focused
              events where
              there is a clear Beam language component of the event, the grant
              will only
              support the Beam language component of the event. The EEF will
              consider
              supporting a hackathon if the event has hands-on Beam languages
              education
              for a minimum of 6 hours. We will not fund prizes for hackathons
              or swag.

We recommend that you submit grant proposals via our form at
              least 12
              weeks prior to the event. Proposals should be concise and have a
              clear
              objective. We encourage those applying for funding to try and get
              sponsorship
              from corporations or local sponsors as we want to encourage
              sustainable, long
              term relationships with them.

The EEF could limit the number of events per organizer and/or
              city that are
              granted within a given year. If you have any questions reach out
              to
              education@erlef.org

FAQ

                          <button class="btn btn-link" type="button"
                            data-toggle="collapse"
                            data-target="#accordion-tab-1-content-1"
                            aria-expanded="false"
                            aria-controls="accordion-tab-1-content-1"> When
                            should I submit my grant request?</button>

                          We recommend that grant requests be submitted at least
                          12 weeks before the funding is needed.

                          <button class="btn btn-link" type="button"
                            data-toggle="collapse"
                            data-target="#accordion-tab-1-content-2"
                            aria-expanded="false"
                            aria-controls="accordion-tab-1-content-2">What grant
                            can I ask for organizing a
                            conference?</button>

The maximum conference grant size is typically
                            around 10 USD per
                            attendee. We prefer to help new events get
                            established in their community
                            and we encourage them to apply for different funding
                            local options as well.
                            Bigger conferences might be assigned a lower amount
                            per attendee.
                            Educational programs run within the conference
                            should request a separate
                            budget.

                          <button class="btn btn-link" type="button"
                            data-toggle="collapse"
                            data-target="#accordion-tab-1-content-3"
                            aria-expanded="false"
                            aria-controls="accordion-tab-1-content-3">
                            I am organizing a workshop. What grant can I ask
                            for?
                          </button>

Our maximum educational program grant size is
                            typically USD 25 per
                            student, provided the students each receive at least
                            6 hours of BEAM
                            languages instruction as part of it, however we are
                            open to
                            review this amount on a case by case basis. Please
                            note that
                            subsequent requests for workshops in the same area
                            may be
                            funded at a lower rate to encourage sustainable,
                            long-term
                            relationships with local sponsors.

When submitting your workshop grant request, it
                            helps us to see a brief budget as this example:

                              Items
                              Unit Cost
                              Quantity
                              Total Cost

                                Lunch and drinks
                                9
                                50
                                450

                                Travel expenses
                                20
                                3
                                60

                                Hotel expenses
                                50
                                2
                                100

                                Total

                                610

<button class="btn btn-link" type="button"
                            data-toggle="collapse"
                            data-target="#accordion-tab-1-content-4"
                            aria-expanded="false"
                            aria-controls="accordion-tab-1-content-4">
                            Is there a maximum grant size that can be
                            awarded?</button>

There is no maximum, however bear in mind that the
                            foundation has a limited budget and we reserve the
                            right of giving a grant smaller than requested, let
                            us know if this is a problem for you.

Grant Proposal Form

  <%= form_for @conn, Routes.grant_path(@conn, :create), [id: "grant_form", multipart: true, class: "dropzone"], fn _f -> %>

                  * First name
                  <input type="text" name="first_name" class="form-control"
                    id="first_name" placeholder="First name" required>

                  * Last name
                  <input type="text" class="form-control"
                    id="last_name" name="last_name" placeholder="Last name" required>

                  * Nick Name

                    <input type="text" class="form-control" name="nick_name"
                      id="nick_name" placeholder="Nick Name"
                      aria-describedby="inputGroupPrepend3" required>

                  * Email address
                  <input type="email" name="email_address" class="form-control"
                    id="email_address" aria-describedby="emailHelp"
                    placeholder="Enter email" required>

                  * Phone Number
                  <input type="text" name="phone_number" class="form-control" id="phone_number"
                    placeholder="Phone Number" required>

                  Organization Name
                  <input type="text" name="org_name" class="form-control" id="org_name"
                    placeholder="Organization Name">

                  Organization Email
                  <input type="text" name="org_email" class="form-control" id="org_email"
                    placeholder="Organization Email">

                  * City
                  <input type="text"  name="city" class="form-control"
                    id="city" placeholder="City" required>

                    Please provide a valid city.

                  * Country Subdivision
                  <input type="text" name="province" class="form-control"
                                                     id="province" placeholder="Province" required>
                  ISO 3166-2 code for your country's subdivsion (e.g., state or province)

                  * Postal Code
                  <input type="text" name="postal_code" class="form-control"
                    id="postal_code" placeholder="Postal Code" required>

                  * Country
                  <input type="text" name="country" class="form-control"
                                                    id="country" placeholder="Country" required>
                  ISO 3166-1 for your country

                  Twitter Handle
                  <input type="text" name="twitter" class="form-control" id="twitter"
                    placeholder="Twitter Handle">

                  LinkedIn
                  <input type="text" class="form-control" name="linkedin" id="linkedin"
                    placeholder="LinkedIn">

                  WebSite
                  <input type="text" class="form-control" name="website" id="website"
                    placeholder="WebSite" required>

                  * Small Bio
                  <textarea class="form-control"
                            id="bio" rows="3"
                                     name="bio"
                                     maxlength="5000"
                    placeholder="Small Bio" required></textarea>

                  * Grant Type
                  <select name="grant_type" class="form-control" id="grant_type" required>
                    <option data-requires-coc="false" value="">--</option>
                    <option data-requires-coc="true"  value="Conference">Conference</option>
                    <option data-requires-coc="false" value="Development Work">Development Work</option>
                    <option data-requires-coc="true" value="Event Site Description">Event Site Description</option>
                    <option data-requires-coc="true" value="Kids Coding Camp">Kids Coding Camp</option>
                    <option data-requires-coc="false" value="Sprint">Sprint</option>
                    <option data-requires-coc="false" value="Training Program">Training Program</option>
                    <option data-requires-coc="true" value="Workshop-Education">Workshop-Educational</option>
                    <option data-requires-coc="true" value="Workgroup-Women">Workshop-Women</option>
                    <option value="Other">Other</option>
                  </select>

TODO: This will display
                    descriptions in-line on selection

                  * Link to code of conduct of the event
                    (required for workshops and conferences)
                  <input id="coc_input" name="code_of_conduct_link" type="text" class="form-control"
                    placeholder="">

                  File attachment(s) :

Click here or drag 'n drop to append file attachments

                  * Purpose

Describe
                    the purpose of the grant, location and date, including the
                    date in which the funds must be received. We recommend to
                    send the requests at minimum 12 weeks before the
                    event so we have enough time to review, ask questions and
                    send you the funds.
                    Make sure you explain how this grant is designed to help
                    grow the community. Also let us know what other forms of
                    sponsorship you have applied for.
                    For workshops/trainings please include the staff:student
                    ratio, the amount of hands-on training time and a lesson
                    plan with learning outcomes for participants.

                  <textarea class="form-control"
                    id="purpose" name="purpose" rows="3"
                    placeholder="Purpose" maxlength="5000" required></textarea>

                      Specify here the grant amount in detail. Please note that
                      the EEF may only be able to provide partial funding for a
                      proposal so let us know if this is acceptable to you. Be
                      sure to include a breakdown of the amount you are
                      requesting. We prefer to see what you plan on using the
                      funds for.
                      Example: 1200$ total ($700 for venue, $300 for trav
                      el, $200 for food). To thank you for your sponsorship, we
                      will place the EEF logo on our site and offer you 3 free
                      tickets to the event to distribute as you see fit.

                  * Amount

                      $

                    <input id="grant_amount" name="grant_amount" type="text" value="" min="0.00" step="1.00"
                      data-number-to-fixed="2" data-number-stepfactor="100"
                      class="form-control currency" required>

                    Preferred payment
                      method
                    <select class="form-control" id="payment_method" name="payment_method" required>
                      <option value="">--</option>
                      <option value="Paypal">Paypal</option>
                      <option value="Zelle">Zelle</option>
                      <option value="Check">Check</option>
                      <option value="Wire">Wire</option>
                    </select>
                    We can do checks only within
                      the US. If the request is for $500 or less, PayPal is
                      suggested.

                      * Beneficiaries

                        Describe who will be the beneficiaries of the grant and
                        the expected size of the event.
                        For onsite events we would love to have an overview of
                        other Beam related
                        activities/meetups/trainings/conferences located in that
                        area, the number of attendees, frequency and such.

                      <textarea class="form-control"
                        id="beneficiaries" name="beneficiaries" rows="3"
                        placeholder="Beneficiaries" maxlength="5000" required></textarea>

                    * Report

The EEF would like to
                      see how the grant was used so we require that we receive a
                      report that will help us understand the impact that the
                      grants are having and how the activities are received
                      by the community. We require to receive this report within
                      one month of the event. Please describe in this section
                      what items you will include on the report and what follow
                      up activities do you plan on. For example: blog posts,
                      post events write-ups, web pages, project updates, lessons
                      learned (what went well and what needs to improve), the
                      feedback from the participants, social media, number of
                      attendees, demographics, and such.

                    <textarea class="form-control"
                              id="report" rows="3"
                                          name="report"
                                          maxlength="5000"
                      placeholder="Report" required></textarea>

                <button id="submit_form" class="btn btn-primary mt-2" type="submit">Submit</button>

            <% end %>

Congrats!

Expect a copy of your grant proposal coming from eef-grant-submissions@beam.eco

Grant request process

          Intro
          FAQ
          Form

Introduction

The current focus of the foundation is on increasing and
              expanding the
              community so we will favour grants that are targeted to
              beneficiaries that
              are new to Erlang/Elixir and the ecosystem. We prefer grants that
              support
              online workshops, online training materials, hands-on trainings,
              development
              work (open source) and diversity efforts. On non-beam focused
              events where
              there is a clear Beam language component of the event, the grant
              will only
              support the Beam language component of the event. The EEF will
              consider
              supporting a hackathon if the event has hands-on Beam languages
              education
              for a minimum of 6 hours. We will not fund prizes for hackathons
              or swag.

We recommend that you submit grant proposals via our form at
              least 12
              weeks prior to the event. Proposals should be concise and have a
              clear
              objective. We encourage those applying for funding to try and get
              sponsorship
              from corporations or local sponsors as we want to encourage
              sustainable, long
              term relationships with them.

The EEF could limit the number of events per organizer and/or
              city that are
              granted within a given year. If you have any questions reach out
              to
              education@erlef.org

FAQ

                          <button class="btn btn-link" type="button"
                            data-toggle="collapse"
                            data-target="#accordion-tab-1-content-1"
                            aria-expanded="false"
                            aria-controls="accordion-tab-1-content-1"> When
                            should I submit my grant request?</button>

                          We recommend that grant requests be submitted at least
                          12 weeks before the funding is needed.

                          <button class="btn btn-link" type="button"
                            data-toggle="collapse"
                            data-target="#accordion-tab-1-content-2"
                            aria-expanded="false"
                            aria-controls="accordion-tab-1-content-2">What grant
                            can I ask for organizing a
                            conference?</button>

The maximum conference grant size is typically
                            around 10 USD per
                            attendee. We prefer to help new events get
                            established in their community
                            and we encourage them to apply for different funding
                            local options as well.
                            Bigger conferences might be assigned a lower amount
                            per attendee.
                            Educational programs run within the conference
                            should request a separate
                            budget.

                          <button class="btn btn-link" type="button"
                            data-toggle="collapse"
                            data-target="#accordion-tab-1-content-3"
                            aria-expanded="false"
                            aria-controls="accordion-tab-1-content-3">
                            I am organizing a workshop. What grant can I ask
                            for?
                          </button>

Our maximum educational program grant size is
                            typically USD 25 per
                            student, provided the students each receive at least
                            6 hours of BEAM
                            languages instruction as part of it, however we are
                            open to
                            review this amount on a case by case basis. Please
                            note that
                            subsequent requests for workshops in the same area
                            may be
                            funded at a lower rate to encourage sustainable,
                            long-term
                            relationships with local sponsors.

When submitting your workshop grant request, it
                            helps us to see a brief budget as this example:

                              Items
                              Unit Cost
                              Quantity
                              Total Cost

                                Lunch and drinks
                                9
                                50
                                450

                                Travel expenses
                                20
                                3
                                60

                                Hotel expenses
                                50
                                2
                                100

                                Total

                                610

<button class="btn btn-link" type="button"
                            data-toggle="collapse"
                            data-target="#accordion-tab-1-content-4"
                            aria-expanded="false"
                            aria-controls="accordion-tab-1-content-4">
                            Is there a maximum grant size that can be
                            awarded?</button>

There is no maximum, however bear in mind that the
                            foundation has a limited budget and we reserve the
                            right of giving a grant smaller than requested, let
                            us know if this is a problem for you.

Grant Proposal Form

  <%= form_for @conn, Routes.grant_path(@conn, :create), [id: "grant_form", multipart: true, class: "dropzone"], fn _f -> %>

                  First name
                  <input type="text" name="first_name" class="form-control"
                    id="first_name" placeholder="First name" required>

                  Last name
                  <input type="text" class="form-control"
                    id="last_name" name="last_name" placeholder="Last name" required>

                  Nick Name

                    <input type="text" class="form-control" name="nick_name"
                      id="nick_name" placeholder="Nick Name"
                      aria-describedby="inputGroupPrepend3" required>

                  Email address
                  <input type="email" name="email_address" class="form-control"
                    id="email_address" aria-describedby="emailHelp"
                    placeholder="Enter email" required>

                  Phone Number
                  <input type="text" name="phone_number" class="form-control" id="phone_number"
                    placeholder="Phone Number" required>

                  Organization Name
                  <input type="text" name="org_name" class="form-control" id="org_name"
                    placeholder="Organization Name">

                  Organization Email
                  <input type="text" name="org_email" class="form-control" id="org_email"
                    placeholder="Organization Email">

                  City
                  <input type="text"  name="city" class="form-control"
                    id="city" placeholder="City" required>

                    Please provide a valid city.

                  Province/State/Region
                  <input type="text" name="province" class="form-control"
                    id="province" placeholder="Province" required>

                    Please provide a valid state.

                  Postal Code
                  <input type="text" name="postal_code" class="form-control"
                    id="postal_code" placeholder="Postal Code" required>

                    Please provide a valid zip.

                  Country
                  <input type="text" name="country" class="form-control"
                    id="country" placeholder="Country" required>

                    Please provide a valid country.

                  Twitter Handle
                  <input type="text" name="twitter" class="form-control" id="twitter"
                    placeholder="Twitter Handle">

                  LinkedIn
                  <input type="text" class="form-control" name="linkedin" id="linkedin"
                    placeholder="LinkedIn">

                  WebSite
                  <input type="text" class="form-control" name="website" id="website"
                    placeholder="WebSite" required>

                  Small Bio
                  <textarea class="form-control"
                            id="bio" rows="3"
                            name="bio"
                    placeholder="Small Bio" required></textarea>

                  Grant Type
                  <select name="grant_type" class="form-control" id="grant_type">
                    <option>Conference</option>
                    <option>Development Work</option>
                    <option>Event Site Description</option>
                    <option>Kids Coding Camp</option>
                    <option>Sprint</option>
                    <option>Training program</option>
                    <option>Workshop-educational</option>
                    <option>Workshop-Women</option>
                    <option>Other</option>
                  </select>

TODO: This will display
                    descriptions in-line on selection

                  Link to code of conduct of the event
                    (required for workshops and conferences)
                  <input id="coc_link" name="code_of_conduct_link" type="text" class="form-control" id="phone_number"
                    placeholder="">

TODO: This will only display if
                    conference or workshop option is selected

                  File attachment(s) :

Click here or drag 'n drop to append file attachments

                  Purpose

Describe
                    the purpose of the grant, location and date, including the
                    date in which the funds must be received. We recommend to
                    send the requests at minimum 12 weeks before the
                    event so we have enough time to review, ask questions and
                    send you the funds.
                    Make sure you explain how this grant is designed to help
                    grow the community. Also let us know what other forms of
                    sponsorship you have applied for.
                    For workshops/trainings please include the staff:student
                    ratio, the amount of hands-on training time and a lesson
                    plan with learning outcomes for participants.

                  <textarea class="form-control"
                    id="purpose" name="purpose" rows="3"
                    placeholder="Purpose" required></textarea>

                      Specify here the grant amount in detail. Please note that
                      the EEF may only be able to provide partial funding for a
                      proposal so let us know if this is acceptable to you. Be
                      sure to include a breakdown of the amount you are
                      requesting. We prefer to see what you plan on using the
                      funds for.
                      Example: 1200$ total ($700 for venue, $300 for trav
                      el, $200 for food). To thank you for your sponsorship, we
                      will place the EEF logo on our site and offer you 3 free
                      tickets to the event to distribute as you see fit.

                  Amount

                      $

                    <input id="grant_amount" name="grant_amount" type="text" value="0.00" min="0.00" step="1.00"
                      data-number-to-fixed="2" data-number-stepfactor="100"
                      class="form-control currency" required>

                    Preferred payment
                      method
                    <select class="form-control" id="payment_method" name="payment_method">
                      <option>Paypal</option>
                      <option>Zelle</option>
                      <option>Check</option>
                      <option>Wire</option>
                    </select>
                    We can do checks only within
                      the US. If the request is for $500 or less, PayPal is
                      suggested.

                      Beneficiaries

                        Describe who will be the beneficiaries of the grant and
                        the expected size of the event.
                        For onsite events we would love to have an overview of
                        other Beam related
                        activities/meetups/trainings/conferences located in that
                        area, the number of attendees, frequency and such.

                      <textarea class="form-control"
                        id="beneficiaries" name="beneficiaries" rows="3"
                        placeholder="Beneficiaries" required></textarea>

                    Report

The EEF would like to
                      see how the grant was used so we require that we receive a
                      report that will help us understand the impact that the
                      grants are having and how the activities are received
                      by the community. We require to receive this report within
                      one month of the event. Please describe in this section
                      what items you will include on the report and what follow
                      up activities do you plan on. For example: blog posts,
                      post events write-ups, web pages, project updates, lessons
                      learned (what went well and what needs to improve), the
                      feedback from the participants, social media, number of
                      attendees, demographics, and such.

                    <textarea class="form-control"
                              id="report" rows="3"
                              name="report"
                      placeholder="Report" required></textarea>

                <button id="submit_form" class="btn btn-primary mt-2" type="submit">Submit</button>

            <% end %>


Starting to add the HTML form.

Starting to add the HTML form.

Add Activity

          Date
          <input type="date" value="2016-10-13"/>

          Activity
          <input type="text" />

          Duration
          <input type="number" value="1" min="0" />

          Notes
          <textarea rows="2"></textarea>

<%= for date <- @dates do %>

        <%= get_date date %>

      <%= for item <- get_events @events, date do %>
        <%= render "event.html", e: item %>
      <% end %>

<% end %>


Set name of process to the script path

Set name of process to the script path

This addresses the situation where looking for the running release in
the output of `ps ax` shows the path to `beam.smp` with a bunch of
arguments, rather than the path of the release script which is being
executed. If you have multiple releases running, the former is very
difficult to read and find the pid of a given release process, with this
change it is now just a matter of finding the process with the path you
care about.

#!/usr/bin/env bash

set -o posix
set -e

# Set DEBUG_BOOT to output verbose debugging info during execution
if [ ! -z "$DEBUG_BOOT" ]; then
    set -x
fi

# Name of the release
REL_NAME="${REL_NAME:-<%= release_name %>}"
# Current version of the release
REL_VSN="${REL_VSN:-<%= release_version %>}"
# Options passed to erl
ERL_OPTS="${ERL_OPTS:-<%= release.profile.erl_opts %>}"
# Environment variables for run_erl
RUN_ERL_ENV="${RUN_ERL_ENV:-<%= release.profile.run_erl_env %>}"
# Current version of ERTS being used
# If this is not present/unset, it will be detected
<%= if ((is_binary(include_erts) or include_erts) and not is_nil(erts_vsn)) do %>ERTS_VSN="${ERTS_VSN:-<%= erts_vsn %>}"<% end %>
export REL_NAME
export REL_VSN
export ERL_OPTS
export RUN_ERL_ENV
export ERTS_VSN

# If readlink has no -f option, or greadlink is not available,
# This function behaves like `readlink -f`
readlink_f() {
    __target_file="$1"
    cd "$(dirname "$__target_file")"
    __target_file=$(basename "$__target_file")

    # Iterate down a (possible) chain of symlinks
    while [ -L "$__target_file" ]
    do
        __target_file=$(readlink "$__target_file")
        cd "$(dirname "$__target_file")"
        __target_file=$(basename "$__target_file")
    done
    # Compute the canonicalized name by finding the physical path
    # for the directory we're in and appending the target file.
    __phys_dir=$(pwd -P)
    __result="$__phys_dir/$__target_file"
    echo "$__result"
}

# Locate the real path to this script
if uname | grep -q 'Darwin'; then
    # on OSX, best to install coreutils from homebrew or similar
    # to get greadlink
    if command -v greadlink >/dev/null 2>&1; then
        SCRIPT="${SCRIPT:-$(greadlink -f "$0")}"
    else
        SCRIPT="${SCRIPT:-$(readlink_f "$0")}"
    fi
else
    SCRIPT="${SCRIPT:-$(readlink -f "$0" )}"
fi

export ESCRIPT_NAME
ESCRIPT_NAME="${ESCRIPT_NAME:-$SCRIPT}"

# Parent directory of this script
SCRIPT_DIR="$(dirname "${SCRIPT}")"
# Root directory of all releases
RELEASE_ROOT_DIR="${RELEASE_ROOT_DIR:-$(dirname "$(dirname "${SCRIPT_DIR}")")}"
# The location of builtin command scripts
RELEASE_LIBEXEC_DIR="$SCRIPT_DIR/libexec"

# shellcheck source=../libexec/logger.sh
. "$RELEASE_LIBEXEC_DIR/logger.sh"
# shellcheck source=../libexec/erts.sh
. "$RELEASE_LIBEXEC_DIR/erts.sh"
# shellcheck source=../libexec/helpers.sh
. "$RELEASE_LIBEXEC_DIR/helpers.sh"
# shellcheck source=../libexec/env.sh
. "$RELEASE_LIBEXEC_DIR/env.sh"
# shellcheck source=../libexec/config.sh
. "$RELEASE_LIBEXEC_DIR/config.sh"

# Make the release root our working directory
cd "$ROOTDIR"

# We export this so that custom tasks in Elixir
# which need to know how they were invoked can
# check this environment variable.
export DISTILLERY_TASK="$1"

# All commands are loaded from the currently active release
COMMAND_DIR="$RELEASE_LIBEXEC_DIR/commands"
COMMAND_NAME="${1:-help}"
COMMAND_PATH="$COMMAND_DIR/$COMMAND_NAME.sh"

# Only shift if there is more than 0 args, or it will exit non-zero
if [ "$#" -ne 0 ]; then
   shift
fi

# Handle aliases
case $COMMAND_NAME in
    start|start_boot)
        configure_release
        . "$COMMAND_DIR/start.sh" "$COMMAND_NAME" "$@"
        ;;
    upgrade|downgrade|install)
        configure_release
        . "$COMMAND_DIR/install.sh" "$COMMAND_NAME" "$@"
        ;;
    console|console_clean|console_boot)
        configure_release
        . "$COMMAND_DIR/console.sh" "$COMMAND_NAME" "$@"
        ;;
    *)
        # If the command exists in libexec, execute
        # Otherwise check to see if it's the name of a custom command
        if [ -f "$COMMAND_PATH" ]; then
            configure_release
            . "$COMMAND_PATH" "$@"
        else
            COMMAND_PATH="$REL_DIR/commands/$COMMAND_NAME.sh"
            if [ -f "$COMMAND_PATH" ]; then
                configure_release
                require_cookie
                . "$COMMAND_PATH" "$@"
            else
                notice "'$COMMAND_NAME' is not a valid command"
                . "$COMMAND_DIR/help.sh"
            fi
        fi
        ;;
esac

#!/usr/bin/env bash

set -o posix
set -e

# Set DEBUG_BOOT to output verbose debugging info during execution
if [ ! -z "$DEBUG_BOOT" ]; then
    set -x
fi

# Name of the release
REL_NAME="${REL_NAME:-<%= release_name %>}"
# Current version of the release
REL_VSN="${REL_VSN:-<%= release_version %>}"
# Options passed to erl
ERL_OPTS="${ERL_OPTS:-<%= release.profile.erl_opts %>}"
# Environment variables for run_erl
RUN_ERL_ENV="${RUN_ERL_ENV:-<%= release.profile.run_erl_env %>}"
# Current version of ERTS being used
# If this is not present/unset, it will be detected
<%= if ((is_binary(include_erts) or include_erts) and not is_nil(erts_vsn)) do %>ERTS_VSN="${ERTS_VSN:-<%= erts_vsn %>}"<% end %>
export REL_NAME
export REL_VSN
export ERL_OPTS
export RUN_ERL_ENV
export ERTS_VSN

# If readlink has no -f option, or greadlink is not available,
# This function behaves like `readlink -f`
readlink_f() {
    __target_file="$1"
    cd "$(dirname "$__target_file")"
    __target_file=$(basename "$__target_file")

    # Iterate down a (possible) chain of symlinks
    while [ -L "$__target_file" ]
    do
        __target_file=$(readlink "$__target_file")
        cd "$(dirname "$__target_file")"
        __target_file=$(basename "$__target_file")
    done
    # Compute the canonicalized name by finding the physical path
    # for the directory we're in and appending the target file.
    __phys_dir=$(pwd -P)
    __result="$__phys_dir/$__target_file"
    echo "$__result"
}

# Locate the real path to this script
if uname | grep -q 'Darwin'; then
    # on OSX, best to install coreutils from homebrew or similar
    # to get greadlink
    if command -v greadlink >/dev/null 2>&1; then
        SCRIPT="${SCRIPT:-$(greadlink -f "$0")}"
    else
        SCRIPT="${SCRIPT:-$(readlink_f "$0")}"
    fi
else
    SCRIPT="${SCRIPT:-$(readlink -f "$0" )}"
fi

# Parent directory of this script
SCRIPT_DIR="$(dirname "${SCRIPT}")"
# Root directory of all releases
RELEASE_ROOT_DIR="${RELEASE_ROOT_DIR:-$(dirname "$(dirname "${SCRIPT_DIR}")")}"
# The location of builtin command scripts
RELEASE_LIBEXEC_DIR="$SCRIPT_DIR/libexec"

# shellcheck source=../libexec/logger.sh
. "$RELEASE_LIBEXEC_DIR/logger.sh"
# shellcheck source=../libexec/erts.sh
. "$RELEASE_LIBEXEC_DIR/erts.sh"
# shellcheck source=../libexec/helpers.sh
. "$RELEASE_LIBEXEC_DIR/helpers.sh"
# shellcheck source=../libexec/env.sh
. "$RELEASE_LIBEXEC_DIR/env.sh"
# shellcheck source=../libexec/config.sh
. "$RELEASE_LIBEXEC_DIR/config.sh"

# Make the release root our working directory
cd "$ROOTDIR"

# We export this so that custom tasks in Elixir
# which need to know how they were invoked can
# check this environment variable.
export DISTILLERY_TASK="$1"

# All commands are loaded from the currently active release
COMMAND_DIR="$RELEASE_LIBEXEC_DIR/commands"
COMMAND_NAME="${1:-help}"
COMMAND_PATH="$COMMAND_DIR/$COMMAND_NAME.sh"

# Only shift if there is more than 0 args, or it will exit non-zero
if [ "$#" -ne 0 ]; then
   shift
fi

# Handle aliases
case $COMMAND_NAME in
    start|start_boot)
        configure_release
        . "$COMMAND_DIR/start.sh" "$COMMAND_NAME" "$@"
        ;;
    upgrade|downgrade|install)
        configure_release
        . "$COMMAND_DIR/install.sh" "$COMMAND_NAME" "$@"
        ;;
    console|console_clean|console_boot)
        configure_release
        . "$COMMAND_DIR/console.sh" "$COMMAND_NAME" "$@"
        ;;
    *)
        # If the command exists in libexec, execute
        # Otherwise check to see if it's the name of a custom command
        if [ -f "$COMMAND_PATH" ]; then
            configure_release
            . "$COMMAND_PATH" "$@"
        else
            COMMAND_PATH="$REL_DIR/commands/$COMMAND_NAME.sh"
            if [ -f "$COMMAND_PATH" ]; then
                configure_release
                require_cookie
                . "$COMMAND_PATH" "$@"
            else
                notice "'$COMMAND_NAME' is not a valid command"
                . "$COMMAND_DIR/help.sh"
            fi
        fi
        ;;
esac


language nav

language nav

      <%= link [fa_icon("folder-o"), " ", "Panoptikum"],
               to: category_frontend_path(@conn, :index) %>
      /
      <%= if @category.parent do %>
        <%= link [fa_icon("folder-o"), " ", @category.parent.title],
                 to: category_frontend_path(@conn, :show, @category.parent) %>
        /
      <% end %>
      <%= fa_icon("folder-open-o") %> <%= @category.title %>

    <%= if @category.children != [] do %>
      <%= for group <- Enum.chunk(@category.children, 6, 6, []) do %>

          <%= for subcategory <- group do %>

              <%= link [fa_icon("folder-o"), " ", subcategory.title],
                       to: category_frontend_path(@conn, :show, subcategory),
                       class: "btn btn-xs btn-light-gray truncate" %>

          <% end %>

      <% end %>

    <% end %>

    Jump to:
    <%= for {language, podcasts} <- Enum.group_by(@podcasts, &Map.get(&1, :language_name)) do %>

      <%= List.first(podcasts) && List.first(podcasts).language_emoji %>
      <%= link ( language || "Language unknown"), to: "#" <> (language || "Language unknown") %>
    <%= end %>

    <%= for {language, podcasts} <- Enum.group_by(@podcasts, &Map.get(&1, :language_name)) do %>
      <h3 id="<%= language %>"><%= List.first(podcasts) && List.first(podcasts).language_emoji %>
        <%= language || "Language unknown" %>

      <%= for group <- Enum.chunk(podcasts, 6, 6, []) do %>

          <%= for podcast <- group do %>

              <%= link [fa_icon("podcast"), " ", podcast.title],
                       to: podcast_frontend_path(@conn, :show, podcast.id),
                       class: "btn btn-default btn-xs truncate" %>

          <% end %>

      <% end %>
    <% end %>

<%= if @current_user do %>
  <%= like_or_unlike(@current_user.id, @category.id) %>
  <%= follow_or_unfollow(@current_user.id, @category.id) %>
<% end %>

      <%= link [fa_icon("folder-o"), " ", "Panoptikum"],
               to: category_frontend_path(@conn, :index) %>
      /
      <%= if @category.parent do %>
        <%= link [fa_icon("folder-o"), " ", @category.parent.title],
                 to: category_frontend_path(@conn, :show, @category.parent) %>
        /
      <% end %>
      <%= fa_icon("folder-open-o") %> <%= @category.title %>

    <%= if @category.children != [] do %>
      <%= for group <- Enum.chunk(@category.children, 6, 6, []) do %>

          <%= for subcategory <- group do %>

              <%= link [fa_icon("folder-o"), " ", subcategory.title],
                       to: category_frontend_path(@conn, :show, subcategory),
                       class: "btn btn-xs btn-light-gray truncate" %>

          <% end %>

      <% end %>

    <% end %>

    <%= for {language, podcasts} <- Enum.group_by(@podcasts, &Map.get(&1, :language_name)) do %>

<%= List.first(podcasts) && List.first(podcasts).language_emoji %>
          <%= language || "Language unknown" %>

      <%= for group <- Enum.chunk(podcasts, 6, 6, []) do %>

          <%= for podcast <- group do %>

              <%= podcast.language_emoji %>

              <%= link [fa_icon("podcast"), " ", podcast.title],
                       to: podcast_frontend_path(@conn, :show, podcast.id),
                       class: "btn btn-default btn-xs truncate" %>

          <% end %>

      <% end %>
    <% end %>

<%= if @current_user do %>
  <%= like_or_unlike(@current_user.id, @category.id) %>
  <%= follow_or_unfollow(@current_user.id, @category.id) %>
<% end %>


Fix bug in /notifications

Fix bug in /notifications

<%= render HexFaktor.ComponentView, "tutorial-verify-email.html", conn: @conn %>

  Notifications

    <%= link("Mark all as read", to: "/notifications/mark_all_as_read", class: "btn btn--default", method: "POST") %>

<%= render HexFaktor.NotificationView, "_tab_nav_index.html", assigns %>

<%= for {{kind_of, item_name, _project_id, _git_branch_id}, notifications} <- @notification_map do %>
  <%= render HexFaktor.ComponentView, "notification-item-#{kind_of}.html", current_user: @current_user, item_name: item_name, notifications: notifications %>
<% end %>

<%= render HexFaktor.ComponentView, "tutorial-verify-email.html", current_user: @current_user %>

  Notifications

    <%= link("Mark all as read", to: "/notifications/mark_all_as_read", class: "btn btn--default", method: "POST") %>

<%= render HexFaktor.NotificationView, "_tab_nav_index.html", assigns %>

<%= for {{kind_of, item_name, _project_id, _git_branch_id}, notifications} <- @notification_map do %>
  <%= render HexFaktor.ComponentView, "notification-item-#{kind_of}.html", current_user: @current_user, item_name: item_name, notifications: notifications %>
<% end %>


Fix broken settings page for projects

Fix broken settings page for projects

<%= render HexFaktor.ComponentView, "project-title.html", conn: @conn, project: @project, branch: @project.git_repo_branches |> Enum.find(&(&1.name == @project.default_branch)) %>

    <a href="/<%= @project.provider %>/<%= @project.name %>">← back to project

<%= render HexFaktor.ProjectView, "_tab_nav_edit.html", assigns %>

<%= render HexFaktor.ComponentView, "alert.html", text: get_flash(@conn, :info) %>

<%= render HexFaktor.ProjectView, "_edit.#{@current_section}.html", assigns %>

<%= render HexFaktor.ComponentView, "project-title.html", project: @project, branch: @project.git_repo_branches |> Enum.find(&(&1.name == @project.default_branch)) %>

    <a href="/<%= @project.provider %>/<%= @project.name %>">← back to project

<%= render HexFaktor.ProjectView, "_tab_nav_edit.html", assigns %>

<%= render HexFaktor.ComponentView, "alert.html", text: get_flash(@conn, :info) %>

<%= render HexFaktor.ProjectView, "_edit.#{@current_section}.html", assigns %>


Combine batch details link with entry type cell

<%= for entry <- @entries do %>
  <%= case entry do %>
  <% %BorsNG.Database.Crash{id: id, component: component, crash: crash, updated_at: updated_at} -> %>
    <tr role=row id="crash-<%= id %>" data-id="<%= id %>" data-datetime="<%= updated_at %>">
      <%= htmlify_naive_datetime(updated_at) %>
      Crash
      <%= component %>

<%= crash %>

  <% %BorsNG.Database.Batch{id: id, state: state, patches: patches, updated_at: updated_at} -> %>
    <tr role=row id="batch-<%= id %>" data-id="<%= id %>" data-datetime="<%= updated_at %>">
      <%= htmlify_naive_datetime(updated_at) %>
      <a href="/batches/<%= id %>">Batch <%= id %>
      <%= stringify_state(state) %>

      <%= for patch <- patches do %>
        <a href="<%= Confex.fetch_env!(:bors, :html_github_root) %>/<%= @project.name %>/pull/<%= patch.pr_xref %>">#<%= patch.pr_xref %>
      <% end %>

  <% end %>
<% end %>

<%= for entry <- @entries do %>
  <%= case entry do %>
  <% %BorsNG.Database.Crash{id: id, component: component, crash: crash, updated_at: updated_at} -> %>
    <tr role=row id="crash-<%= id %>" data-id="<%= id %>" data-datetime="<%= updated_at %>">
      <%= htmlify_naive_datetime(updated_at) %>

      Crash
      <%= component %>

<%= crash %>

  <% %BorsNG.Database.Batch{id: id, state: state, patches: patches, updated_at: updated_at} -> %>
    <tr role=row id="batch-<%= id %>" data-id="<%= id %>" data-datetime="<%= updated_at %>">
      <%= htmlify_naive_datetime(updated_at) %>
      <a href="/batches/<%= id %>"><%= id %>
      Batch
      <%= stringify_state(state) %>

      <%= for patch <- patches do %>
        <a href="<%= Confex.fetch_env!(:bors, :html_github_root) %>/<%= @project.name %>/pull/<%= patch.pr_xref %>">#<%= patch.pr_xref %>
      <% end %>

  <% end %>
<% end %>


Removes the admin card in users#show.

Removes the admin card in users#show.

<%# header tag begins in parent template %>
  <div class="profile-header<%= if @user.verified, do: " profile-header--verified" %>">

      <%= if Vutuv.Avatar.sym_link_for_avatar_exists?(@user) do %>
        <img src="<%= Vutuv.Avatar.webserver_static_url(@user, :medium) %>" width="130" height="130" alt="Avatar of <%= full_name(@user) %>">
      <% else %>
        <img src="<%= Vutuv.Avatar.binary(@user, :medium) %>" width="130" height="130" alt="Avatar of <%= full_name(@user) %>">
      <% end %>

        <%= full_name(@user) %>
        <%= if !@user.verified and admin_visitor?(@conn) do %>
          <%= button to: admin_user_path(@conn, :update, user_id: @user.id), class: "button button--icon navigation__icon", form: [class: "button button--icon"], method: "post" do %>
            <i title="<%= gettext("Verify") %>" class="icon icon--lock">
          <% end %>
        <% end %>
        <%= if same_user?(@user, @current_user) do %>
        <%= link to: user_path(@conn, :edit, @user), class: "profile-header__edit button button--icon button--small" do %>

        <% end %>
        <% end %>

        <%= work_information_string(@user, 50) %>

    <%= if @user.verified do %>
      Verified profile
    <% end %>

        <%= if(@follower_count>0) do %>

<%= short_name(@user) %> <%= gettext "has" %><%= @follower_count %> <%= gettext "followers" %>

        <% end %>
        <%= if is_visitor?(@conn, @current_user) do %>
          <%= if user_follows_user?(@current_user, @user) do %>
            <%= button to: connection_path(@conn, :delete, user_follows_user?(@current_user, @user)), method: :delete , class: "button button-link button--unfollow", form: [class: "button--unfollow"] do %>
               Unfollow
            <% end %>
          <%= else %>
            <%= button to: connection_path(@conn, :create, connection: %{follower_id: @current_user_id, followee_id: @user.id}), method: :post, class: "button button-link", form: [class: "button--slim"] do %>
               Follow
            <% end %>
          <% end %>
        <% end %>

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

  <%= gettext "Users" %> / <%= full_name @user %>

  <%= if @display_welcome_message do %>
    <%= if same_user?(@user, @current_user) do %>
      <%= if Enum.count(@user_tags) == 0 do %>

<%= gettext "Your New vutuv Profile Page" %>

            <%= gettext "Please take a couple of minutes to add information that might be interesting for your future followers. Why don't you start with your tags and work experiences?" %>

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

  <%= if Enum.count(@user_tags) > 0 or same_user?(@user, @current_user) do %>

<%= gettext "Tags" %>

    <%= if Enum.count(@user_tags) > 0 do %>
    <%= render Vutuv.UserTagView, "card_list.html", assigns %>
    <% end %>

    <%= if same_user?(@user, @current_user) do %>
      <% #Form for easy tag entry %>
      <%= if Enum.count(@user_tags) == 0 do %>
        <%= form_for @conn, user_path(@conn, :tags_create, @user), [as: :tags, class: "editform"], fn f -> %>
          <div class="editform__field<%= if error_tag(f, :name), do: " editform__field--error"%>">
            <%= label f, :tags, gettext("Enter comma separated tags here. Max length per tag: 45 characters") %>
            <%= text_input f, :tags, placeholder: gettext("PHP, JavaScript, Tap Dancing, Origami, Recruiting"), autofocus: true %>
            <%= error_tag f, :tags %>

            <%= submit gettext("Add"), class: "button button--full" %>

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

    <%= if Enum.count(@user_tags) > 0 && (same_user?(@user, @current_user) || @total_user_tags > 10)do %>

        <%= if same_user?(@user, @current_user) do %>
          <%= link gettext("Add"), to: user_tag_path(@conn, :new, @current_user) %>
        <% end %>
        <%= if same_user?(@user, @current_user) and @total_user_tags > 10 do %> | <% end %>
        <%= if @total_user_tags > 10 do %>
          <%= link gettext("View All"), to: user_tag_path(@conn, :index, @user)%>
        <% end %>

    <% end %>

  <% end %>

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

    <%= if(Enum.count(@emails) > 0 or same_user?(@user, @current_user)) do %>

      <%= if same_user?(@user, @current_user) do %>
        <%= link to: user_email_path(@conn, :index, @user), class: "pull-right btn btn-xs btn-primary btn-icon" do %>

          <%= render Vutuv.IconView, "pencil.html" %>

        <% end %>
      <% end %>

<%= gettext "Contact" %>

      <%= if(Enum.count(@emails) > 0) do %>

<%= if (Enum.count(@emails) == 1), do: gettext("Email"), else: gettext("Emails") %>

        <%= for email <- @emails do %>

<a href="mailto:<%= email.value %>"><%= email.value %>

        <% end %>

      <% end %>

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

    <% end %>

    <%= if(@user.headline || @user.birthdate || same_user?(@user, @current_user)) do %>

        <%= if same_user?(@user, @current_user) do %>
        <%= link to: user_path(@conn, :edit, @user), class: "pull-right btn btn-xs btn-primary btn-icon" do %>

            <%= render Vutuv.IconView, "pencil.html" %>

        <% end %>
        <% end %>

<%= gettext "General Info" %>

        <%= if @user.headline || same_user?(@user, @current_user) do %>

<%= @user.headline %>

        <% end %>

          <%= if(@user.gender != "other" && @user.gender) do %>

<%= gettext "Gender" %>

<%= Vutuv.User.gender_gettext(@user.gender) %>

          <% end %>
          <%= if(@user.birthdate) do %>

<%= gettext "Birthday" %>

<%= format_birthdate(@user) %>

          <% end %>

    <% end %>

    <%= if Enum.count(@user.social_media_accounts) > 0 or same_user?(@user, @current_user) do %>

        <%= if same_user?(@user, @current_user) do %>
        <%= link to: user_social_media_account_path(@conn, :index, @user), class: "pull-right btn btn-xs btn-primary btn-icon" do %>

            <%= render Vutuv.IconView, "pencil.html" %>

        <% end %>
        <% end %>

<%= gettext "Social Media" %>

        <%= for account <- @user.social_media_accounts do %>

<%= account.provider %>

<%= Vutuv.SocialMediaAccount.social_media_link account %>

        <% end %>

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

    <% end %>

<%= gettext "Exports" %>

<%= gettext "Vcard" %>

<%= link gettext("Download"), to: api_user_v_card_path(@conn, :get, @user) %>

  <section class="card half<%= if @follower_count == 0, do: " card--empty" %>">

<%= gettext "Followers" %>

    <%= if(@follower_count > 0) do %>

    <%= render "card_list.html", conn: @conn, users: @user.followers, current_user: @current_user, current_user_id: @current_user_id, work_string_length: 20 %>

    <% else %>

<%= gettext "No Followers yet!" %>

    <% end %>
    <%= if(@follower_count > 3) do %>
      <%= link "#{@follower_count-3} #{gettext "More"}", to: user_follower_path(@conn, :index, @user), class: "card__morelink" %>
    <% end %>

    <%= if(@followee_count > 0) do %>

<%= gettext "Following" %>

        <%= if(@followee_count > 0) do %>
          <%= render "card_list.html", conn: @conn, users: @user.followees, current_user: @current_user, current_user_id: @current_user_id, work_string_length: 20 %>
        <% else %>

<%= gettext "Not following anyone yet!" %>

        <% end %>
        <%= if(@followee_count > 3) do %>
          <%= link "#{@followee_count-3} #{gettext "More"}", to: user_followee_path(@conn, :index, @user), class: "card__morelink" %>
        <% end %>
      <% else %>

<%= gettext "Recommended" %>

        <%= render Vutuv.UserView, "card_list.html", Map.put(assigns, :users, @reccomended_users) %>
      <% end %>

    <%= if @total_jobs > 0 or same_user?(@user, @current_user) do %>

<%= gettext "Experience" %>

    <%= if @total_jobs > 0 do %>
    <%= render Vutuv.WorkExperienceView, "card_list.html", assigns %>

    <% else %>

    <% end %>

      <%= if same_user?(@user, @current_user) do %>
        <%= link gettext("Add"), to: user_work_experience_path(@conn, :new, @current_user) %>
      <% end %>
      <%= if same_user?(@user, @current_user) and @total_jobs > 5 do %> | <% end %>
      <%= if @total_jobs > 5 do %>
        <%= link gettext("View All"), to: user_work_experience_path(@conn, :index, @user) %>
      <% end %>

  <% end %>

  <%= if @total_numbers > 0 or same_user?(@user, @current_user) do %>

<%= gettext "Phone Numbers" %>

    <%= if @total_numbers > 0 do %>
    <%= render Vutuv.PhoneNumberView, "card_list.html", phone_numbers: @user.phone_numbers, user: @user, conn: @conn, current_user: @current_user %>
    <% end %>

      <%= if same_user?(@user, @current_user) do %>
        <%= link gettext("Add"), to: user_phone_number_path(@conn, :new, @current_user) %>
      <% end %>
      <%= if same_user?(@user, @current_user) and @total_numbers > 5 do %> | <% end %>
      <%= if @total_numbers > 5 do %>
        <%= link gettext("View All"), to: user_phone_number_path(@conn, :index, @user) %>
      <% end %>

  <% end %>

  <%= if @total_links > 0 or same_user?(@user, @current_user) do %>

<%= gettext "Links" %>

    <%= if @total_links > 0 do %>
    <%= render Vutuv.UrlView, "card_list.html", urls: @user.urls, user: @user, conn: @conn, current_user: @current_user %>
    <% end %>

      <%= if same_user?(@user, @current_user) do %>
        <%= link gettext("Add"), to: user_url_path(@conn, :new, @current_user) %>
      <% end %>
      <%= if same_user?(@user, @current_user) and @total_links > 5 do %> | <% end %>
      <%= if @total_links > 5 do %>
        <%= link gettext("View All"), to: user_url_path(@conn, :index, @user) %>
      <% end %>

  <% end %>

  <%= if @total_addresses > 0 or same_user?(@user, @current_user) do %>

<%= gettext "Addresses" %>

    <%= if @total_addresses > 0 do %>
    <%= render Vutuv.AddressView, "card_list.html", addresses: @user.addresses, user: @user, conn: @conn, current_user: @current_user %>
    <% end %>

      <%= if same_user?(@user, @current_user) do %>
        <%= link gettext("Add"), to: user_address_path(@conn, :new, @current_user) %>
      <% end %>
      <%= if same_user?(@user, @current_user) and @total_addresses > 5 do %> | <% end %>
      <%= if @total_addresses > 5 do %>
        <%= link gettext("View All"), to: user_address_path(@conn, :index, @user) %>
      <% end %>

  <% end %>

<%# header tag begins in parent template %>
  <div class="profile-header<%= if @user.verified, do: " profile-header--verified" %>">

      <%= if Vutuv.Avatar.sym_link_for_avatar_exists?(@user) do %>
        <img src="<%= Vutuv.Avatar.webserver_static_url(@user, :medium) %>" width="130" height="130" alt="Avatar of <%= full_name(@user) %>">
      <% else %>
        <img src="<%= Vutuv.Avatar.binary(@user, :medium) %>" width="130" height="130" alt="Avatar of <%= full_name(@user) %>">
      <% end %>

        <%= full_name(@user) %>
        <%= if !@user.verified and admin_visitor?(@conn) do %>
          <%= button to: admin_user_path(@conn, :update, user_id: @user.id), class: "button button--icon navigation__icon", form: [class: "button button--icon"], method: "post" do %>
            <i title="<%= gettext("Verify") %>" class="icon icon--lock">
          <% end %>
        <% end %>
        <%= if same_user?(@user, @current_user) do %>
        <%= link to: user_path(@conn, :edit, @user), class: "profile-header__edit button button--icon button--small" do %>

        <% end %>
        <% end %>

        <%= work_information_string(@user, 50) %>

    <%= if @user.verified do %>
      Verified profile
    <% end %>

        <%= if(@follower_count>0) do %>

<%= short_name(@user) %> <%= gettext "has" %><%= @follower_count %> <%= gettext "followers" %>

        <% end %>
        <%= if is_visitor?(@conn, @current_user) do %>
          <%= if user_follows_user?(@current_user, @user) do %>
            <%= button to: connection_path(@conn, :delete, user_follows_user?(@current_user, @user)), method: :delete , class: "button button-link button--unfollow", form: [class: "button--unfollow"] do %>
               Unfollow
            <% end %>
          <%= else %>
            <%= button to: connection_path(@conn, :create, connection: %{follower_id: @current_user_id, followee_id: @user.id}), method: :post, class: "button button-link", form: [class: "button--slim"] do %>
               Follow
            <% end %>
          <% end %>
        <% end %>

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

  <%= gettext "Users" %> / <%= full_name @user %>

  <%= if @display_welcome_message do %>
    <%= if same_user?(@user, @current_user) do %>
      <%= if Enum.count(@user_tags) == 0 do %>

<%= gettext "Your New vutuv Profile Page" %>

            <%= gettext "Please take a couple of minutes to add information that might be interesting for your future followers. Why don't you start with your tags and work experiences?" %>

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

  <%= if Enum.count(@user_tags) > 0 or same_user?(@user, @current_user) do %>

<%= gettext "Tags" %>

    <%= if Enum.count(@user_tags) > 0 do %>
    <%= render Vutuv.UserTagView, "card_list.html", assigns %>
    <% end %>

    <%= if same_user?(@user, @current_user) do %>
      <% #Form for easy tag entry %>
      <%= if Enum.count(@user_tags) == 0 do %>
        <%= form_for @conn, user_path(@conn, :tags_create, @user), [as: :tags, class: "editform"], fn f -> %>
          <div class="editform__field<%= if error_tag(f, :name), do: " editform__field--error"%>">
            <%= label f, :tags, gettext("Enter comma separated tags here. Max length per tag: 45 characters") %>
            <%= text_input f, :tags, placeholder: gettext("PHP, JavaScript, Tap Dancing, Origami, Recruiting"), autofocus: true %>
            <%= error_tag f, :tags %>

            <%= submit gettext("Add"), class: "button button--full" %>

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

    <%= if Enum.count(@user_tags) > 0 && (same_user?(@user, @current_user) || @total_user_tags > 10)do %>

        <%= if same_user?(@user, @current_user) do %>
          <%= link gettext("Add"), to: user_tag_path(@conn, :new, @current_user) %>
        <% end %>
        <%= if same_user?(@user, @current_user) and @total_user_tags > 10 do %> | <% end %>
        <%= if @total_user_tags > 10 do %>
          <%= link gettext("View All"), to: user_tag_path(@conn, :index, @user)%>
        <% end %>

    <% end %>

  <% end %>

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

    <%= if(Enum.count(@emails) > 0 or same_user?(@user, @current_user)) do %>

      <%= if same_user?(@user, @current_user) do %>
        <%= link to: user_email_path(@conn, :index, @user), class: "pull-right btn btn-xs btn-primary btn-icon" do %>

          <%= render Vutuv.IconView, "pencil.html" %>

        <% end %>
      <% end %>

<%= gettext "Contact" %>

      <%= if(Enum.count(@emails) > 0) do %>

<%= if (Enum.count(@emails) == 1), do: gettext("Email"), else: gettext("Emails") %>

        <%= for email <- @emails do %>

<a href="mailto:<%= email.value %>"><%= email.value %>

        <% end %>

      <% end %>

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

    <% end %>

    <%= if(@user.headline || @user.birthdate || same_user?(@user, @current_user)) do %>

        <%= if same_user?(@user, @current_user) do %>
        <%= link to: user_path(@conn, :edit, @user), class: "pull-right btn btn-xs btn-primary btn-icon" do %>

            <%= render Vutuv.IconView, "pencil.html" %>

        <% end %>
        <% end %>

<%= gettext "General Info" %>

        <%= if @user.headline || same_user?(@user, @current_user) do %>

<%= @user.headline %>

        <% end %>

          <%= if(@user.gender != "other" && @user.gender) do %>

<%= gettext "Gender" %>

<%= Vutuv.User.gender_gettext(@user.gender) %>

          <% end %>
          <%= if(@user.birthdate) do %>

<%= gettext "Birthday" %>

<%= format_birthdate(@user) %>

          <% end %>

    <% end %>

    <%= if Enum.count(@user.social_media_accounts) > 0 or same_user?(@user, @current_user) do %>

        <%= if same_user?(@user, @current_user) do %>
        <%= link to: user_social_media_account_path(@conn, :index, @user), class: "pull-right btn btn-xs btn-primary btn-icon" do %>

            <%= render Vutuv.IconView, "pencil.html" %>

        <% end %>
        <% end %>

<%= gettext "Social Media" %>

        <%= for account <- @user.social_media_accounts do %>

<%= account.provider %>

<%= Vutuv.SocialMediaAccount.social_media_link account %>

        <% end %>

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

    <% end %>

<%= gettext "Exports" %>

<%= gettext "Vcard" %>

<%= link gettext("Download"), to: api_user_v_card_path(@conn, :get, @user) %>

  <section class="card half<%= if @follower_count == 0, do: " card--empty" %>">

<%= gettext "Followers" %>

    <%= if(@follower_count > 0) do %>

    <%= render "card_list.html", conn: @conn, users: @user.followers, current_user: @current_user, current_user_id: @current_user_id, work_string_length: 20 %>

    <% else %>

<%= gettext "No Followers yet!" %>

    <% end %>
    <%= if(@follower_count > 3) do %>
      <%= link "#{@follower_count-3} #{gettext "More"}", to: user_follower_path(@conn, :index, @user), class: "card__morelink" %>
    <% end %>

    <%= if(@followee_count > 0) do %>

<%= gettext "Following" %>

        <%= if(@followee_count > 0) do %>
          <%= render "card_list.html", conn: @conn, users: @user.followees, current_user: @current_user, current_user_id: @current_user_id, work_string_length: 20 %>
        <% else %>

<%= gettext "Not following anyone yet!" %>

        <% end %>
        <%= if(@followee_count > 3) do %>
          <%= link "#{@followee_count-3} #{gettext "More"}", to: user_followee_path(@conn, :index, @user), class: "card__morelink" %>
        <% end %>
      <% else %>

<%= gettext "Recommended" %>

        <%= render Vutuv.UserView, "card_list.html", Map.put(assigns, :users, @reccomended_users) %>
      <% end %>

    <%= if @total_jobs > 0 or same_user?(@user, @current_user) do %>

<%= gettext "Experience" %>

    <%= if @total_jobs > 0 do %>
    <%= render Vutuv.WorkExperienceView, "card_list.html", assigns %>

    <% else %>

    <% end %>

      <%= if same_user?(@user, @current_user) do %>
        <%= link gettext("Add"), to: user_work_experience_path(@conn, :new, @current_user) %>
      <% end %>
      <%= if same_user?(@user, @current_user) and @total_jobs > 5 do %> | <% end %>
      <%= if @total_jobs > 5 do %>
        <%= link gettext("View All"), to: user_work_experience_path(@conn, :index, @user) %>
      <% end %>

  <% end %>

  <%= if @total_numbers > 0 or same_user?(@user, @current_user) do %>

<%= gettext "Phone Numbers" %>

    <%= if @total_numbers > 0 do %>
    <%= render Vutuv.PhoneNumberView, "card_list.html", phone_numbers: @user.phone_numbers, user: @user, conn: @conn, current_user: @current_user %>
    <% end %>

      <%= if same_user?(@user, @current_user) do %>
        <%= link gettext("Add"), to: user_phone_number_path(@conn, :new, @current_user) %>
      <% end %>
      <%= if same_user?(@user, @current_user) and @total_numbers > 5 do %> | <% end %>
      <%= if @total_numbers > 5 do %>
        <%= link gettext("View All"), to: user_phone_number_path(@conn, :index, @user) %>
      <% end %>

  <% end %>

  <%= if @total_links > 0 or same_user?(@user, @current_user) do %>

<%= gettext "Links" %>

    <%= if @total_links > 0 do %>
    <%= render Vutuv.UrlView, "card_list.html", urls: @user.urls, user: @user, conn: @conn, current_user: @current_user %>
    <% end %>

      <%= if same_user?(@user, @current_user) do %>
        <%= link gettext("Add"), to: user_url_path(@conn, :new, @current_user) %>
      <% end %>
      <%= if same_user?(@user, @current_user) and @total_links > 5 do %> | <% end %>
      <%= if @total_links > 5 do %>
        <%= link gettext("View All"), to: user_url_path(@conn, :index, @user) %>
      <% end %>

  <% end %>

  <%= if @total_addresses > 0 or same_user?(@user, @current_user) do %>

<%= gettext "Addresses" %>

    <%= if @total_addresses > 0 do %>
    <%= render Vutuv.AddressView, "card_list.html", addresses: @user.addresses, user: @user, conn: @conn, current_user: @current_user %>
    <% end %>

      <%= if same_user?(@user, @current_user) do %>
        <%= link gettext("Add"), to: user_address_path(@conn, :new, @current_user) %>
      <% end %>
      <%= if same_user?(@user, @current_user) and @total_addresses > 5 do %> | <% end %>
      <%= if @total_addresses > 5 do %>
        <%= link gettext("View All"), to: user_address_path(@conn, :index, @user) %>
      <% end %>

  <% end %>


add margin-top-2 back to footer

add margin-top-2 back to footer

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

Supporting the BEAM community

                  Contact us : eef@erlef.org

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.


Smooth the history graph lines. Fix #89

Smooth the history graph lines. Fix #89


remove uneeded stuff...

remove uneeded stuff...

<%= form_tag @session_create_url, class: "login" do %>

    Email
    <input id="email" class="form-control" type="email" name="email" value="<%= @conn.params["email"] %>" required />

    Password
    <input id="password" class="form-control" type="password" name="password" required />

    <button class="btn btn-primary">Login

<% end %>

<%= form_tag @session_create_url, method: "post", class: "login", novalidate: true do %>

    Email
    <input id="email" class="form-control" type="email" name="email" value="<%= @conn.params["email"] %>" required />

    Password
    <input id="password" class="form-control" type="password" name="password" required />

    <button class="btn btn-primary">Login

<% end %>


Making comments clearer gallerywalk

Making comments clearer gallerywalk

    <%= form_for @conn, commentstream_path(@conn, :submit), [name: :search],
    fn _ -> %>

      <%= raw ParamSession.form_session @conn %>
      <input type='hidden' name='f[resourcetype]' value='<%= @comments.resourcetype %>'>
      <input type='hidden' name='f[identifier]' value='<%= @comments.identifier %>'>
      <fieldset>

Comments

        <%= if @comments.comments && !Enum.empty?(@comments.comments) do %>
          <%= for comment <- Enum.reverse(@comments.comments) do %>

<%= comment["text"] %>
              (<%= comment["nick"] %>)

          <% end %>
        <% end %>

        Add new comment

          <textarea id="comment_area" name='f[comment]'></textarea>

Submit comment

        </fieldset>
      <% end %>


Fixed mislinking of emails

Fixed mislinking of emails

Closes #414

<%# header tag begins in parent template %>
  <div class="profile-header<%= if @user.verified, do: " profile-header--verified" %>">

      <img src="<%= Vutuv.Avatar.binary(@user, :medium) %>">

        <%= full_name(@user) %>
        <%= if !@user.verified and admin_visitor?(@conn) do %>
          <%= button to: admin_user_path(@conn, :update, user_id: @user.id), class: "button button--icon navigation__icon", form: [class: "button button--icon"], method: "post" do %>
            <i title="<%= gettext("Verify") %>" class="icon icon--lock">
          <% end %>
        <% end %>
        <%= if same_user?(@user, @current_user) do %>
        <%= link to: user_path(@conn, :edit, @user), class: "profile-header__edit button button--icon button--small" do %>

        <% end %>
        <% end %>

        <%= work_information_string(@user, 30) %>

    <%= if @user.verified do %>
      Verified profile
    <% end %>

        <%= if(@follower_count>0) do %>

<%= short_name(@user) %> <%= gettext "has" %><%= @follower_count %> <%= gettext "followers" %>

        <% end %>
        <%= if is_visitor?(@conn, @current_user) do %>
          <%= if user_follows_user?(@current_user, @user) do %>
            <%= button to: connection_path(@conn, :delete, user_follows_user?(@current_user, @user)), method: :delete , class: "button button-link button--unfollow", form: [class: "button--unfollow"] do %>
               Unfollow
            <% end %>
          <%= else %>
            <%= button to: connection_path(@conn, :create, connection: %{follower_id: @current_user_id, followee_id: @user.id}), method: :post , class: "button button-link", form: [class: "button--slim"] do %>
               Follow
            <% end %>
          <% end %>
        <% end %>

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

  <%= gettext "Users" %> / <%= full_name @user %>

  <%= if @display_welcome_message do %>
    <%= if same_user?(@user, @current_user) do %>
      <%= if Enum.count(@user_skills) == 0 do %>

<%= gettext "Your New vutuv Profile Page" %>

            <%= gettext "Please take a couple of minutes to add information that might be interesting for your future followers. Why don't you start with your skills and work experiences?" %>

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

  <%= if Enum.count(@user_skills) > 0 or same_user?(@user, @current_user) do %>

<%= gettext "Skills" %>

    <%= if Enum.count(@user_skills) > 0 do %>
    <%= render Vutuv.UserSkillView, "card_list.html", assigns %>
    <% end %>

    <%= if same_user?(@user, @current_user) do %>
      <% #Form for easy skill entry %>
      <%= if Enum.count(@user_skills) == 0 do %>
        <%= form_for @conn, user_path(@conn, :skills_create, @user), [as: :skills, class: "editform"], fn f -> %>
          <div class="editform__field<%= if error_tag(f, :name), do: " editform__field--error"%>">
            <%= label f, :skills, gettext("Enter comma seperated skills here") %>
            <%= text_input f, :skills, placeholder: gettext("PHP, JavaScript, Tap Dancing, Origami"), autofocus: true %>
            <%= error_tag f, :skills %>

            <%= submit gettext("Add"), class: "button button--full" %>

        <% end %>
      <% end %>
    <% end %>
    <%= if Enum.count(@user_skills) > 0 do %>

        <%= if same_user?(@user, @current_user) do %>
          <%= link gettext("Add"), to: user_user_skill_path(@conn, :new, @current_user) %>
        <% end %>
        <%= if same_user?(@user, @current_user) and Enum.count(@user.user_skills) > 4 do %> | <% end %>
        <%= if Enum.count(@user.user_skills) > 4 do %>
          <%= link gettext("View All"), to: user_user_skill_path(@conn, :index, @user)%>
        <% end %>

    <% end %>

  <% end %>

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

    <%= if(Enum.count(@emails) > 0 or same_user?(@user, @current_user)) do %>

      <%= if same_user?(@user, @current_user) do %>
      <%= link to: user_email_path(@conn, :index, @user), class: "card__edit button button--icon button--small" do %>

      <% end %>
      <% end %>

<%= gettext "Contact" %>

      <%= if(Enum.count(@emails) > 0) do %>

<%= if (Enum.count(@emails) == 1), do: gettext("Email"), else: gettext("Emails") %>

        <%= for email <- @emails do %>

<a href="mailto:<%= email.value %>"><%= email.value %>

        <% end %>

      <% end %>

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

    <% end %>

    <%= if(@user.headline || @user.birthdate || same_user?(@user, @current_user)) do %>

        <%= if same_user?(@user, @current_user) do %>
        <%= link to: user_path(@conn, :edit, @user), class: "card__edit button button--icon button--small" do %>

        <% end %>
        <% end %>

<%= gettext "General Info" %>

        <%= if @user.headline || same_user?(@user, @current_user) do %>

<%= @user.headline %>

        <% end %>

          <%= if(@user.gender != "other" && @user.gender) do %>

<%= gettext "Gender" %>

<%= Vutuv.User.gender_gettext(@user.gender) %>

          <% end %>
          <%= if(@user.birthdate) do %>

<%= gettext "Birthday" %>

<%= format_birthdate(@user) %>

          <% end %>

    <% end %>

    <%= if Enum.count(@user.social_media_accounts) > 0 or same_user?(@user, @current_user) do %>

        <%= if same_user?(@user, @current_user) do %>
        <%= link to: user_social_media_account_path(@conn, :index, @user), class: "card__edit button button--icon button--small" do %>

        <% end %>
        <% end %>

<%= gettext "Social Media" %>

        <%= for account <- @user.social_media_accounts do %>

<%= account.provider %>

<%= Vutuv.SocialMediaAccount.social_media_link account %>

        <% end %>

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

    <% end %>

<%= gettext "Exports" %>

<%= gettext "Vcard" %>

<%= link gettext("Download"), to: api_user_v_card_path(@conn, :get, @user) %>

  <section class="card half<%= if @follower_count == 0, do: " card--empty" %>">

<%= gettext "Followers" %>

    <%= if(@follower_count > 0) do %>

    <%= render "card_list.html", conn: @conn, users: @user.followers, current_user: @current_user, current_user_id: @current_user_id, work_string_length: 20 %>

    <% else %>

<%= gettext "No Followers yet!" %>

    <% end %>
    <%= if(@follower_count > 3) do %>
      <%= link "#{@follower_count-3} #{gettext "More"}", to: user_follower_path(@conn, :index, @user), class: "card__morelink" %>
    <% end %>

<%= gettext "Following" %>

    <%= if(@followee_count > 0) do %>

    <%= render "card_list.html", conn: @conn, users: @user.followees, current_user: @current_user, current_user_id: @current_user_id, work_string_length: 20 %>

    <% else %>

<%= gettext "Not following anyone yet!" %>

    <% end %>
    <%= if(@followee_count > 3) do %>
      <%= link "#{@followee_count-3} #{gettext "More"}", to: user_followee_path(@conn, :index, @user), class: "card__morelink" %>
    <% end %>

    <%= if @total_jobs > 0 or same_user?(@user, @current_user) do %>

<%= gettext "Experience" %>

    <%= if @total_jobs > 0 do %>
    <%= render Vutuv.WorkExperienceView, "card_list.html", assigns %>

    <% else %>

    <% end %>

      <%= if same_user?(@user, @current_user) do %>
        <%= link gettext("Add"), to: user_work_experience_path(@conn, :new, @current_user) %>
      <% end %>
      <%= if same_user?(@user, @current_user) and @total_jobs>3 do %> | <% end %>
      <%= if @total_jobs>3 do %>
        <%= link gettext("View All"), to: user_work_experience_path(@conn, :index, @user) %>
      <% end %>

  <% end %>

  <%= if @total_numbers > 0 or same_user?(@user, @current_user) do %>

<%= gettext "Phone Numbers" %>

    <%= if @total_numbers > 0 do %>
    <%= render Vutuv.PhoneNumberView, "card_list.html", phone_numbers: @user.phone_numbers, user: @user, conn: @conn, current_user: @current_user %>
    <% end %>

      <%= if same_user?(@user, @current_user) do %>
        <%= link gettext("Add"), to: user_phone_number_path(@conn, :new, @current_user) %>
      <% end %>
      <%= if same_user?(@user, @current_user) and @total_numbers > 3 do %> | <% end %>
      <%= if @total_numbers>3 do %>
        <%= link gettext("View All"), to: user_phone_number_path(@conn, :index, @user) %>
      <% end %>

  <% end %>

  <%= if @total_links > 0 or same_user?(@user, @current_user) do %>

<%= gettext "Links" %>

    <%= if @total_links > 0 do %>
    <%= render Vutuv.UrlView, "card_list.html", urls: @user.urls, user: @user, conn: @conn, current_user: @current_user %>
    <% end %>

      <%= if same_user?(@user, @current_user) do %>
        <%= link gettext("Add"), to: user_url_path(@conn, :new, @current_user) %>
      <% end %>
      <%= if same_user?(@user, @current_user) and @total_links > 3 do %> | <% end %>
      <%= if @total_links>3 do %>
        <%= link gettext("View All"), to: user_url_path(@conn, :index, @user) %>
      <% end %>

  <% end %>

  <%= if @total_addresses > 0 or same_user?(@user, @current_user) do %>

<%= gettext "Addresses" %>

    <%= if @total_addresses > 0 do %>
    <%= render Vutuv.AddressView, "card_list.html", addresses: @user.addresses, user: @user, conn: @conn, current_user: @current_user %>
    <% end %>

      <%= if same_user?(@user, @current_user) do %>
        <%= link gettext("Add"), to: user_address_path(@conn, :new, @current_user) %>
      <% end %>
      <%= if same_user?(@user, @current_user) and @total_addresses > 3 do %> | <% end %>
      <%= if @total_addresses>3 do %>
        <%= link gettext("View All"), to: user_address_path(@conn, :index, @user) %>
      <% end %>

  <% end %>

<%# header tag begins in parent template %>
  <div class="profile-header<%= if @user.verified, do: " profile-header--verified" %>">

      <img src="<%= Vutuv.Avatar.binary(@user, :medium) %>">

        <%= full_name(@user) %>
        <%= if !@user.verified and admin_visitor?(@conn) do %>
          <%= button to: admin_user_path(@conn, :update, user_id: @user.id), class: "button button--icon navigation__icon", form: [class: "button button--icon"], method: "post" do %>
            <i title="<%= gettext("Verify") %>" class="icon icon--lock">
          <% end %>
        <% end %>
        <%= if same_user?(@user, @current_user) do %>
        <%= link to: user_path(@conn, :edit, @user), class: "profile-header__edit button button--icon button--small" do %>

        <% end %>
        <% end %>

        <%= work_information_string(@user, 30) %>

    <%= if @user.verified do %>
      Verified profile
    <% end %>

        <%= if(@follower_count>0) do %>

<%= short_name(@user) %> <%= gettext "has" %><%= @follower_count %> <%= gettext "followers" %>

        <% end %>
        <%= if is_visitor?(@conn, @current_user) do %>
          <%= if user_follows_user?(@current_user, @user) do %>
            <%= button to: connection_path(@conn, :delete, user_follows_user?(@current_user, @user)), method: :delete , class: "button button-link button--unfollow", form: [class: "button--unfollow"] do %>
               Unfollow
            <% end %>
          <%= else %>
            <%= button to: connection_path(@conn, :create, connection: %{follower_id: @current_user_id, followee_id: @user.id}), method: :post , class: "button button-link", form: [class: "button--slim"] do %>
               Follow
            <% end %>
          <% end %>
        <% end %>

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

  <%= gettext "Users" %> / <%= full_name @user %>

  <%= if @display_welcome_message do %>
    <%= if same_user?(@user, @current_user) do %>
      <%= if Enum.count(@user_skills) == 0 do %>

<%= gettext "Your New vutuv Profile Page" %>

            <%= gettext "Please take a couple of minutes to add information that might be interesting for your future followers. Why don't you start with your skills and work experiences?" %>

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

  <%= if Enum.count(@user_skills) > 0 or same_user?(@user, @current_user) do %>

<%= gettext "Skills" %>

    <%= if Enum.count(@user_skills) > 0 do %>
    <%= render Vutuv.UserSkillView, "card_list.html", assigns %>
    <% end %>

    <%= if same_user?(@user, @current_user) do %>
      <% #Form for easy skill entry %>
      <%= if Enum.count(@user_skills) == 0 do %>
        <%= form_for @conn, user_path(@conn, :skills_create, @user), [as: :skills, class: "editform"], fn f -> %>
          <div class="editform__field<%= if error_tag(f, :name), do: " editform__field--error"%>">
            <%= label f, :skills, gettext("Enter comma seperated skills here") %>
            <%= text_input f, :skills, placeholder: gettext("PHP, JavaScript, Tap Dancing, Origami"), autofocus: true %>
            <%= error_tag f, :skills %>

            <%= submit gettext("Add"), class: "button button--full" %>

        <% end %>
      <% end %>
    <% end %>
    <%= if Enum.count(@user_skills) > 0 do %>

        <%= if same_user?(@user, @current_user) do %>
          <%= link gettext("Add"), to: user_user_skill_path(@conn, :new, @current_user) %>
        <% end %>
        <%= if same_user?(@user, @current_user) and Enum.count(@user.user_skills) > 4 do %> | <% end %>
        <%= if Enum.count(@user.user_skills) > 4 do %>
          <%= link gettext("View All"), to: user_user_skill_path(@conn, :index, @user)%>
        <% end %>

    <% end %>

  <% end %>

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

    <%= if(Enum.count(@emails) > 0 or same_user?(@user, @current_user)) do %>

      <%= if same_user?(@user, @current_user) do %>
      <%= link to: user_email_path(@conn, :index, @user), class: "card__edit button button--icon button--small" do %>

      <% end %>
      <% end %>

<%= gettext "Contact" %>

      <%= if(Enum.count(@emails) > 0) do %>

<%= if (Enum.count(@emails) == 1), do: gettext("Email"), else: gettext("Emails") %>

        <%= for email <- @emails do %>

<a href="mailto:<%= email(@user) %>"><%= email.value %>

        <% end %>

      <% end %>

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

    <% end %>

    <%= if(@user.headline || @user.birthdate || same_user?(@user, @current_user)) do %>

        <%= if same_user?(@user, @current_user) do %>
        <%= link to: user_path(@conn, :edit, @user), class: "card__edit button button--icon button--small" do %>

        <% end %>
        <% end %>

<%= gettext "General Info" %>

        <%= if @user.headline || same_user?(@user, @current_user) do %>

<%= @user.headline %>

        <% end %>

          <%= if(@user.gender != "other" && @user.gender) do %>

<%= gettext "Gender" %>

<%= Vutuv.User.gender_gettext(@user.gender) %>

          <% end %>
          <%= if(@user.birthdate) do %>

<%= gettext "Birthday" %>

<%= format_birthdate(@user) %>

          <% end %>

    <% end %>

    <%= if Enum.count(@user.social_media_accounts) > 0 or same_user?(@user, @current_user) do %>

        <%= if same_user?(@user, @current_user) do %>
        <%= link to: user_social_media_account_path(@conn, :index, @user), class: "card__edit button button--icon button--small" do %>

        <% end %>
        <% end %>

<%= gettext "Social Media" %>

        <%= for account <- @user.social_media_accounts do %>

<%= account.provider %>

<%= Vutuv.SocialMediaAccount.social_media_link account %>

        <% end %>

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

    <% end %>

<%= gettext "Exports" %>

<%= gettext "Vcard" %>

<%= link gettext("Download"), to: api_user_v_card_path(@conn, :get, @user) %>

  <section class="card half<%= if @follower_count == 0, do: " card--empty" %>">

<%= gettext "Followers" %>

    <%= if(@follower_count > 0) do %>

    <%= render "card_list.html", conn: @conn, users: @user.followers, current_user: @current_user, current_user_id: @current_user_id, work_string_length: 20 %>

    <% else %>

<%= gettext "No Followers yet!" %>

    <% end %>
    <%= if(@follower_count > 3) do %>
      <%= link "#{@follower_count-3} #{gettext "More"}", to: user_follower_path(@conn, :index, @user), class: "card__morelink" %>
    <% end %>

<%= gettext "Following" %>

    <%= if(@followee_count > 0) do %>

    <%= render "card_list.html", conn: @conn, users: @user.followees, current_user: @current_user, current_user_id: @current_user_id, work_string_length: 20 %>

    <% else %>

<%= gettext "Not following anyone yet!" %>

    <% end %>
    <%= if(@followee_count > 3) do %>
      <%= link "#{@followee_count-3} #{gettext "More"}", to: user_followee_path(@conn, :index, @user), class: "card__morelink" %>
    <% end %>

    <%= if @total_jobs > 0 or same_user?(@user, @current_user) do %>

<%= gettext "Experience" %>

    <%= if @total_jobs > 0 do %>
    <%= render Vutuv.WorkExperienceView, "card_list.html", assigns %>

    <% else %>

    <% end %>

      <%= if same_user?(@user, @current_user) do %>
        <%= link gettext("Add"), to: user_work_experience_path(@conn, :new, @current_user) %>
      <% end %>
      <%= if same_user?(@user, @current_user) and @total_jobs>3 do %> | <% end %>
      <%= if @total_jobs>3 do %>
        <%= link gettext("View All"), to: user_work_experience_path(@conn, :index, @user) %>
      <% end %>

  <% end %>

  <%= if @total_numbers > 0 or same_user?(@user, @current_user) do %>

<%= gettext "Phone Numbers" %>

    <%= if @total_numbers > 0 do %>
    <%= render Vutuv.PhoneNumberView, "card_list.html", phone_numbers: @user.phone_numbers, user: @user, conn: @conn, current_user: @current_user %>
    <% end %>

      <%= if same_user?(@user, @current_user) do %>
        <%= link gettext("Add"), to: user_phone_number_path(@conn, :new, @current_user) %>
      <% end %>
      <%= if same_user?(@user, @current_user) and @total_numbers > 3 do %> | <% end %>
      <%= if @total_numbers>3 do %>
        <%= link gettext("View All"), to: user_phone_number_path(@conn, :index, @user) %>
      <% end %>

  <% end %>

  <%= if @total_links > 0 or same_user?(@user, @current_user) do %>

<%= gettext "Links" %>

    <%= if @total_links > 0 do %>
    <%= render Vutuv.UrlView, "card_list.html", urls: @user.urls, user: @user, conn: @conn, current_user: @current_user %>
    <% end %>

      <%= if same_user?(@user, @current_user) do %>
        <%= link gettext("Add"), to: user_url_path(@conn, :new, @current_user) %>
      <% end %>
      <%= if same_user?(@user, @current_user) and @total_links > 3 do %> | <% end %>
      <%= if @total_links>3 do %>
        <%= link gettext("View All"), to: user_url_path(@conn, :index, @user) %>
      <% end %>

  <% end %>

  <%= if @total_addresses > 0 or same_user?(@user, @current_user) do %>

<%= gettext "Addresses" %>

    <%= if @total_addresses > 0 do %>
    <%= render Vutuv.AddressView, "card_list.html", addresses: @user.addresses, user: @user, conn: @conn, current_user: @current_user %>
    <% end %>

      <%= if same_user?(@user, @current_user) do %>
        <%= link gettext("Add"), to: user_address_path(@conn, :new, @current_user) %>
      <% end %>
      <%= if same_user?(@user, @current_user) and @total_addresses > 3 do %> | <% end %>
      <%= if @total_addresses>3 do %>
        <%= link gettext("View All"), to: user_address_path(@conn, :index, @user) %>
      <% end %>

  <% end %>