Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
70 lines (55 sloc) 2.49 KB
<p class="meta"><%= raw t('dashboard._wiki.shared_knowledge_base', :url => '/wiki') %><!-- | <a href="">Your pages</a>--></p>
<div class="meta row">
<div class="col-lg-8 col-md-7 col-sm-7 col-7">
<div class="input-group">
<form class="search-form-wiki form-inline" role="search" autocomplete="off">
<input type="text" class="search-wiki form-control form-control-sm" id="sidebar-searchform-input" style="width:70%;" placeholder="<%= t('dashboard._wiki.search') %>" required>
<div class="input-group-append">
<button class="btn btn-sm btn-outline-secondary" type="submit"><i class="fa fa-search"></i></button>
</div>
</form>
</div>
</div>
<div class="col-xl-4 col-lg-5 col-md-5 col-5">
<a href="/wiki/new" class="btn btn-sm btn-outline-secondary btn-block" type="button"><i class="fa fa-plus-circle"></i> <%= t('dashboard._wiki.new_page') %></a>
</div>
</div>
<div class="wikis">
<% wikis.each_with_index do |wiki, index| %>
<div class="wiki" data-index="<%= index %>">
<p>
<small style="color:#888;">
<% if wiki.is_a?(Node) %>
<i class="fa fa-book"></i>
<%= t('dashboard._wiki.new_page_by') %> <a href="/profile/<%= wiki.latest.author.name %>"><%= wiki.latest.author.name %></a>
<% else %>
<i class="fa fa-pencil"></i>
<%= t('dashboard._wiki.new_edit_by') %> <a href="/profile/<%= wiki.author.name %>"><%= wiki.author.name %></a>
<% end %>
<%= distance_of_time_in_words(wiki.created_at, Time.current, { include_seconds: false, scope: 'datetime.time_ago_in_words' }) %>
<% if wiki.is_a?(Revision) && wiki.previous %>
- <a class="btn-diff btn-diff-<%= index %>" style="cursor:pointer;"><%= t('dashboard._wiki.changes') %></a>
<% end %>
</small>
</p>
<h4>
<a href="<%= wiki.path %>">
<% if wiki.is_a?(Node) %>
<%= wiki.latest.title %>
<% else %>
<%= wiki.parent.latest.title %>
<% end %>
</a>
</h4>
<% if wiki.is_a?(Revision) && wiki.previous %>
<div data-diff-a="<%= wiki.previous.vid %>"
data-diff-b="<%= wiki.vid %>"
class="well wiki-diff wiki-diff-<%= index %>"
style="display:none;">
<i class="fa fa-circle-o-notch fa-spin"></i>
</div>
<% end %>
</div>
<% end %>
<p><small><a href="/wiki/"><%= t('dashboard._wiki.more') %> &raquo;</a></small></p>
</div>
You can’t perform that action at this time.