diff --git a/app/controllers/my_profile/cms/text_html.rb b/app/controllers/my_profile/cms/text_html.rb index a96a105..0321d87 100644 --- a/app/controllers/my_profile/cms/text_html.rb +++ b/app/controllers/my_profile/cms/text_html.rb @@ -2,7 +2,9 @@ class CmsController def text_html_new @article = Article.new(params[:article]) - @article.parent = profile.articles.find(params[:parent_id]) + if params[:parent_id] + @article.parent = profile.articles.find(params[:parent_id]) + end @article.profile = profile if request.post? if @article.save diff --git a/app/models/article.rb b/app/models/article.rb index dfd4653..84fa5d7 100644 --- a/app/models/article.rb +++ b/app/models/article.rb @@ -36,7 +36,7 @@ class Article < ActiveRecord::Base end def mime_type_description - _('Text document') + _('HTML Text document') end def title diff --git a/app/views/cms/new.rhtml b/app/views/cms/new.rhtml index f5ed00b..7d7445f 100644 --- a/app/views/cms/new.rhtml +++ b/app/views/cms/new.rhtml @@ -1,3 +1,9 @@ +
+ <%= _('Choose the type of article:') %> +
+ +