Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcia Ramos <virtua.creative@gmail.com>2018-01-17 21:58:06 +0300
committerMarcia Ramos <virtua.creative@gmail.com>2018-01-17 22:01:00 +0300
commit79ed56d047c798d4cb45b7d96fe885ba9391efe3 (patch)
tree5d0ce27cead46dffc17d216b103c9bb84bceff27 /layouts
parent13cfd47913219ef98182bb0ee473b175e359d84d (diff)
add conditional for the article layout
Diffstat (limited to 'layouts')
-rw-r--r--layouts/default.html26
1 files changed, 14 insertions, 12 deletions
diff --git a/layouts/default.html b/layouts/default.html
index 04cd24a4..dfea4eae 100644
--- a/layouts/default.html
+++ b/layouts/default.html
@@ -19,18 +19,20 @@
<% end %>
<% end %>
<%= yield %>
- <div class="article-metadata">
- Written by <a href="https://gitlab.com/<%= @item[:author_gitlab] %>" target="_blank"><%= @item[:author] %></a>
- on <%= @item[:date] %>
- &#8226;
- <% if @item[:last_updated] %>
- Last updated: <%= @item[:last_updated] %>
- &#8226;
- <% end %>
- Type: <%= @item[:article_type] %>
- &#8226;
- Level: <%= @item[:level] %>
- </div>
+ <% if @item[:author] %>
+ <div class="article-metadata">
+ Written by <a href="https://gitlab.com/<%= @item[:author_gitlab] %>" target="_blank"><%= @item[:author] %></a>
+ on <%= @item[:date] %>
+ &#8226;
+ <% if @item[:last_updated] %>
+ Last updated: <%= @item[:last_updated] %>
+ &#8226;
+ <% end %>
+ Type: <%= @item[:article_type] %>
+ &#8226;
+ Level: <%= @item[:level] %>
+ </div>
+ <% end %>
<hr>
<div class="edit-on">
<%= edit_on_gitlab(@item) %>