forked from MarkUsProject/Markus
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of git://github.com/MarkUsProject/Markus into d…
…epotOfficiel
- Loading branch information
Showing
19 changed files
with
183 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,37 @@ | ||
<div id="title_bar"><h1><%= I18n.t('notes.new.title') %></h1></div> | ||
|
||
<div class="wrapLeft"> | ||
<%= form_for :note, :url => notes_path() do |f| %> | ||
<%= f.error_messages %> | ||
<%= form_for @note, :as => :note, :url => notes_path() do |f| %> | ||
<%= render :partial => "shared/error_explanation", :locals => { :model => @note } %> | ||
<fieldset> | ||
<p> | ||
<%= label_tag "noteable_type", I18n.t('notes.noteable') %> | ||
<%= select_tag "noteable_type", | ||
options_for_select( | ||
Note::NOTEABLES.map {|item| [I18n.t('notes.noteables.' + item), | ||
item]}) %> | ||
<%= observe_field :noteable_type, | ||
:on => 'onchange', | ||
:url => noteable_object_selector_notes_path(), | ||
:with => "noteable_type", | ||
:before => "$('loading_selector').show()", | ||
:success => "$('loading_selector').hide()" %> | ||
<span id="loading_selector" style="display:none"> | ||
<%= image_tag('spinner.gif') %> <%= I18n.t('notes.new.loading_selector') %> | ||
</span> | ||
</p> | ||
|
||
<fieldset> | ||
<div id="noteable_selector"> | ||
<%= render :partial => 'grouping' %> | ||
</div> | ||
|
||
<p> | ||
<%= label_tag "noteable_type", I18n.t('notes.noteable') %> | ||
<%= select_tag "noteable_type", | ||
options_for_select( | ||
Note::NOTEABLES.map {|item| [I18n.t('notes.noteables.' + item), | ||
item]}) %> | ||
<%= observe_field :noteable_type, | ||
:on => 'onchange', | ||
:url => noteable_object_selector_notes_path(), | ||
:with => "noteable_type", | ||
:before => "$('loading_selector').show()", | ||
:success => "$('loading_selector').hide()" %> | ||
<span id="loading_selector" style="display:none"> | ||
<%= image_tag('spinner.gif') %> <%= I18n.t('notes.new.loading_selector') %> | ||
</span> | ||
</p> | ||
<p> | ||
<%= raw(f.label :notes_message, I18n.t("notes.note")) %> | ||
<%= raw(f.text_area :notes_message, :rows => 10) %> | ||
</p> | ||
</fieldset> | ||
|
||
<div id="noteable_selector"> | ||
<%= render :partial => 'grouping' %> | ||
</div> | ||
|
||
<p> | ||
<%= f.label :notes_message, I18n.t("notes.note") %> | ||
<%= f.text_area :notes_message, :rows => 10 %> | ||
</p> | ||
</fieldset> | ||
|
||
<%= f.submit I18n.t('save') %> | ||
<%= link_to I18n.t('cancel'), notes_path(), :class => "button" %> | ||
<% end %> | ||
<%= f.submit I18n.t('save') %> | ||
<%= link_to I18n.t('cancel'), notes_path(), :class => "button" %> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<% #requires locals: model - the object that may have an error and flash_message (optional) %> | ||
<% if model.errors.any? %> | ||
<div class="errorExplanation" id="errorExplanation" > | ||
<% unless defined?(flash_message) == nil %> | ||
<h2><%= flash_message %></h2> | ||
<% end %> | ||
<ul> | ||
<% model.errors.full_messages.each do |msg| %> | ||
<li><%= msg %></li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
# Load the rails application | ||
require File.expand_path('../application', __FILE__) | ||
|
||
# Fix TA pluralization | ||
ActiveSupport::Inflector.inflections do |inflection| inflection.irregular "ta", "tas" | ||
end | ||
|
||
# Initialize the rails application | ||
Markus::Application.initialize! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.