Commit 711552ab560c03efb354b7de04ae5d19a8d8f3e9
1 parent
f57b4a6a
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Dspace Server Crud working, needs CSS improvement
Showing
2 changed files
with
6 additions
and
18 deletions
Show diff stats
plugins/virtuoso/views/virtuoso_plugin_admin/_server_list_item.html.erb
| 1 | <li> | 1 | <li> |
| 2 | <ul class="link-list-row"> | 2 | <ul class="link-list-row"> |
| 3 | <li> | 3 | <li> |
| 4 | - <%= text_field_tag 'settings[dspace_servers][][dspace_uri]', dspace_uri[:dspace_uri], :class => 'link-name', :maxlength => 40 %> | 4 | + <% value = server_list_item[:dspace_uri] if server_list_item %> |
| 5 | + <%= text_field_tag 'settings[dspace_servers][][dspace_uri]', value, { :class => 'link-name', :maxlength => 40 } %> | ||
| 5 | </li> | 6 | </li> |
| 6 | <li> | 7 | <li> |
| 7 | <%= button_without_text(:delete, _('Delete'), "#" , :class=>"delete-server-list-row") %> | 8 | <%= button_without_text(:delete, _('Delete'), "#" , :class=>"delete-server-list-row") %> |
plugins/virtuoso/views/virtuoso_plugin_admin/index.html.erb
| 1 | <%= javascript_include_tag '/plugins/virtuoso/edit-server-list' %> | 1 | <%= javascript_include_tag '/plugins/virtuoso/edit-server-list' %> |
| 2 | 2 | ||
| 3 | -<h1><%= _('Virtuoso settings')%></h1> | 3 | +<h1><%= _('Virtuoso settings') %></h1> |
| 4 | 4 | ||
| 5 | <%= form_for(:settings) do |f| %> | 5 | <%= form_for(:settings) do |f| %> |
| 6 | 6 | ||
| @@ -8,37 +8,24 @@ | @@ -8,37 +8,24 @@ | ||
| 8 | <%= labelled_form_field _('Virtuoso URL:'), f.text_field(:virtuoso_uri) %> | 8 | <%= labelled_form_field _('Virtuoso URL:'), f.text_field(:virtuoso_uri) %> |
| 9 | <%= labelled_form_field _('Virtuoso Username:'), f.text_field(:virtuoso_username) %> | 9 | <%= labelled_form_field _('Virtuoso Username:'), f.text_field(:virtuoso_username) %> |
| 10 | <%= labelled_form_field _('Virtuoso Password:'), f.password_field(:virtuoso_password) %> | 10 | <%= labelled_form_field _('Virtuoso Password:'), f.password_field(:virtuoso_password) %> |
| 11 | - <%#= labelled_form_field _('DSpace URL:'), f.text_field(:dspace_uri) %> | ||
| 12 | </strong> | 11 | </strong> |
| 13 | 12 | ||
| 14 | - | ||
| 15 | -<!-- Iníco bloco link original --> | ||
| 16 | -<% raise @settings[:settings].to_yaml %> | ||
| 17 | - | ||
| 18 | <strong><%= _('Dspace Servers') %></strong> | 13 | <strong><%= _('Dspace Servers') %></strong> |
| 19 | <div id='edit-server-list-block'> | 14 | <div id='edit-server-list-block'> |
| 20 | <ul class='link-list-header'> | 15 | <ul class='link-list-header'> |
| 21 | <li class='link-list-name'><%= _('DSpace URL') %></li> | 16 | <li class='link-list-name'><%= _('DSpace URL') %></li> |
| 22 | </ul> | 17 | </ul> |
| 23 | <ul id="dropable-server-list"> | 18 | <ul id="dropable-server-list"> |
| 24 | - <% for dspace_uri in @settings[:dspace_servers] do %> | ||
| 25 | - <%= render :partial => 'server_list_item', :locals => {:dspace_uri => dspace_uri} %> | ||
| 26 | - <% end %> | 19 | + <%= render :partial => 'server_list_item', :collection=>@settings.dspace_servers %> |
| 27 | </ul> | 20 | </ul> |
| 28 | - | ||
| 29 | <div id="new-template"> | 21 | <div id="new-template"> |
| 30 | <% template_server = {'icon' => 'ok'} %> | 22 | <% template_server = {'icon' => 'ok'} %> |
| 31 | - <%= render :partial => 'server_list_item', :locals => {:server => {} } %> | 23 | + <%= render :partial => 'server_list_item', :locals => {:dspace_uri => "http://" } %> |
| 32 | </div> | 24 | </div> |
| 33 | </div> | 25 | </div> |
| 34 | 26 | ||
| 35 | <%= link_to_function(_('New Dspace Server'), 'add_new_server();', :class => 'button icon-add with-text') %> | 27 | <%= link_to_function(_('New Dspace Server'), 'add_new_server();', :class => 'button icon-add with-text') %> |
| 36 | 28 | ||
| 37 | - | ||
| 38 | -<!-- FIm bloco link original --> | ||
| 39 | - | ||
| 40 | - | ||
| 41 | - | ||
| 42 | <% button_bar do %> | 29 | <% button_bar do %> |
| 43 | <%= submit_button(:save, _('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %> | 30 | <%= submit_button(:save, _('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %> |
| 44 | <% end %> | 31 | <% end %> |
| @@ -75,4 +62,4 @@ | @@ -75,4 +62,4 @@ | ||
| 75 | <%= button :edit, _('Triple management'), :action => :triple_management %> | 62 | <%= button :edit, _('Triple management'), :action => :triple_management %> |
| 76 | <%= button :edit, _('Custom Queries'), :action => :index, :controller => 'virtuoso_plugin_custom_queries' %> | 63 | <%= button :edit, _('Custom Queries'), :action => :index, :controller => 'virtuoso_plugin_custom_queries' %> |
| 77 | </div> | 64 | </div> |
| 78 | -</div> | 65 | -</div> |
| 66 | +</div> | ||
| 79 | \ No newline at end of file | 67 | \ No newline at end of file |