fix link dialog #181

This commit is contained in:
Andreas Stephanides
2014-10-26 13:14:37 +01:00
parent 42ecb7dbcb
commit b4f9e793c3
5 changed files with 10 additions and 10 deletions

View File

@@ -12,7 +12,8 @@
*= require_self
* require_tree .
*= require jquery.fileupload-ui
*= require jquery.datetimepicker
*= require jquery.datetimepicker
*= require jquery.ui.dialog
* require 'bootstrap'
* require 'neuigkeiten'

View File

@@ -94,7 +94,7 @@ class Ability
can :showintern, Rubrik
can :seeintern, User
can :shownonpublic, Rubrik
can :manage, Nlink
end
if user.has_role?("newsadmin") || user.has_role?("fetadmin")
can :addmoderator, Rubrik

View File

@@ -16,7 +16,7 @@
<b><%=b.name%></b> (<%=b.lva.full_name%>)
</div>
<div class="span4">
<%=b.updated_at.to_s%>
<%= b.updated_at.to_s%>
</div>
</div>
<%end%>

View File

@@ -5,7 +5,7 @@
<% p = nlink_list.link_type.downcase.pluralize+"/nlink" %>
<%= raw(strip_links(render :partial=>p, :object=>nlink_list.link )) %>
</div>
<%= link_to "DELETE", delete_link_rubrik_neuigkeit_path(nlink_list.neuigkeit.rubrik,nlink_list.neuigkeit.id, :nlink_id=>nlink_list.id) if can? :delete, Nlink %>
<%= link_to fa_icon("unlink"), delete_link_rubrik_neuigkeit_path(nlink_list.neuigkeit.rubrik,nlink_list.neuigkeit.id, :nlink_id=>nlink_list.id), :title=>"unlink" if can? :delete, Nlink %>
</div>
<% end %>

View File

@@ -49,16 +49,15 @@
</div>
<%= render partial: 'nlink_list_whole', :object=>@neuigkeit.nlinks %>
<% if can? :find_link , @neuigkeit %>
<a id="findlink-open" href="#"> Neue Verknüpfungen </a>
<a id="findlink-open" href="#"><%= fa_icon("link")%> Neue Verknüpfungen </a>
<% end %>
</div>
<style>
div.ui-dialog-titlebar {
background:white;
}
</style>
<div id="findlink-body" style="background:white; border:solid black 1pt">
<div id="findlink-body"class="ui-dialog" style="">
<% if can? :find_link, @neuigkeit %>
Nach Element suchen:
<%= semantic_form_for :find_link, :url=>find_link_rubrik_neuigkeit_path(@rubrik,@neuigkeit), :html=>{:id=>"search_form", :method=>'get'} , :remote=> true do |f| %>
<%= f.input :query, :input_html => { :name => 'query' },:label=>false %>
<% end %>
@@ -70,9 +69,9 @@ background:white;
$(function(){
dialog = $( "#findlink-body" ).dialog({
autoOpen: false,
height: 300,
width: 350,
modal: true,
title: "Neue Verknüpfung hinzufügen",
buttons: {
"Fertig": function() {
dialog.dialog( "close" );