external tools i18n
Change-Id: I85b7b7ddce621dee4d79372f828239df1bea059c Reviewed-on: https://gerrit.instructure.com/4138 Reviewed-by: Cody Cutrer <cody@instructure.com> Tested-by: Hudson <hudson@instructure.com>
This commit is contained in:
parent
c3d2863973
commit
68029325d5
|
@ -3,31 +3,31 @@
|
|||
<div class="header">
|
||||
<div class="name"><%= tool.try(:name) %></div>
|
||||
<div class="links">
|
||||
<a href="#" rel="<%= context_url(@context, :context_external_tool_url, tool ? tool.id : "{{ id }}") %>" class="update_tool_url edit_tool_link" title="Edit Tool"><%= image_tag "edit.png" %></a>
|
||||
<a href="#" class="delete_tool_link" title="Delete Tool"><%= image_tag "delete.png" %></a>
|
||||
<a href="#" rel="<%= context_url(@context, :context_external_tool_url, tool ? tool.id : "{{ id }}") %>" class="update_tool_url edit_tool_link" title="<%= t :edit_tool, "Edit Tool" %>"><%= image_tag "edit.png" %></a>
|
||||
<a href="#" class="delete_tool_link" title="<%= t :delete_tool, "Delete Tool" %>"><%= image_tag "delete.png" %></a>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<table class="formtable">
|
||||
<tr>
|
||||
<td>Privacy:</td>
|
||||
<td><%= before_label :privacy, "Privacy" %></td>
|
||||
<td class="readable_state"><%= tool.try(:readable_state) %></td>
|
||||
</tr><tr>
|
||||
<td>Consumer Key:</td>
|
||||
<td><%= before_label :consumer_key, "Consumer Key" %></td>
|
||||
<td class="consumer_key"><%= tool.try(:consumer_key) %></td>
|
||||
</tr><tr class="tool_url" style="<%= hidden if tool.try(:url).blank? %>">
|
||||
<td>URL:</td>
|
||||
<td><%= before_label :url, "URL" %></td>
|
||||
<td class="url"><%= tool.try(:url) %></td>
|
||||
</tr><tr class="tool_domain" style="<%= hidden if tool.try(:domain).blank? %>">
|
||||
<td>Domain:</td>
|
||||
<td><%= before_label :domain, "Domain" %></td>
|
||||
<td class="domain"><%= tool.try(:domain) %></td>
|
||||
</tr><tr>
|
||||
<td>Description:</td>
|
||||
<td><%= before_label :description, "Description" %></td>
|
||||
<td class="description" style="font-size: 0.8em;">
|
||||
<%= tool.try(:description) %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
<div id="external_tools">
|
||||
<p>External tools are tools outside of Canvas that support
|
||||
Basic LTI integrations. You will need to check with the author
|
||||
of the tool for the correct configuration parameters to add.
|
||||
Tools are configured at the account level, and can then be
|
||||
added as content in course modules for courses in the account.
|
||||
<p><%= t :external_tools_note, "External tools are tools outside of Canvas that support Basic LTI integrations. You will need to check with the author of the tool for the correct configuration parameters to add. Tools are configured at the account level, and can then be added as content in course modules for courses in the account." %>
|
||||
</p>
|
||||
<% @context.context_external_tools.active.each do |tool| %>
|
||||
<%= render :partial => 'external_tools/external_tool', :object => tool %>
|
||||
|
@ -14,44 +10,44 @@
|
|||
<% form_for :external_tool, :url => '.', :html => {:id => 'external_tool_form'} do |f| %>
|
||||
<table class="formtable">
|
||||
<tr>
|
||||
<td><%= f.label :name, "Name:" %></td>
|
||||
<td><%= f.blabel :name, :en => "Name" %></td>
|
||||
<td><%= f.text_field :name %></td>
|
||||
</tr><tr>
|
||||
<td><%= f.label :consumer_key, "Consumer Key:" %></td>
|
||||
<td><%= f.blabel :consumer_key, :en => "Consumer Key" %></td>
|
||||
<td><%= f.text_field :consumer_key %></td>
|
||||
</tr><tr>
|
||||
<td style="vertical-align: top;"><%= f.label :shared_secret, "Shared Secret:" %></td>
|
||||
<td style="vertical-align: top;"><%= f.blabel :shared_secret, :en => "Shared Secret" %></td>
|
||||
<td>
|
||||
<%= f.text_field :shared_secret %>
|
||||
<div style="font-size: 0.8em;" class="shared_secret_note">enter a new value to change</div>
|
||||
<div style="font-size: 0.8em;" class="shared_secret_note"><%= t :shared_secret_note, "enter a new value to change" %></div>
|
||||
</td>
|
||||
</tr><tr>
|
||||
<td><label for="external_tool_match_by">Match By:</label></td>
|
||||
<td><label for="external_tool_match_by"><%= before_label :match_by, "Match By" %></label></td>
|
||||
<td>
|
||||
<select id="external_tool_match_by">
|
||||
<option value="domain">Domain</option>
|
||||
<option value="url">URL</option>
|
||||
<option value="domain"><%= t :domain, "Domain" %></option>
|
||||
<option value="url"><%= t :url, "URL" %></option>
|
||||
</select>
|
||||
</td>
|
||||
</tr><tr class='tool_url'>
|
||||
<td><%= f.label :url, "URL:" %></td>
|
||||
<td><%= f.blabel :url, :en => "URL" %></td>
|
||||
<td><%= f.text_field :url %></td>
|
||||
</tr><tr class='tool_domain'>
|
||||
<td><%= f.label :domain, "Domain:" %></td>
|
||||
<td><%= f.blabel :domain, :en => "Domain" %></td>
|
||||
<td><%= f.text_field :domain %></td>
|
||||
</tr><tr>
|
||||
<td><%= f.label :privacy_level, "Privacy:" %></td>
|
||||
<td><%= f.select :privacy_level, [['Anonymous','anonymous'],['Name Only','name_only'],['Public','public']] %></td>
|
||||
<td><%= f.blabel :privacy_level, :en => "Privacy" %></td>
|
||||
<td><%= f.select :privacy_level, [[t(:anonymous, "Anonymous"),'anonymous'],[t(:name_only, "Name Only"),'name_only'],[t(:public, "Public"),'public']] %></td>
|
||||
</tr><tr>
|
||||
<td colspan="2">
|
||||
<%= f.label :description, "Description:" %><br/>
|
||||
<%= f.blabel :description, :en => "Description" %><br/>
|
||||
<%= f.text_area :description, :style => "width: 550px; height: 100px;" %>
|
||||
</td>
|
||||
</tr><tr>
|
||||
<td colspan="2">
|
||||
<div class="button-container">
|
||||
<button class="button save_button" type="submit">Save Tool Settings</button>
|
||||
<button class="button button-secondary cancel_button" type="button">Cancel</button>
|
||||
<button class="button save_button" type="submit"><%= t "#buttons.save_tool_settings", "Save Tool Settings" %></button>
|
||||
<button class="button button-secondary cancel_button" type="button"><%= t "#buttons.cancel", "Cancel" %></button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -60,5 +56,5 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="button-container">
|
||||
<button class="button add_tool_link"><%= image_tag "add.png" %> Add External Tool</button>
|
||||
<button class="button add_tool_link"><%= image_tag "add.png" %> <%= t "#buttons.add_external_tool", "Add External Tool" %></button>
|
||||
</div>
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
<div style="margin: 50px auto; width: 400px;">
|
||||
<% if params[:lti_errormsg] %>
|
||||
<h2>Tool Failed to Load</h2>
|
||||
There was a problem loading the specified tool. Please contact your
|
||||
administrator if these problems persist.
|
||||
<h2><%= t :load_failure_title, "Tool Failed to Load" %></h2>
|
||||
<%= t :load_failure_message, "There was a problem loading the specified tool. Please contact your administrator if these problems persist." %>
|
||||
<div class="error" style="color: #a40; margin-top: 20px;">
|
||||
<%= params[:lti_errormsg] %>
|
||||
</div>
|
||||
<% else %>
|
||||
<h2>Tool Use Finished</h2>
|
||||
You are free to navigate away from this page.
|
||||
<h2><%= t :load_success_title, "Tool Use Finished" %></h2>
|
||||
<%= t :load_success_message, "You are free to navigate away from this page." %>
|
||||
<div class="error" style="color: #a40; margin-top: 20px;">
|
||||
<%= params[:lti_msg] %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<% settings.each do |key, value| %>
|
||||
<%= hidden_field_tag key, value %>
|
||||
<% end %>
|
||||
<button class="button" type="submit">Load <%= @tool.name %></button>
|
||||
<button class="button" type="submit"><%= t :load_tool_button, "Load %{tool}", :tool => @tool.name %></button>
|
||||
</form>
|
||||
|
||||
<%= iframe("about:blank", :name => 'tool_content', :id => 'tool_content', :width => '100%', :height => '400') %>
|
||||
|
|
Loading…
Reference in New Issue