forked from bofh/fetsite
modify attachments
This commit is contained in:
@@ -12,6 +12,9 @@
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Actions</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<%= link_to ff_icon("icon-pencil")+"Make Titlepic", set_titlepic_thema_attachment_path(a.thema,a,:params=>{:titlepic=>true}) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to ff_icon("icon-pencil")+"Edit", edit_thema_attachment_path(a.thema,a) %>
|
||||
</li><li>
|
||||
<%= link_to "Delete Attachment", thema_attachment_path(a.thema,a), method: "DELETE", confirm: "Sure?" , class: "btn-danger " %>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<% if can? :show, small %>
|
||||
<a name="thema_<%=small.id%>" href="#<%=small.id%>">
|
||||
<h2><%= small.title %> <%= link_to fa_icon("pencil"), verwalten_thema_path(small) if can? :edit, small %> </h2>
|
||||
<h2><%= link_to small.title,small %> <%= link_to fa_icon("pencil"), verwalten_thema_path(small) if can? :edit, small %> </h2>
|
||||
</a>
|
||||
<%= image_tag small.titlepics.first.datei.url unless small.titlepics.first.nil? %>
|
||||
<% if small.is_outdated? %>
|
||||
<div class="sticker sticker-red"> <%= I18n.t("thema.outdated") %> <%= link_to"Als aktuell markieren",is_updated_thema_path(small), :class=>:btn if can? :is_updated, small%></div>
|
||||
<% end %>
|
||||
|
||||
@@ -1,19 +1,24 @@
|
||||
<%= content_for :header do %>
|
||||
<title><%= @thema.title.to_s + " (" + @thema.themengruppe.title.to_s + ")" %></title>
|
||||
|
||||
<% unless @thema.attachments.first.nil?
|
||||
# picture_url=URI(root_url)
|
||||
# picture_url.path=@thema.picture.url(:locale=>nil, :theme=>nil)
|
||||
end
|
||||
<%
|
||||
mog = {
|
||||
:title => @thema.title.to_s + " (" + @thema.themengruppe.title.to_s + ")",
|
||||
:type => "article",
|
||||
:description =>@thema.text_first_words,
|
||||
:url=>thema_url(:theme=>nil)
|
||||
}
|
||||
%>
|
||||
|
||||
<%=
|
||||
unless @thema.titlepics.first.nil?
|
||||
picture_url=URI(root_url)
|
||||
picture_url.path=@thema.titlepics.first.datei.url(:locale=>nil, :theme=>nil)
|
||||
mog[:image]= picture_url
|
||||
end
|
||||
%>
|
||||
<% set_meta_tags :og => {
|
||||
:title => @thema.title.to_s + " (" + @thema.themengruppe.title.to_s + ")",
|
||||
:type => "article",
|
||||
:description =>@thema.text_first_words,
|
||||
:url=>thema_url(:theme=>nil)
|
||||
}
|
||||
%>
|
||||
<%= display_meta_tags %>
|
||||
<%= mog.to_yaml %>
|
||||
<%= display_meta_tags :og=> mog %>
|
||||
<% end %>
|
||||
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
Reference in New Issue
Block a user