Fix issue with loading of code paths

Fix issue with loading of code paths

#!/usr/bin/env escript
%%! -noshell -noinput
%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ft=erlang ts=4 sw=4 et

-define(TIMEOUT, 300000).
-define(INFO(Fmt,Args), io:format(Fmt,Args)).

%% Unpack or upgrade to a new tar.gz release
main(["unpack_release", RelName, NameTypeArg, NodeName, Cookie, VersionArg]) ->
    TargetNode = start_distribution(NodeName, NameTypeArg, Cookie),
    WhichReleases = which_releases(TargetNode),
    Version = parse_version(VersionArg),
    case proplists:get_value(Version, WhichReleases) of
        undefined ->
            %% not installed, so unpack tarball:
            ?INFO("Release ~s not found, attempting to unpack releases/~s/~s.tar.gz~n",[Version,Version,RelName]),
            ReleasePackage = Version ++ "/" ++ RelName,
            case rpc:call(TargetNode, release_handler, unpack_release,
                          [ReleasePackage], ?TIMEOUT) of
                {ok, Vsn} ->
                    ?INFO("Unpacked successfully: ~p~n", [Vsn]);
                {error, UnpackReason} ->
                    print_existing_versions(TargetNode),
                    ?INFO("Unpack failed: ~p~n",[UnpackReason]),
                    erlang:halt(2)
            end;
        old ->
            %% no need to unpack, has been installed previously
            ?INFO("Release ~s is already unpacked~n",[Version]);
        unpacked ->
            ?INFO("Release ~s is already unpacked~n",[Version]);
        current ->
            ?INFO("Release ~s is already unpacked~n",[Version]);
        permanent ->
            ?INFO("Release ~s is already unpacked~n",[Version])
    end;

%% Install a release and make it permanent
main(["install_release", RelName, NameTypeArg, NodeName, Cookie, VersionArg]) ->
    TargetNode = start_distribution(NodeName, NameTypeArg, Cookie),
    WhichReleases = which_releases(TargetNode),
    Version = parse_version(VersionArg),
    case proplists:get_value(Version, WhichReleases) of
        undefined ->
            %% not installed, so unpack tarball:
            ?INFO("Release ~s not found, attempting to unpack releases/~s/~s.tar.gz~n",[Version,Version,RelName]),
            ReleasePackage = Version ++ "/" ++ RelName,
            case rpc:call(TargetNode, release_handler, unpack_release,
                          [ReleasePackage], ?TIMEOUT) of
                {ok, Vsn} ->
                    ?INFO("Unpacked successfully: ~p~n", [Vsn]),
                    install_and_permafy(TargetNode, RelName, Vsn);
                {error, UnpackReason} ->
                    print_existing_versions(TargetNode),
                    ?INFO("Unpack failed: ~p~n",[UnpackReason]),
                    erlang:halt(2)
            end;
        old ->
            %% no need to unpack, has been installed previously
            ?INFO("Release ~s is marked old, switching to it.~n",[Version]),
            install_and_permafy(TargetNode, RelName, Version);
        unpacked ->
            ?INFO("Release ~s is already unpacked, now installing.~n",[Version]),
            install_and_permafy(TargetNode, RelName, Version);
        current -> %% installed and in-use, just needs to be permanent
            ?INFO("Release ~s is already installed and current. Making permanent.~n",[Version]),
            permafy(TargetNode, RelName, Version);
        permanent ->
            ?INFO("Release ~s is already installed, and set permanent.~n",[Version])
    end;

%% Build a list of code paths for the current release version
main(["get_code_paths", RootDir, ErtsDir, RelName, RelVsn]) ->
    {ok, {release,_,_,_,Libs,_}} = select_RELEASE(RootDir, ErtsDir, RelName, RelVsn),
    lists:foreach(fun({_LibName, _LibVer, LibDir}) ->
                        io:fwrite("-pa ~s/ebin ", [LibDir])
                  end, Libs);

%% Invalid command, return error
main(_) ->
    erlang:halt(1).

parse_version(V) when is_list(V) ->
    hd(string:tokens(V,"/")).

install_and_permafy(TargetNode, RelName, Vsn) ->
    case rpc:call(TargetNode, release_handler, check_install_release, [Vsn], ?TIMEOUT) of
        {ok, _OtherVsn, _Desc} ->
            ok;
        {error, Reason} ->
            ?INFO("ERROR: release_handler:check_install_release failed: ~p~n",[Reason]),
            erlang:halt(3)
    end,
    case rpc:call(TargetNode, release_handler, install_release,
                  [Vsn, [{update_paths, true}]], ?TIMEOUT) of
        {ok, _, _} ->
            ?INFO("Installed Release: ~s~n", [Vsn]),
            permafy(TargetNode, RelName, Vsn),
            ok;
        {error, {no_such_release, Vsn}} ->
            VerList =
                iolist_to_binary(
                    [io_lib:format("* ~s\t~s~n",[V,S]) ||  {V,S} <- which_releases(TargetNode)]),
            ?INFO("Installed versions:~n~s", [VerList]),
            ?INFO("ERROR: Unable to revert to '~s' - not installed.~n", [Vsn]),
            erlang:halt(2);
        %% As described in http://erlang.org/doc/man/appup.html,
        %% when executing a relup containing soft_purge instructions:
        %%     If the value is soft_purge, release_handler:install_release/1
        %%     returns {error, {old_processes, Mod}}
        {error, {old_processes, Mod}} ->
            ?INFO("ERROR: unable to install '~s' - old processes still running code from ~p~n",
                  [Vsn, Mod]),
            erlang:halt(3);
        {error, InstallFailedReason} ->
            ?INFO("ERROR: release_handler:install_release failed: ~p~n", [InstallFailedReason]),
            erlang:halt(3)
    end.

permafy(TargetNode, RelName, Vsn) ->
    ok = rpc:call(TargetNode, release_handler, make_permanent, [Vsn], ?TIMEOUT),
    file:copy(filename:join(["bin", RelName++"-"++Vsn]),
              filename:join(["bin", RelName])),
    ?INFO("Made release permanent: ~p~n", [Vsn]),
    ok.

which_releases(TargetNode) ->
    R = rpc:call(TargetNode, release_handler, which_releases, [], ?TIMEOUT),
    [ {V, S} ||  {_,V,_, S} <- R ].

print_existing_versions(TargetNode) ->
    VerList = iolist_to_binary([
            io_lib:format("* ~s\t~s~n",[V,S])
            ||  {V,S} <- which_releases(TargetNode) ]),
    ?INFO("Installed versions:~n~s", [VerList]).

start_distribution(NodeName, NameTypeArg, Cookie) ->
    MyNode = make_script_node(NodeName),
    {ok, _Pid} = net_kernel:start([MyNode, get_name_type(NameTypeArg)]),
    erlang:set_cookie(node(), list_to_atom(Cookie)),
    TargetNode = list_to_atom(NodeName),
    case {net_kernel:connect_node(TargetNode),
          net_adm:ping(TargetNode)} of
        {true, pong} ->
            ok;
        {_, pang} ->
            io:format("Node ~p not responding to pings.\n", [TargetNode]),
            erlang:halt(1)
    end,
    {ok, Cwd} = file:get_cwd(),
    ok = rpc:call(TargetNode, file, set_cwd, [Cwd], ?TIMEOUT),
    TargetNode.

make_script_node(Node) ->
    [Name, Host] = string:tokens(Node, "@"),
    list_to_atom(lists:concat([Name, "_upgrader_", os:getpid(), "@", Host])).

%% get name type from arg
get_name_type(NameTypeArg) ->
  case NameTypeArg of
    "-sname" ->
      shortnames;
    _ ->
      longnames
  end.

%% Selects a specific release from RELEASES
select_RELEASE(RootDir, ErtsDir, RelName, RelVsn) ->
    Releases = get_RELEASES(RootDir, ErtsDir),
    select_RELEASE(Releases, RelName, RelVsn).
select_RELEASE([], _RelName, _RelVsn) ->
    {error, no_such_release};
select_RELEASE([{release, RelName, RelVsn, _ErtsVsn, _Libs, _Status} = Release | _], RelName, RelVsn) ->
    {ok, Release};
select_RELEASE([_|Rest], RelName, RelVsn) ->
    select_RELEASE(Rest, RelName, RelVsn).

%% Gets the RELEASES file and returns it with all paths fixed
get_RELEASES(RootDir, ErtsDir) ->
    ReleasesFile = filename:join([RootDir, "releases", "RELEASES"]),
    {ok, [Releases]} = file:consult(ReleasesFile),
    FixedReleases = lists:map(fun(Release) ->
                                  fix_release(Release, RootDir, ErtsDir)
                              end, Releases),
    FixedReleases.

%% Used to fix invalid paths in RELEASES
fix_release({release, RelName, RelVsn, ErtsVsn, Libs, Status} = Release, RootDir, ErtsDir) ->
    CurrentErtsVsn = extract_erts_vsn(ErtsDir),
    case {string:rstr(ErtsDir, RootDir), CurrentErtsVsn} of
        {0, ErtsVsn} ->
            %% We are using the host ERTS, and it matches the ERTS version
            %% from RELEASES, which means we just need to make sure the path is up to date
            FixedLibs = lists:map(fun({LibName, LibVsn, _LibDir} = Lib) ->
                                        case is_erts_lib(ErtsDir, LibName) of
                                            true ->
                                                case get_erts_lib(ErtsDir, LibName, LibVsn) of
                                                    RealLibDir ->
                                                        {LibName, LibVsn, RealLibDir};
                                                    false ->
                                                        io:fwrite("Invalid RELEASES: could not find lib ~p~p in ~s.",
                                                            [LibName, LibVsn, ErtsDir])
                                                end;
                                            false ->
                                                Lib
                                        end
                                end, Libs),
            {release, RelName, RelVsn, ErtsVsn, FixedLibs, Status};
        {0, _Other} ->
            %% As stated here, we didn't include ERTS, and the host version does
            %% not match that of the host, this may not be a problem if the lib
            %% versions are the same and/or compatible, but we can't assume that
            io:fwrite("Invalid RELEASES: specified ERTS (~p) does not match host (~p).", [ErtsVsn, CurrentErtsVsn]),
            erlang:halt(2);
        {_, _} ->
            %% If we've included ERTS, we don't need to fix anything
            Release
    end;
fix_release(Release, _RootDir, _ErtsDir) ->
    Release.

%% Determines if the given app name is an ERTS lib
is_erts_lib(ErtsDir, AppName) ->
    LibDir = filename:join([ErtsDir, "..", "lib"]),
    Pattern = filename:flatten([AppName, "-*"]),
    case filelib:wildcard(filename:join([LibDir, Pattern])) of
        [] -> false;
        _  -> true
    end.

%% Returns the absolute path to an ERTS lib, or false if it doesn't exist
get_erts_lib(ErtsDir, AppName, AppVsn) ->
    LibDir = filename:join([ErtsDir, "..", "lib"]),
    Pattern = filename:flatten([AppName, "-", AppVsn]),
    case filelib:wildcard(filename:join([LibDir, Pattern])) of
        [] -> false;
        [AppDir] -> AppDir
    end.

%% Given a path to the ERTS directory, get the ERTS version number
extract_erts_vsn(ErtsDir) ->
    "erts-" ++ Vsn = filename:basename(ErtsDir),
    Vsn.

#!/usr/bin/env escript
%%! -noshell -noinput
%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ft=erlang ts=4 sw=4 et

-define(TIMEOUT, 300000).
-define(INFO(Fmt,Args), io:format(Fmt,Args)).

%% Unpack or upgrade to a new tar.gz release
main(["unpack_release", RelName, NameTypeArg, NodeName, Cookie, VersionArg]) ->
    TargetNode = start_distribution(NodeName, NameTypeArg, Cookie),
    WhichReleases = which_releases(TargetNode),
    Version = parse_version(VersionArg),
    case proplists:get_value(Version, WhichReleases) of
        undefined ->
            %% not installed, so unpack tarball:
            ?INFO("Release ~s not found, attempting to unpack releases/~s/~s.tar.gz~n",[Version,Version,RelName]),
            ReleasePackage = Version ++ "/" ++ RelName,
            case rpc:call(TargetNode, release_handler, unpack_release,
                          [ReleasePackage], ?TIMEOUT) of
                {ok, Vsn} ->
                    ?INFO("Unpacked successfully: ~p~n", [Vsn]);
                {error, UnpackReason} ->
                    print_existing_versions(TargetNode),
                    ?INFO("Unpack failed: ~p~n",[UnpackReason]),
                    erlang:halt(2)
            end;
        old ->
            %% no need to unpack, has been installed previously
            ?INFO("Release ~s is already unpacked~n",[Version]);
        unpacked ->
            ?INFO("Release ~s is already unpacked~n",[Version]);
        current ->
            ?INFO("Release ~s is already unpacked~n",[Version]);
        permanent ->
            ?INFO("Release ~s is already unpacked~n",[Version])
    end;

%% Install a release and make it permanent
main(["install_release", RelName, NameTypeArg, NodeName, Cookie, VersionArg]) ->
    TargetNode = start_distribution(NodeName, NameTypeArg, Cookie),
    WhichReleases = which_releases(TargetNode),
    Version = parse_version(VersionArg),
    case proplists:get_value(Version, WhichReleases) of
        undefined ->
            %% not installed, so unpack tarball:
            ?INFO("Release ~s not found, attempting to unpack releases/~s/~s.tar.gz~n",[Version,Version,RelName]),
            ReleasePackage = Version ++ "/" ++ RelName,
            case rpc:call(TargetNode, release_handler, unpack_release,
                          [ReleasePackage], ?TIMEOUT) of
                {ok, Vsn} ->
                    ?INFO("Unpacked successfully: ~p~n", [Vsn]),
                    install_and_permafy(TargetNode, RelName, Vsn);
                {error, UnpackReason} ->
                    print_existing_versions(TargetNode),
                    ?INFO("Unpack failed: ~p~n",[UnpackReason]),
                    erlang:halt(2)
            end;
        old ->
            %% no need to unpack, has been installed previously
            ?INFO("Release ~s is marked old, switching to it.~n",[Version]),
            install_and_permafy(TargetNode, RelName, Version);
        unpacked ->
            ?INFO("Release ~s is already unpacked, now installing.~n",[Version]),
            install_and_permafy(TargetNode, RelName, Version);
        current -> %% installed and in-use, just needs to be permanent
            ?INFO("Release ~s is already installed and current. Making permanent.~n",[Version]),
            permafy(TargetNode, RelName, Version);
        permanent ->
            ?INFO("Release ~s is already installed, and set permanent.~n",[Version])
    end;

%% Build a list of code paths for the current release version
main(["get_code_paths", RootDir, ErtsDir, RelName, RelVsn]) ->
    {ok, {release,_,_,_,Libs,_}} = select_RELEASE(RootDir, ErtsDir, RelName, RelVsn),
    lists:foreach(fun({_LibName, _LibVer, LibDir}) ->
                        io:fwrite("~s ", [LibDir])
                  end, Libs);

%% Invalid command, return error
main(_) ->
    erlang:halt(1).

parse_version(V) when is_list(V) ->
    hd(string:tokens(V,"/")).

install_and_permafy(TargetNode, RelName, Vsn) ->
    case rpc:call(TargetNode, release_handler, check_install_release, [Vsn], ?TIMEOUT) of
        {ok, _OtherVsn, _Desc} ->
            ok;
        {error, Reason} ->
            ?INFO("ERROR: release_handler:check_install_release failed: ~p~n",[Reason]),
            erlang:halt(3)
    end,
    case rpc:call(TargetNode, release_handler, install_release,
                  [Vsn, [{update_paths, true}]], ?TIMEOUT) of
        {ok, _, _} ->
            ?INFO("Installed Release: ~s~n", [Vsn]),
            permafy(TargetNode, RelName, Vsn),
            ok;
        {error, {no_such_release, Vsn}} ->
            VerList =
                iolist_to_binary(
                    [io_lib:format("* ~s\t~s~n",[V,S]) ||  {V,S} <- which_releases(TargetNode)]),
            ?INFO("Installed versions:~n~s", [VerList]),
            ?INFO("ERROR: Unable to revert to '~s' - not installed.~n", [Vsn]),
            erlang:halt(2);
        %% As described in http://erlang.org/doc/man/appup.html,
        %% when executing a relup containing soft_purge instructions:
        %%     If the value is soft_purge, release_handler:install_release/1
        %%     returns {error, {old_processes, Mod}}
        {error, {old_processes, Mod}} ->
            ?INFO("ERROR: unable to install '~s' - old processes still running code from ~p~n",
                  [Vsn, Mod]),
            erlang:halt(3);
        {error, InstallFailedReason} ->
            ?INFO("ERROR: release_handler:install_release failed: ~p~n", [InstallFailedReason]),
            erlang:halt(3)
    end.

permafy(TargetNode, RelName, Vsn) ->
    ok = rpc:call(TargetNode, release_handler, make_permanent, [Vsn], ?TIMEOUT),
    file:copy(filename:join(["bin", RelName++"-"++Vsn]),
              filename:join(["bin", RelName])),
    ?INFO("Made release permanent: ~p~n", [Vsn]),
    ok.

which_releases(TargetNode) ->
    R = rpc:call(TargetNode, release_handler, which_releases, [], ?TIMEOUT),
    [ {V, S} ||  {_,V,_, S} <- R ].

print_existing_versions(TargetNode) ->
    VerList = iolist_to_binary([
            io_lib:format("* ~s\t~s~n",[V,S])
            ||  {V,S} <- which_releases(TargetNode) ]),
    ?INFO("Installed versions:~n~s", [VerList]).

start_distribution(NodeName, NameTypeArg, Cookie) ->
    MyNode = make_script_node(NodeName),
    {ok, _Pid} = net_kernel:start([MyNode, get_name_type(NameTypeArg)]),
    erlang:set_cookie(node(), list_to_atom(Cookie)),
    TargetNode = list_to_atom(NodeName),
    case {net_kernel:connect_node(TargetNode),
          net_adm:ping(TargetNode)} of
        {true, pong} ->
            ok;
        {_, pang} ->
            io:format("Node ~p not responding to pings.\n", [TargetNode]),
            erlang:halt(1)
    end,
    {ok, Cwd} = file:get_cwd(),
    ok = rpc:call(TargetNode, file, set_cwd, [Cwd], ?TIMEOUT),
    TargetNode.

make_script_node(Node) ->
    [Name, Host] = string:tokens(Node, "@"),
    list_to_atom(lists:concat([Name, "_upgrader_", os:getpid(), "@", Host])).

%% get name type from arg
get_name_type(NameTypeArg) ->
  case NameTypeArg of
    "-sname" ->
      shortnames;
    _ ->
      longnames
  end.

%% Selects a specific release from RELEASES
select_RELEASE(RootDir, ErtsDir, RelName, RelVsn) ->
    Releases = get_RELEASES(RootDir, ErtsDir),
    select_RELEASE(Releases, RelName, RelVsn).
select_RELEASE([], _RelName, _RelVsn) ->
    {error, no_such_release};
select_RELEASE([{release, RelName, RelVsn, _ErtsVsn, _Libs, _Status} = Release | _], RelName, RelVsn) ->
    {ok, Release};
select_RELEASE([_|Rest], RelName, RelVsn) ->
    select_RELEASE(Rest, RelName, RelVsn).

%% Gets the RELEASES file and returns it with all paths fixed
get_RELEASES(RootDir, ErtsDir) ->
    ReleasesFile = filename:join([RootDir, "releases", "RELEASES"]),
    {ok, [Releases]} = file:consult(ReleasesFile),
    FixedReleases = lists:map(fun(Release) ->
                                  fix_release(Release, RootDir, ErtsDir)
                              end, Releases),
    FixedReleases.

%% Used to fix invalid paths in RELEASES
fix_release({release, RelName, RelVsn, ErtsVsn, Libs, Status} = Release, RootDir, ErtsDir) ->
    CurrentErtsVsn = extract_erts_vsn(ErtsDir),
    case {string:rstr(ErtsDir, RootDir), CurrentErtsVsn} of
        {0, ErtsVsn} ->
            %% We are using the host ERTS, and it matches the ERTS version
            %% from RELEASES, which means we just need to make sure the path is up to date
            FixedLibs = lists:map(fun({LibName, LibVsn, _LibDir} = Lib) ->
                                        case is_erts_lib(ErtsDir, LibName) of
                                            true ->
                                                case get_erts_lib(ErtsDir, LibName, LibVsn) of
                                                    RealLibDir ->
                                                        {LibName, LibVsn, RealLibDir};
                                                    false ->
                                                        io:fwrite("Invalid RELEASES: could not find lib ~p~p in ~s.",
                                                            [LibName, LibVsn, ErtsDir])
                                                end;
                                            false ->
                                                Lib
                                        end
                                end, Libs),
            {release, RelName, RelVsn, ErtsVsn, FixedLibs, Status};
        {0, _Other} ->
            %% As stated here, we didn't include ERTS, and the host version does
            %% not match that of the host, this may not be a problem if the lib
            %% versions are the same and/or compatible, but we can't assume that
            io:fwrite("Invalid RELEASES: specified ERTS (~p) does not match host (~p).", [ErtsVsn, CurrentErtsVsn]),
            erlang:halt(2);
        {_, _} ->
            %% If we've included ERTS, we don't need to fix anything
            Release
    end;
fix_release(Release, _RootDir, _ErtsDir) ->
    Release.

%% Determines if the given app name is an ERTS lib
is_erts_lib(ErtsDir, AppName) ->
    LibDir = filename:join([ErtsDir, "..", "lib"]),
    Pattern = filename:flatten([AppName, "-*"]),
    case filelib:wildcard(filename:join([LibDir, Pattern])) of
        [] -> false;
        _  -> true
    end.

%% Returns the absolute path to an ERTS lib, or false if it doesn't exist
get_erts_lib(ErtsDir, AppName, AppVsn) ->
    LibDir = filename:join([ErtsDir, "..", "lib"]),
    Pattern = filename:flatten([AppName, "-", AppVsn]),
    case filelib:wildcard(filename:join([LibDir, Pattern])) of
        [] -> false;
        [AppDir] -> AppDir
    end.

%% Given a path to the ERTS directory, get the ERTS version number
extract_erts_vsn(ErtsDir) ->
    "erts-" ++ Vsn = filename:basename(ErtsDir),
    Vsn.


Fix mobile viewing experience

Fix mobile viewing experience

<!DOCTYPE html>
<html>
<head>
  <title><%= content_for(:title) || "Mogo Chat" %></title>
  <meta name="HandheldFriendly" content="True"/>
  <meta name="google" value="notranslate" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  <meta name="viewport" content="width=device-width"/>
  <meta name="apple-mobile-web-app-capable" content="yes" />

  <script type="text/javascript" src="/static/assets/application.js"></script>
  <link rel="stylesheet" href="/static/assets/application.css"/>
  <link rel="shortcut icon" href="/static/favicon.ico" />
</head>
<body>
  <%= content_for(:template) %>
</body>
</html>

<!DOCTYPE html>
<html>
<head>
  <title><%= content_for(:title) || "Mogo Chat" %></title>
  <meta content="True" name="HandheldFriendly"/>
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  <meta name="google" value="notranslate" />
  <meta name="apple-mobile-web-app-capable" content="yes" />
  <meta name="viewport" content="minimal-ui"/>

  <script type="text/javascript" src="/static/assets/application.js"></script>
  <link rel="stylesheet" href="/static/assets/application.css"/>
  <link rel="shortcut icon" href="/static/favicon.ico" />
</head>
<body>
  <%= content_for(:template) %>
</body>
</html>


Added Link in The main header, fixed button style

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

        <%#

 %>
            <%= if !is_nil(Plug.Conn.get_session(@conn, :user)) do %>
              <%= button("Sign Out", method: "delete", to: session_path(@conn, :destroy), class: "btn btn-danger sign-out-btn")%>
            <% end %>
          <%#

         %>
        <a href="<%=users_path(@conn, :show)%>">Spaces

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

            <%= if !is_nil(Plug.Conn.get_session(@conn, :user)) do %>

<%= button("Sign Out", method: "delete", to: session_path(@conn, :destroy), class: "btn btn-danger")%>

            <% end %>

        Spaces

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

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

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


update homepage info

update homepage info

<%= gettext "Welcome to %{name}", name: "kikr!" %>

The table football
ranking system

black coffee studios

say hello

<%= gettext "Welcome to %{name}", name: "kikr!" %>

A web app that ranks table
football players amongst each other.


Change home to show full post

Change home to show full post

  <%= for post <- @posts do %>
    <article id='<%= "post_#{post.id}" %>' class='post'>

<a href='<%= page_path(@conn, :show, post.permalink) %>'><%= post.title %>

      By Michelada.io
      <%= human_date(post.published_at) %>

<%= markdown_to_html(post.body) %>

  <% end %>

  <%= for post <- @posts do %>
    <article id='<%= "post_#{post.id}" %>' class='post'>

<a href='<%= page_path(@conn, :show, post.permalink) %>'><%= post.title %>

      By Michelada.io
      <%= human_date(post.published_at) %>

<%= post.summary %>

  <% end %>


add link to blog

add link to blog

  <%= render SignDict.SharedView, "navigation.html", conn: @conn, current_user: @current_user %>
  <%= render SignDict.SharedView, "alerts.html", conn: @conn %>

    <%= Brady.inline_svg("logo", class: "so-landing--banner--logo") %>

        <%= {:safe, gettext("SignDict is an open dictionary for sign language. Everyone is invited to join in.")} %>

        <%= gettext("Currenty %{humans} humans have added %{signs} signs", humans: @human_count, signs: @sign_count) %>

    <form action="/search">
      <input class="so-landing--search--input" type="text" name="q" autofocus="true" aria-label="<%= gettext("Enter word to search") %>"/>
      <input class="so-landing--search--submit" type="submit" value="<%= gettext("Search") %> ›" />
    </form>

    <%= Brady.inline_svg("hand-speechbubble", class: "so-landing--motivation--hand") %>

        <%= gettext("Language barrier") %>

      <%= text_to_html(gettext("SignDict believes...")) %>

          <%= gettext("Our mission: to help understanding each other.") %>

    <%= Brady.inline_svg("hands", class: "so-landing--action--image") %>

        <%= gettext("Curious?") %>

        <%= gettext("Want to stay up to date?") %>

        <%= gettext("This page is still under construction and..") %>

        <%= gettext("Newsletter sign up") %> ›

      <%= gettext("Supporter") %>

        <img class="so-footer--sponsorlogo so-footer--bmbf" src="images/logo-bmbf.svg" alt="<%= gettext("Logo Bundesministerium für Bildung und Forschung") %>"/>

        <img class="so-footer--sponsorlogo so-footer--prototype" src="images/logo-prototype.svg" alt="<%= gettext("Logo Prototype Fund") %>"/>

        <img class="so-footer--sponsorlogo so-footer--rrbone" src="images/logo-rrbone.svg" alt="<%= gettext("Logo rrone") %>"/>

        <img class="so-footer--sponsorlogo so-footer--zweitag" src="images/logo-zweitag.png" alt="<%= gettext("Logo zweitag") %>"/>

          <%= gettext("SignDict is a sign language dictionary where everyone can participate") %>

<%= gettext("Blog") %>

<%= gettext("Imprint") %>

<%= gettext("Contact") %>

          <a href="//twitter.com/signdict" aria-label="<%= gettext("SignDict on Twitter") %>">

          <a href="//github.com/signdict" aria-label="<%= gettext("SignDict on Github") %>">

  <%= render SignDict.SharedView, "navigation.html", conn: @conn, current_user: @current_user %>
  <%= render SignDict.SharedView, "alerts.html", conn: @conn %>

    <%= Brady.inline_svg("logo", class: "so-landing--banner--logo") %>

        <%= {:safe, gettext("SignDict is an open dictionary for sign language. Everyone is invited to join in.")} %>

        <%= gettext("Currenty %{humans} humans have added %{signs} signs", humans: @human_count, signs: @sign_count) %>

    <form action="/search">
      <input class="so-landing--search--input" type="text" name="q" autofocus="true" aria-label="<%= gettext("Enter word to search") %>"/>
      <input class="so-landing--search--submit" type="submit" value="<%= gettext("Search") %> >" />
    </form>

    <%= Brady.inline_svg("hand-speechbubble", class: "so-landing--motivation--hand") %>

        <%= gettext("Language barrier") %>

      <%= text_to_html(gettext("SignDict believes...")) %>

          <%= gettext("Our mission: to help understanding each other.") %>

    <%= Brady.inline_svg("hands", class: "so-landing--action--image") %>

        <%= gettext("Curious?") %>

        <%= gettext("Want to stay up to date?") %>

        <%= gettext("This page is still under construction and..") %>

        <%= gettext("Newsletter sign up") %> >

      <%= gettext("Supporter") %>

        <img class="so-footer--sponsorlogo so-footer--bmbf" src="images/logo-bmbf.svg" alt="<%= gettext("Logo Bundesministerium für Bildung und Forschung") %>"/>

        <img class="so-footer--sponsorlogo so-footer--prototype" src="images/logo-prototype.svg" alt="<%= gettext("Logo Prototype Fund") %>"/>

        <img class="so-footer--sponsorlogo so-footer--rrbone" src="images/logo-rrbone.svg" alt="<%= gettext("Logo rrone") %>"/>

        <img class="so-footer--sponsorlogo so-footer--zweitag" src="images/logo-zweitag.png" alt="<%= gettext("Logo zweitag") %>"/>

          <%= gettext("SignDict is a sign language dictionary where everyone can participate") %>

<%= gettext("Imprint") %>

<%= gettext("Contact") %>

          <a href="//twitter.com/signdict" aria-label="<%= gettext("SignDict on Twitter") %>">

          <a href="//github.com/signdict" aria-label="<%= gettext("SignDict on Github") %>">


Use snake's color on the board

Use snake's color on the board

<% alias BattleSnake.Snake %>

  <% width = @world.width %>
  <% height = @world.height %>

    <%= content_tag :svg, height: "100%", width: "100%", viewBox: "0 0 #{width} #{height}" do %>
      <%# background %>
      <%= content_tag :rect, "", y: 0, x: 0, width: width, height: height, fill: "lightgrey" %>

      <%= for snake <- @world.snakes, point <- snake.coords do %>
        <%=
          content_tag :rect, "",
          y: point.y,
          x: point.x,
          width: 1,
          height: 1,
          fill: snake.color
        %>
      <% end %>

      <%= for food <- @world.food do %>
        <%=
          content_tag :rect, "",
          y: food.y,
          x: food.x,
          width: 1,
          height: 1,
          fill: :green
        %>
      <% end %>
    <% end %>

      <%= for snake <- @world.snakes do %>

url

          <%= content_tag :dt, snake.url %>

length

          <%= content_tag :dt, Snake.len(snake) %>

move

          <%= content_tag :dt, @world.moves[snake.name] %>

      <% end %>

<% alias BattleSnake.Snake %>

  <% width = @world.width %>
  <% height = @world.height %>

    <%= content_tag :svg, height: "100%", width: "100%", viewBox: "0 0 #{width} #{height}" do %>
      <%# background %>
      <%= content_tag :rect, "", y: 0, x: 0, width: width, height: height, fill: "lightgrey" %>

      <%= for snake <- @world.snakes, point <- snake.coords do %>
        <%=
          content_tag :rect, "",
          y: point.y,
          x: point.x,
          width: 1,
          height: 1,
          fill: :red
        %>
      <% end %>

      <%= for food <- @world.food do %>
        <%=
          content_tag :rect, "",
          y: food.y,
          x: food.x,
          width: 1,
          height: 1,
          fill: :green
        %>
      <% end %>
    <% end %>

      <%= for snake <- @world.snakes do %>

url

          <%= content_tag :dt, snake.url %>

length

          <%= content_tag :dt, Snake.len(snake) %>

move

          <%= content_tag :dt, @world.moves[snake.name] %>

      <% end %>


When listing posts show edit/delete only to owner

Lastest posts

<a href="<%= Blog.Router.Helpers.posts_path(@conn, :new) %>" >Create a new post
<%= for post <- @posts do %>

<%= post.title %>

<%= post.content %>

      <%= if post.author_id == current_user_id(@conn) do %>

          <%= link "Edit", to: posts_path(@conn, :edit, post), class: "btn btn-default" %>

          <form style="float: right;" method="post" onsubmit="return confirm('Are you sure?');" action="<%= posts_path(@conn, :delete, post.id, _method: "delete") %>">
            <input type="hidden" name="_csrf_token" value="<%= get_csrf_token %>" />
            <input type="submit" value="Remove" class="btn btn-danger">
          </form>

      <% end %>

<% end %>

Lastest posts

<a href="<%= Blog.Router.Helpers.posts_path(@conn, :new) %>" >Create a new post
<%= for post <- @posts do %>

<%= post.title %>

<%= post.content %>

        <%= link "Edit", to: posts_path(@conn, :edit, post), class: "btn btn-default" %>

        <form style="float: right;" method="post" onsubmit="return confirm('Are you sure?');" action="<%= posts_path(@conn, :delete, post.id, _method: "delete") %>">
          <input type="hidden" name="_csrf_token" value="<%= get_csrf_token %>" />
          <input type="submit" value="Remove" class="btn btn-danger">
        </form>

<% end %>


Don't display headline when headline == nil. closes #331

<%# header tag begins in parent template %>

    <div class="profile-header__image profile-image<%= if @user.verified, do: " profile-header--verified" %>">
      <img src="<%= Vutuv.Avatar.binary(@user, :medium) %>">

        <%= full_name(@user) %>
        <%= 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 %>

        <%= current_title(@job) %>
        <%= if(@organization != "" and @organization) do %>
          @ <%= @organization %>
        <% end %>

      Verified profile

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

<%= String.capitalize(@user.first_name) %> <%= 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(@user.headline || @user.birthdate) 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 %>
    <%= if @user.headline do %>

<%= gettext "Headline" %>

<%= @user.headline %>

    <% end %>

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

<%= gettext "Gender" %>

<%= @user.gender %>

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

<%= gettext "Birthday" %>

<%= @user.birthdate %>

      <% end %>

  <% end %>

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

      <%= 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) == 1), do: gettext("Email"), else: gettext("Emails") %>

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

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

        <% end %>

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

<%= gettext "Vcard" %>

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

    <%= 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 %>

<%= link "@#{account.value}", to: Vutuv.SocialMediaAccount.get_full_url(account) %>

          <% end %>

          <%= if same_user?(@user, @current_user) do %>
            <%= link gettext("Add"), to: user_social_media_account_path(@conn, :new, @current_user) %>
          <% 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 %>

  <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 %>

    <% else %>

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

    <% end %>
    <%= if(@follower_count > 3) do %>
      <%= link "#{@followers_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 %>

    <% 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__image profile-image<%= if @user.verified, do: " profile-header--verified" %>">
      <img src="<%= Vutuv.Avatar.binary(@user, :medium) %>">

        <%= full_name(@user) %>
        <%= 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 %>

        <%= current_title(@job) %>
        <%= if(@organization != "" and @organization) do %>
          @ <%= @organization %>
        <% end %>

      Verified profile

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

<%= String.capitalize(@user.first_name) %> <%= 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 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 "Headline" %>

<%= @user.headline %>

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

<%= gettext "Gender" %>

<%= @user.gender %>

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

<%= gettext "Birthday" %>

<%= @user.birthdate %>

      <% end %>

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

      <%= 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) == 1), do: gettext("Email"), else: gettext("Emails") %>

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

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

        <% end %>

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

<%= gettext "Vcard" %>

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

    <%= 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 %>

<%= link "@#{account.value}", to: Vutuv.SocialMediaAccount.get_full_url(account) %>

          <% end %>

          <%= if same_user?(@user, @current_user) do %>
            <%= link gettext("Add"), to: user_social_media_account_path(@conn, :new, @current_user) %>
          <% 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 %>

  <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 %>

    <% else %>

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

    <% end %>
    <%= if(@follower_count > 3) do %>
      <%= link "#{@followers_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 %>

    <% 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 %>


Customized show user profile

Customized show user profile

    <%= link "KickStart", to: page_path(@conn, :index), class: "ssp-x-light link dim black b f1 f-headline-ns tc db mb3 mb4-ns" %>

Profile

<%= @user.username %>

                Hi there! Tell me somthing about you.

email

<%= @user.email %>

            <%= link "Edit", to: user_path(@conn, :edit, @user), class: "f6 no-underline grow dib v-mid bg-blue white ba b--blue ph3 pv2 mr1" %>
            <%= link "Back", to: user_path(@conn, :index),  class: "f6 no-underline grow dib v-mid black ba b--black ph3 pv2 ml1" %>

Show user

    Username:
    <%= @user.username %>

    Email:
    <%= @user.email %>

    Password:
    <%= @user.password %>

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


changed if statement to do comparison on size of total followees rather than preloaded list that would always be 5 or lower

<%= full_name(@user) %>

      <%= if @user.first_name do %>

          <%= gettext "First name:" %>
          <%= @user.first_name %>

      <% end %>

      <%= if @user.last_name do %>

          <%= gettext "Last name:" %>
          <%= @user.last_name %>

      <% end %>

      <%= if @user.middlename do %>

          <%= gettext "Middlename:" %>
          <%= @user.middlename %>

      <% end %>

      <%= if @user.nickname do %>

          <%= gettext "Nickname:" %>
          <%= @user.nickname %>

      <% end %>

      <%= if @user.honorific_prefix do %>

          <%= gettext "Honorific prefix:" %>
          <%= @user.honorific_prefix %>

      <% end %>

      <%= if @user.honorific_suffix do %>

          <%= gettext "Honorific suffix:" %>
          <%= @user.honorific_suffix %>

      <% end %>

      <%= if @user.gender do %>

          <%= gettext "Gender:" %>
          <%= @user.gender %>

      <% end %>

      <%= if @user.birthdate do %>

          <%= gettext "Birthdate:" %>
          <%= @user.birthdate %>

      <% end %>

      <%= if @user.verified do %>

          <%= gettext "Verified:" %>
          <%= @user.verified %>

      <% end %>

    <%= link gettext("Edit"), to: user_path(@conn, :edit, @user) %>

    <%= if gravatar_url(@user) do %>
      <img src="<%= gravatar_url(@user) %>"  class="img-responsive img-rounded" alt="Avatar <%= full_name(@user) %>" />
    <% end %>

    <%= if @user.id != @current_user.id do %>
      <%= unless Enum.any?(@user.follower_connections, fn(x) -> x.follower_id == @current_user.id end) do %>
        <%= form_for @changeset, connection_path(@conn, :create), fn f -> %>
          <%= hidden_input f, :follower_id %>
          <%= hidden_input f, :followee_id %>

            <%= submit gettext("Follow"), class: "btn btn-primary" %>

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

    <%= unless Enum.empty?(@user.emails) do %>
      <%= render Vutuv.EmailView, "index.html", conn: @conn, emails: @user.emails, user: @user, emails_counter: @emails_counter %>
    <% end %>

    <%= unless Enum.empty?(@user.groups) do %>
      <%= render Vutuv.GroupView, "index.html", conn: @conn, groups: @user.groups, user: @user %>
    <% end %>

    <%= unless Enum.empty?(@user.follower_connections) do %>
      <%= if Enum.count(@user.follower_connections) > 5 do %>

The Latest Followers

      <%= else %>

Followers

      <%= end %>

            Inserted At
            Name

      <%= for connection <- @user.follower_connections do %>

              <%= time_ago_in_words connection.inserted_at %> ago

            <%= link full_name(connection.follower), to: user_path(@conn, :show, connection.follower) %>

              <%= if Enum.any?(@user.followee_connections, fn(x) -> x.followee_id == connection.follower_id end) do %>
                 You already follow back.
              <% else %>
                <%= link "Follow back", to: user_path(@conn, :follow_back, connection.follower), class: "btn btn-default btn-xs", role: "button" %>
              <% end %>

      <% end %>

      <%= if Enum.count(@user.follower_connections) > 5 do %>

          <%= link gettext("List of all Followers (%{followers_count}).", followers_count: @followers_count), to: user_follower_path(@conn, :index, @user) %>

      <%= end %>
    <% end %>

    <%= unless Enum.empty?(@user.followee_connections) do %>
      <%= if Enum.count(@user.followee_connections) > 5 do %>

The Latest Followees

      <%= else %>

Followees

      <%= end %>

            Inserted At
            Name

      <%= for connection <- @user.followee_connections do %>

              <%= time_ago_in_words connection.inserted_at %> ago

            <%= link full_name(connection.followee), to: user_path(@conn, :show, connection.followee) %>

              <%= link gettext("Unfollow"), to: connection_path(@conn, :delete, connection), method: :delete, data: [confirm: "Are you sure?"], class: "btn btn-danger btn-xs" %>

      <% end %>

      <%= if @followees_count > 5 do %>

          <%= link gettext("List of all Followees (%{followees_count}).", followees_count: @followees_count), to: user_followee_path(@conn, :index, @user) %>

      <%= end %>
    <% end %>

<%= full_name(@user) %>

      <%= if @user.first_name do %>

          <%= gettext "First name:" %>
          <%= @user.first_name %>

      <% end %>

      <%= if @user.last_name do %>

          <%= gettext "Last name:" %>
          <%= @user.last_name %>

      <% end %>

      <%= if @user.middlename do %>

          <%= gettext "Middlename:" %>
          <%= @user.middlename %>

      <% end %>

      <%= if @user.nickname do %>

          <%= gettext "Nickname:" %>
          <%= @user.nickname %>

      <% end %>

      <%= if @user.honorific_prefix do %>

          <%= gettext "Honorific prefix:" %>
          <%= @user.honorific_prefix %>

      <% end %>

      <%= if @user.honorific_suffix do %>

          <%= gettext "Honorific suffix:" %>
          <%= @user.honorific_suffix %>

      <% end %>

      <%= if @user.gender do %>

          <%= gettext "Gender:" %>
          <%= @user.gender %>

      <% end %>

      <%= if @user.birthdate do %>

          <%= gettext "Birthdate:" %>
          <%= @user.birthdate %>

      <% end %>

      <%= if @user.verified do %>

          <%= gettext "Verified:" %>
          <%= @user.verified %>

      <% end %>

    <%= link gettext("Edit"), to: user_path(@conn, :edit, @user) %>

    <%= if gravatar_url(@user) do %>
      <img src="<%= gravatar_url(@user) %>"  class="img-responsive img-rounded" alt="Avatar <%= full_name(@user) %>" />
    <% end %>

    <%= if @user.id != @current_user.id do %>
      <%= unless Enum.any?(@user.follower_connections, fn(x) -> x.follower_id == @current_user.id end) do %>
        <%= form_for @changeset, connection_path(@conn, :create), fn f -> %>
          <%= hidden_input f, :follower_id %>
          <%= hidden_input f, :followee_id %>

            <%= submit gettext("Follow"), class: "btn btn-primary" %>

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

    <%= unless Enum.empty?(@user.emails) do %>
      <%= render Vutuv.EmailView, "index.html", conn: @conn, emails: @user.emails, user: @user, emails_counter: @emails_counter %>
    <% end %>

    <%= unless Enum.empty?(@user.groups) do %>
      <%= render Vutuv.GroupView, "index.html", conn: @conn, groups: @user.groups, user: @user %>
    <% end %>

    <%= unless Enum.empty?(@user.follower_connections) do %>
      <%= if Enum.count(@user.follower_connections) > 5 do %>

The Latest Followers

      <%= else %>

Followers

      <%= end %>

            Inserted At
            Name

      <%= for connection <- @user.follower_connections do %>

              <%= time_ago_in_words connection.inserted_at %> ago

            <%= link full_name(connection.follower), to: user_path(@conn, :show, connection.follower) %>

              <%= if Enum.any?(@user.followee_connections, fn(x) -> x.followee_id == connection.follower_id end) do %>
                 You already follow back.
              <% else %>
                <%= link "Follow back", to: user_path(@conn, :follow_back, connection.follower), class: "btn btn-default btn-xs", role: "button" %>
              <% end %>

      <% end %>

      <%= if Enum.count(@user.follower_connections) > 5 do %>

          <%= link gettext("List of all Followers (%{followers_count}).", followers_count: @followers_count), to: user_follower_path(@conn, :index, @user) %>

      <%= end %>
    <% end %>

    <%= unless Enum.empty?(@user.followee_connections) do %>
      <%= if Enum.count(@user.followee_connections) > 5 do %>

The Latest Followees

      <%= else %>

Followees

      <%= end %>

            Inserted At
            Name

      <%= for connection <- @user.followee_connections do %>

              <%= time_ago_in_words connection.inserted_at %> ago

            <%= link full_name(connection.followee), to: user_path(@conn, :show, connection.followee) %>

              <%= link gettext("Unfollow"), to: connection_path(@conn, :delete, connection), method: :delete, data: [confirm: "Are you sure?"], class: "btn btn-danger btn-xs" %>

      <% end %>

      <%= if Enum.count(@user.followee_connections) > 5 do %>

          <%= link gettext("List of all Followees (%{followees_count}).", followees_count: @followees_count), to: user_followee_path(@conn, :index, @user) %>

      <%= end %>
    <% end %>


max height to iframe

max height to iframe

<main role="main" style="max-height: 600px; overflow: none;">
  <%= render @view_module, @view_template, assigns %>
</main>

<main role="main">
  <%= render @view_module, @view_template, assigns %>
</main>


Slim down mock json file.

Slim down mock json file.

{
   "url":"<%= url %>",
   "tag_name":"<%= tag_name %>",
   "target_commitish":"<%= target_commitish %>",
   "name":null,
   "draft":false,
   "prerelease":true,
   "created_at":"2018-01-09T02:04:01Z",
   "published_at":"2018-01-09T02:10:23Z",
   "assets":[
      {
         "url":"<%= fw_asset_url %>",
         "id":5815530,
         "name":"farmbot-rpi3-<%= String.trim_leading(tag_name, "v") %>.fw",
         "label":"",
         "content_type":"application/octet-stream",
         "state":"uploaded",
         "size":57024016,
         "download_count":0,
         "created_at":"2018-01-09T02:10:23Z",
         "updated_at":"2018-01-09T02:10:25Z",
         "browser_download_url":"<%= fw_asset_url %>"
      }
   ],
   "body": "<%= body %>"
}

{
   "url":"<%= url %>",
   "assets_url":"<%= url %>/assets",
   "upload_url":"https://uploads.github.com/repos/FarmBot/farmbot_os/releases/9155240/assets{?name,label}",
   "html_url":"https://github.com/FarmBot/farmbot_os/releases/tag/<%= tag_name %>",
   "id":9155240,
   "tag_name":"<%= tag_name %>",
   "target_commitish":"<%= target_commitish %>",
   "name":null,
   "draft":false,
   "author":{
      "login":"ConnorRigby",
      "id":21150830,
      "avatar_url":"https://avatars3.githubusercontent.com/u/21150830?v=4",
      "gravatar_id":"",
      "url":"https://api.github.com/users/ConnorRigby",
      "html_url":"https://github.com/ConnorRigby",
      "followers_url":"https://api.github.com/users/ConnorRigby/followers",
      "following_url":"https://api.github.com/users/ConnorRigby/following{/other_user}",
      "gists_url":"https://api.github.com/users/ConnorRigby/gists{/gist_id}",
      "starred_url":"https://api.github.com/users/ConnorRigby/starred{/owner}{/repo}",
      "subscriptions_url":"https://api.github.com/users/ConnorRigby/subscriptions",
      "organizations_url":"https://api.github.com/users/ConnorRigby/orgs",
      "repos_url":"https://api.github.com/users/ConnorRigby/repos",
      "events_url":"https://api.github.com/users/ConnorRigby/events{/privacy}",
      "received_events_url":"https://api.github.com/users/ConnorRigby/received_events",
      "type":"User",
      "site_admin":false
   },
   "prerelease":true,
   "created_at":"2018-01-09T02:04:01Z",
   "published_at":"2018-01-09T02:10:23Z",
   "assets":[
      {
         "url":"<%= fw_asset_url %>",
         "id":5815530,
         "name":"farmbot-rpi3-<%= String.trim_leading(tag_name, "v") %>.fw",
         "label":"",
         "uploader":{
            "login":"ConnorRigby",
            "id":21150830,
            "avatar_url":"https://avatars3.githubusercontent.com/u/21150830?v=4",
            "gravatar_id":"",
            "url":"https://api.github.com/users/ConnorRigby",
            "html_url":"https://github.com/ConnorRigby",
            "followers_url":"https://api.github.com/users/ConnorRigby/followers",
            "following_url":"https://api.github.com/users/ConnorRigby/following{/other_user}",
            "gists_url":"https://api.github.com/users/ConnorRigby/gists{/gist_id}",
            "starred_url":"https://api.github.com/users/ConnorRigby/starred{/owner}{/repo}",
            "subscriptions_url":"https://api.github.com/users/ConnorRigby/subscriptions",
            "organizations_url":"https://api.github.com/users/ConnorRigby/orgs",
            "repos_url":"https://api.github.com/users/ConnorRigby/repos",
            "events_url":"https://api.github.com/users/ConnorRigby/events{/privacy}",
            "received_events_url":"https://api.github.com/users/ConnorRigby/received_events",
            "type":"User",
            "site_admin":false
         },
         "content_type":"application/octet-stream",
         "state":"uploaded",
         "size":57024016,
         "download_count":0,
         "created_at":"2018-01-09T02:10:23Z",
         "updated_at":"2018-01-09T02:10:25Z",
         "browser_download_url":"<%= fw_asset_url %>"
      }
   ],
   "tarball_url":"https://api.github.com/repos/FarmBot/farmbot_os/tarball/<%= tag_name %>",
   "zipball_url":"https://api.github.com/repos/FarmBot/farmbot_os/zipball/<%= tag_name %>",
   "body": "<%= body %>"
}


Display warning if no schedules associated with Door Group

  Door Group: <%= @door_group.name %>
  <%= link "Edit", to: door_group_path(@conn, :edit, @door_group), class: "btn btn-default btn-sm", role: "button" %>

Associated Doors

      <%= for door <- @door_group.doors do %>

<%= link door.name, to: door_path(@conn, :show, door) %>

      <% end %>

Schedule

    <%= if length(@door_group.door_group_schedules) > 0 do %>

        <%= for schedule <- @door_group.door_group_schedules do %>

<%= schedule.day_of_week %> <%= Timex.format!(schedule.start_time, "%-H:%M", :strftime) |> raw() %> - <%= Timex.format!(schedule.end_time, "%-H:%M", :strftime) |> raw() %>

        <% end %>

    <% else %>

No active schedules!

    <% end %>

Companies with access to this group

    <%= if length(@door_group.companies) > 0 do %>

        <%= for company <- @door_group.companies do %>

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

        <% end %>

    <% else %>

No companies

    <% end %>

  Door Group: <%= @door_group.name %>
  <%= link "Edit", to: door_group_path(@conn, :edit, @door_group), class: "btn btn-default btn-sm", role: "button" %>

Associated Doors

      <%= for door <- @door_group.doors do %>

<%= link door.name, to: door_path(@conn, :show, door) %>

      <% end %>

Schedule

      <%= for schedule <- @door_group.door_group_schedules do %>

<%= schedule.day_of_week %> <%= Timex.format!(schedule.start_time, "%-H:%M", :strftime) |> raw() %> - <%= Timex.format!(schedule.end_time, "%-H:%M", :strftime) |> raw() %>

      <% end %>

Companies with access to this group

    <%= if length(@door_group.companies) > 0 do %>

        <%= for company <- @door_group.companies do %>

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

        <% end %>

    <% else %>

No companies

    <% end %>


Update app.html.eex

Update app.html.eex

<!DOCTYPE>

<meta charset="utf-8">
	<title>NEOSCAN | <%= get_page(@conn) %></title>
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta name="format-detection" content="telephone=no"/>
	<meta name="mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<link rel="shortcut icon" href="<%= static_path(@conn, "/favicon.ico") %>">

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

	<meta property="og:title" content="NeoScan - NEO Blockchain Explorer" />
	<meta property="og:url" content="[neoscan.io]" />
	<meta property="og:type" content="website" />
	<meta property="og:description" content="A blockchain explorer for the NEO project. Track blocks, addresses, balances, transactions, NEO, GAS and other assets on the platform." />
	<meta property="og:image" content="<%= static_path(@conn, "/images/coz.png") %>" />

	<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i,700,700i|Teko:300,500" rel="stylesheet">

			<button class="hamburger hamburger--spin" type="button">

			</button>

				<select id="language-dropdown" onchange="window.location.href=this.value">
  					<option <%= if get_language(@conn) == "en" do %>selected<% end %> class="select-options" value="?locale=en">English</option>
  					<option <%= if get_language(@conn) == "fr" do %>selected<% end %> class="select-options" value="?locale=fr">Français</option>
					<option <%= if get_language(@conn) == "pt-br" do %>selected<% end %> class="select-options" value="?locale=pt-br">Português</option>
					<option <%= if get_language(@conn) == "it" do %>selected<% end %> class="select-options" value="?locale=it">Italiano</option>
					<option <%= if get_language(@conn) == "de" do %>selected<% end %> class="select-options" value="?locale=de">Deutsch</option>
					<option <%= if get_language(@conn) == "ru" do %>selected<% end %> class="select-options" value="?locale=ru">Русский</option>
					<option <%= if get_language(@conn) == "ro" do %>selected<% end %> class="select-options" value="?locale=ro">Română</option>

				</select>

          <img src="<%= static_path(@conn, "/images/NEOSCAN_Logo.svg") %>" alt="<%= gettext "NEOSCAN Home" %>" title="<%= gettext "NEOSCAN Home" %>" width="163px" height="32px" class="neoscan-logo" />

      <%= form_for @conn, home_path(@conn, :index), [as: :search], fn f -> %>
        <%= text_input f, :for,placeholder: gettext("Block Height, Hash, Address or Transaction id"),class: "searchbar fa fa-search", type: "search" %>
				<%= submit "", [class: "icon search-btn fa fa-search"]  %>
        <%= error_tag f, :for %>
      <% end %>

						<a href="<%= home_path(@conn, :index) %>" alt="Explorer" title="Explorer" class="nav-link <%= if is_home_path(@conn), do: " active" %>"><%= gettext "Explorer" %>

						<a href="<%= transactions_path(@conn, :index) %>" alt="Explorer" title="Explorer" class="nav-link <%= if is_transactions_path(@conn), do: " active" %>"><%= gettext "Transactions" %>

						<a href="<%= addresses_path(@conn, :index) %>" alt="Explorer" title="Explorer" class="nav-link <%= if is_addresses_path(@conn), do: " active" %>"><%= gettext "Wallet Addresses" %>

						<a href="<%= blocks_path(@conn, :index) %>" alt="Explorer" title="Explorer" class="nav-link <%= if is_blocks_path(@conn), do: " active" %>"><%= gettext "Blocks" %>

						<a href="<%= assets_path(@conn, :index) %>" alt="Explorer" title="Explorer" class="nav-link <%= if is_assets_path(@conn), do: " active" %>"><%= gettext "Assets" %>

						<a href="<%= doc_path(@conn, :index) %>" alt="Explorer" title="Explorer" class="nav-link <%= if is_doc_path(@conn), do: " active" %>"><%= gettext "API" %>

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

					<img src="<%= static_path(@conn, "/images/NEOSCAN_Logo.svg") %>" alt="NEOSCAN Home" title="NEOSCAN Home" class="neoscan-logo-footer" width="136px" height="27px" />

<%= gettext "The source code is" %> <a href="http://opensource.org/licenses/mit-license.php" alt="<%= gettext "View MIT License"%>" title="<%= gettext "View MIT License"%>" class="large-blue-link"><%= gettext "licensed" %> MIT

<%= gettext "The website content is licensed" %> CC ANS 4.0

<a href="https://neoscan-testnet.io/" alt="<%= gettext "NEOSCAN Testnet"%>" title="<%= gettext "NEOSCAN Testnet"%>" class="large-blue-link"><%= gettext "NEOSCAN Testnet" %>

© 2017 <a href="http://cityofzion.io/" alt="<%= gettext "Visit City of Zion"%>" title="<%= gettext "Visit City of Zion"%>" class="large-blue-link"><%= gettext "City Of Zion" %>

						<a href="http://slack.cityofzion.io/" alt="<%= gettext "NEO Slack"%>" title="<%= gettext "NEO Slack"%>" class="coz-slack"><%= gettext "NEO Slack" %>

						<a href="https://github.com/CityOfZion" alt="<%= gettext "City of Zion Github" %>" title="<%= gettext "City of Zion Github" %>" class="coz-github"><%= gettext "City of Zion Github" %>

						<a href="<%= doc_path(@conn, :index) %>" alt="<%= gettext "NEOSCAN API" %>" title="<%= gettext "NEOSCAN API" %>" class="coz-api"><%= gettext "NEOSCAN API" %>

              <%= if get_tooltips(@conn) == "on" do %><%= gettext "Tooltips On " %><% end %>
              <%= if get_tooltips(@conn) == "off" do %><%= gettext "Tooltips Off " %><% end %>

<!DOCTYPE>

<meta charset="utf-8">
	<title>NEOSCAN | <%= get_page(@conn) %></title>
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta name="format-detection" content="telephone=no"/>
	<meta name="mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<link rel="shortcut icon" href="<%= static_path(@conn, "/favicon.ico") %>">

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

	<meta property="og:title" content="NeoScan - NEO Blockchain Explorer" />
	<meta property="og:url" content="[neoscan.io]" />
	<meta property="og:type" content="website" />
	<meta property="og:description" content="A blockchain explorer for the NEO project. Track blocks, addresses, balances, transactions, NEO, GAS and other assets on the platform." />
	<meta property="og:image" content="<%= static_path(@conn, "/images/coz.png") %>" />

	<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i,700,700i|Teko:300,500" rel="stylesheet">

			<button class="hamburger hamburger--spin" type="button">

			</button>

				<select id="language-dropdown" onchange="window.location.href=this.value">
  					<option <%= if get_language(@conn) == "en" do %>selected<% end %> class="select-options" value="?locale=en">English</option>
  					<option <%= if get_language(@conn) == "fr" do %>selected<% end %> class="select-options" value="?locale=fr">Français</option>
					<option <%= if get_language(@conn) == "pt-br" do %>selected<% end %> class="select-options" value="?locale=pt-br">Português</option>
					<option <%= if get_language(@conn) == "it" do %>selected<% end %> class="select-options" value="?locale=it">Italiano</option>
					<option <%= if get_language(@conn) == "de" do %>selected<% end %> class="select-options" value="?locale=de">Deutsch</option>
				</select>

          <img src="<%= static_path(@conn, "/images/NEOSCAN_Logo.svg") %>" alt="<%= gettext "NEOSCAN Home" %>" title="<%= gettext "NEOSCAN Home" %>" width="163px" height="32px" class="neoscan-logo" />

      <%= form_for @conn, home_path(@conn, :index), [as: :search], fn f -> %>
        <%= text_input f, :for,placeholder: gettext("Block Height, Hash, Address or Transaction id"),class: "searchbar fa fa-search", type: "search" %>
				<%= submit "", [class: "icon search-btn fa fa-search"]  %>
        <%= error_tag f, :for %>
      <% end %>

						<a href="<%= home_path(@conn, :index) %>" alt="Explorer" title="Explorer" class="nav-link <%= if is_home_path(@conn), do: " active" %>"><%= gettext "Explorer" %>

						<a href="<%= transactions_path(@conn, :index) %>" alt="Explorer" title="Explorer" class="nav-link <%= if is_transactions_path(@conn), do: " active" %>"><%= gettext "Transactions" %>

						<a href="<%= addresses_path(@conn, :index) %>" alt="Explorer" title="Explorer" class="nav-link <%= if is_addresses_path(@conn), do: " active" %>"><%= gettext "Wallet Addresses" %>

						<a href="<%= blocks_path(@conn, :index) %>" alt="Explorer" title="Explorer" class="nav-link <%= if is_blocks_path(@conn), do: " active" %>"><%= gettext "Blocks" %>

						<a href="<%= assets_path(@conn, :index) %>" alt="Explorer" title="Explorer" class="nav-link <%= if is_assets_path(@conn), do: " active" %>"><%= gettext "Assets" %>

						<a href="<%= doc_path(@conn, :index) %>" alt="Explorer" title="Explorer" class="nav-link <%= if is_doc_path(@conn), do: " active" %>"><%= gettext "API" %>

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

					<img src="<%= static_path(@conn, "/images/NEOSCAN_Logo.svg") %>" alt="NEOSCAN Home" title="NEOSCAN Home" class="neoscan-logo-footer" width="136px" height="27px" />

<%= gettext "The source code is" %> <a href="http://opensource.org/licenses/mit-license.php" alt="<%= gettext "View MIT License"%>" title="<%= gettext "View MIT License"%>" class="large-blue-link"><%= gettext "licensed" %> MIT

<%= gettext "The website content is licensed" %> CC ANS 4.0

<a href="https://neoscan-testnet.io/" alt="<%= gettext "NEOSCAN Testnet"%>" title="<%= gettext "NEOSCAN Testnet"%>" class="large-blue-link"><%= gettext "NEOSCAN Testnet" %>

© 2017 <a href="http://cityofzion.io/" alt="<%= gettext "Visit City of Zion"%>" title="<%= gettext "Visit City of Zion"%>" class="large-blue-link"><%= gettext "City Of Zion" %>

						<a href="http://slack.cityofzion.io/" alt="<%= gettext "NEO Slack"%>" title="<%= gettext "NEO Slack"%>" class="coz-slack"><%= gettext "NEO Slack" %>

						<a href="https://github.com/CityOfZion" alt="<%= gettext "City of Zion Github" %>" title="<%= gettext "City of Zion Github" %>" class="coz-github"><%= gettext "City of Zion Github" %>

						<a href="<%= doc_path(@conn, :index) %>" alt="<%= gettext "NEOSCAN API" %>" title="<%= gettext "NEOSCAN API" %>" class="coz-api"><%= gettext "NEOSCAN API" %>

              <%= if get_tooltips(@conn) == "on" do %><%= gettext "Tooltips On " %><% end %>
              <%= if get_tooltips(@conn) == "off" do %><%= gettext "Tooltips Off " %><% end %>


Fix win32 boot loader script

Fix win32 boot loader script

:: Discover the current release directory from the directory
:: of this script and the start_erl.data file
@set script_dir=%~dp0
@for %%A in ("%script_dir%\..") do @(
  set release_root_dir=%%~fA
)
@set rel_name=<%= release_name %>
@set rel_vsn=<%= release_version %>
@set boot_script=%release_root_dir%\releases\%rel_vsn%\%rel_name%.bat
@%boot_script% "%1"

:: Discover the current release directory from the directory
:: of this script and the start_erl.data file
@set script_dir=%~dp0
@for %%A in ("%script_dir%\..") do @(
  set release_root_dir=%%~fA
)
@set rel_vsn=TODO
@set boot_script=%release_root_dir%\releases\%rel_vsn%\boot_win.bat
%boot_script% "%1"


stale podcast admin view

stale podcast admin view

  <%= link "Episode import", to: podcast_path(@conn, :delta_import_all),
                             class: "btn btn-info" %>
  <%= link "Factory", to: podcast_path(@conn, :factory),
                                          class: "btn btn-primary" %>

Stale podcasts

      ID
      Title
      Update paused
      Website
      Actions