OSDN Git Service

fix summary
authoryasushiito <yas@pen-chan.jp>
Sat, 11 Oct 2014 02:40:44 +0000 (11:40 +0900)
committeryasushiito <yas@pen-chan.jp>
Sat, 11 Oct 2014 02:40:44 +0000 (11:40 +0900)
29 files changed:
app/assets/javascripts/models/author.js.coffee
app/assets/javascripts/models/comic_story.js.coffee
app/assets/javascripts/models/picture.js.coffee
app/assets/javascripts/models/resource_picture.js.coffee
app/assets/javascripts/models/sheet_panel.js.coffee
app/assets/javascripts/models/story_sheet.js.coffee
app/assets/javascripts/models/system_picture.js.coffee
app/assets/javascripts/views/balloons/summary.js.coffee
app/assets/javascripts/views/comic_stories/summary.js.coffee
app/assets/javascripts/views/comics/icon.js.coffee [new file with mode: 0644]
app/assets/javascripts/views/comics/summary.js.coffee
app/assets/javascripts/views/common.js.coffee
app/assets/javascripts/views/ground_colors/summary.js.coffee
app/assets/javascripts/views/ground_pictures/summary.js.coffee
app/assets/javascripts/views/licenses/summary.js.coffee
app/assets/javascripts/views/panel_pictures/summary.js.coffee
app/assets/javascripts/views/panels/summary.js.coffee
app/assets/javascripts/views/pictures/credit.js.coffee
app/assets/javascripts/views/resource_pictures/summary.js.coffee
app/assets/javascripts/views/scroll_panels/summary.js.coffee
app/assets/javascripts/views/scrolls/summary.js.coffee
app/assets/javascripts/views/sheets/icon.js.coffee [new file with mode: 0644]
app/assets/javascripts/views/sheets/summary.js.coffee
app/assets/javascripts/views/speech_balloons/summary.js.coffee
app/assets/javascripts/views/speeches/summary.js.coffee
app/assets/javascripts/views/stories/icon.js.coffee [new file with mode: 0644]
app/assets/javascripts/views/stories/summary.js.coffee
app/assets/javascripts/views/story_sheets/summary.js.coffee
app/views/layouts/application.html.erb

index 500080c..acf6412 100644 (file)
@@ -15,6 +15,9 @@ class Pettanr.Author extends Peta.Owner
   name_view: (length = null) ->\r
     new Pettanr.Views.Author.Name({item: this, length: length})\r
   \r
+  icon_with_caption_view: (half, column_name, length) ->\r
+    new Pettanr.Views.Common.IconWithCaption({item: this, half: half, column_name: column_name, length: length})\r
+  \r
   initialize: () ->\r
     if @id\r
       @url = @url + @id\r
index bc504ee..bc8b015 100644 (file)
@@ -14,6 +14,12 @@ class Pettanr.ComicStory extends Peta.Leaf
     t: null\r
   } \r
   \r
+  comic: () ->\r
+    new Pettanr.Comic({id: @get('comic_id')})\r
+  \r
+  story: () ->\r
+    new Pettanr.Story({id: @get('story_id')})\r
+  \r
   disp_t: () ->\r
     @get('t') + 1\r
   \r
index 4fe1f71..c7f0f6d 100644 (file)
@@ -83,8 +83,8 @@ class Pettanr.Picture extends Peta.Content
   credit_icon_view: () ->\r
     new Pettanr.Views.Picture.CreditIcon({item: this})\r
   \r
-  credit_view: () ->\r
-    new Pettanr.Views.Picture.Credit({item: this})\r
+  credit_view: (with_icon = true) ->\r
+    new Pettanr.Views.Picture.Credit({item: this, with_icon: with_icon})\r
   \r
   initialize: () ->\r
     if @id\r
index b3f6658..100539e 100644 (file)
@@ -11,6 +11,9 @@ class Pettanr.ResourcePicture extends Peta.Content
     id: null\r
   } \r
   \r
+  picture: () ->\r
+    new Pettanr.Picture({id: @get('picture_id')})\r
+  \r
   is_visible: (operators) ->\r
     @is_user_visible(operators)\r
   \r
index a520482..b2e689f 100644 (file)
@@ -17,6 +17,12 @@ class Pettanr.SheetPanel extends Peta.Leaf
     t: null\r
   } \r
   \r
+  sheet: () ->\r
+    new Pettanr.Sheet({id: @get('sheet_id')})\r
+  \r
+  panel: () ->\r
+    new Pettanr.Panel({id: @get('panel_id')})\r
+  \r
   initialize: () ->\r
     if @id\r
       @url = @url + @id\r
index 09f4290..55d7ee4 100644 (file)
@@ -14,6 +14,12 @@ class Pettanr.StorySheet extends Peta.Leaf
     t: null\r
   } \r
   \r
+  story: () ->\r
+    new Pettanr.Story({id: @get('story_id')})\r
+  \r
+  sheet: () ->\r
+    new Pettanr.Sheet({id: @get('sheet_id')})\r
+  \r
   initialize: () ->\r
     if @id\r
       @url = @url + @id\r
index 180e728..3ec4833 100644 (file)
@@ -11,6 +11,9 @@ class Pettanr.SystemPicture extends Peta.SystemResource
     id: null\r
   } \r
   \r
+  picture: () ->\r
+    new Pettanr.Picture({id: @get('picture_id')})\r
+  \r
   filename: () ->\r
     @get('id') + '.' + @get('ext')\r
   \r
index 5b54e53..69abf34 100644 (file)
@@ -1,10 +1,16 @@
 class Pettanr.Views.Balloon.Summary extends Backbone.View\r
   \r
   initialize: (options) ->\r
-    super(options)\r
+    @item = options.item\r
+    @speech_balloon = @item.speech_balloon()\r
   \r
   render: () ->\r
     this.$el.html('')\r
-    this.$el.append('-')\r
+    _this = this\r
+    @speech_balloon.fetch().done ->\r
+      panel = _this.speech_balloon.panel()\r
+      panel.fetch().done ->\r
+        panel_icon = new Pettanr.Views.Common.Icon({item: panel, half: true})\r
+        _this.$el.append(panel_icon.render().el)\r
     this\r
   \r
index 1bf5ae0..9596603 100644 (file)
@@ -1,10 +1,7 @@
-class Pettanr.Views.ComicStory.Summary extends Backbone.View\r
+class Pettanr.Views.ComicStory.Summary extends Pettanr.Views.Common.Leaf.Summary\r
   \r
   initialize: (options) ->\r
+    options['binder_item_name'] = 'comic'\r
+    options['destination_item_name'] = 'story'\r
     super(options)\r
   \r
-  render: () ->\r
-    this.$el.html('')\r
-    this.$el.append('-')\r
-    this\r
-  \r
diff --git a/app/assets/javascripts/views/comics/icon.js.coffee b/app/assets/javascripts/views/comics/icon.js.coffee
new file mode 100644 (file)
index 0000000..e060500
--- /dev/null
@@ -0,0 +1,5 @@
+class Pettanr.Views.Comic.Icon extends Pettanr.Views.Common.Icon\r
+  \r
+  initialize: (options) ->\r
+    super(options)\r
+  \r
index 69358fe..a3c89fa 100644 (file)
@@ -1,24 +1,7 @@
-class Pettanr.Views.Comic.Summary extends Backbone.View\r
+class Pettanr.Views.Comic.Summary extends Pettanr.Views.Common.Binder.Summary\r
   \r
   initialize: (options) ->\r
-    @item = options.item\r
-    @visible = new Tag.Span({\r
-      content: Pettanr.AppHelper.t_selected_item('comic_visible_items', @item.get('visible'))\r
-    })\r
-    @stories_count = I18n.t('comics.comic_stories_count', {c: 0})\r
-    _this = this\r
-    @author = @item.author()\r
-    @author.fetch({cache: true}).done ->\r
-      _this.author_icon = _this.author.icon_view(true)\r
-      _this.author_name = _this.author.name_view(12)\r
-      _this.render()\r
-  \r
-  render: () ->\r
-    this.$el.html('')\r
-    this.$el.append(@visible.render().el)\r
-    this.$el.append(@stories_count)\r
-    if @author_icon\r
-      this.$el.append(@author_icon.render().el)\r
-      this.$el.append(@author_name.render().el)\r
-    this\r
+    options['visible_t'] = 'comic_visible_items'\r
+    options['visible_column_name'] = 'visible'\r
+    super(options)\r
   \r
index 21a8466..eac4581 100644 (file)
@@ -23,8 +23,9 @@ class Pettanr.Views.Common.Caption extends Backbone.View
   \r
   initialize: (options) ->\r
     @item = options.item\r
+    @column_name = options.column_name\r
     @length = options.length\r
-    @name = Pettanr.truncate(@item.get('name'), @length)\r
+    @name = Pettanr.truncate(@item.get(@column_name), @length)\r
     @url = Pettanr.url(@item.table_name(), 'show', {id: @item.get('id')})\r
     @linked_name = new Tag.A({\r
       attr: {href: '/' + @url}, \r
@@ -41,9 +42,11 @@ class Pettanr.Views.Common.IconWithCaption extends Backbone.View
   \r
   initialize: (options) ->\r
     @item = options.item\r
-    @column = options.column\r
+    @half = options.half\r
+    @column_name = options.column_name\r
+    @length = options.length\r
     @icon = new Pettanr.Views.Common.Icon({item: @item, half: @half})\r
-    @caption = new Pettanr.Views.Common.Caption({item: @item, column: @column, length: @length})\r
+    @caption = new Pettanr.Views.Common.Caption({item: @item, column_name: @column_name, length: @length})\r
   \r
   render: () ->\r
     this.$el.html('')\r
@@ -51,3 +54,58 @@ class Pettanr.Views.Common.IconWithCaption extends Backbone.View
     this.$el.append(@caption.render().el)\r
     this\r
   \r
+class Pettanr.Views.Common.Binder\r
+class Pettanr.Views.Common.Binder.Summary extends Backbone.View\r
+  \r
+  initialize: (options) ->\r
+    @item = options.item\r
+    @visible_t = options.visible_t\r
+    @visible_column_name = options.visible_column_name\r
+    @visible = new Tag.Div({\r
+      content: Pettanr.AppHelper.t_selected_item(@visible_t, @item.get(@visible_column_name))\r
+    })\r
+    _this = this\r
+    @author = @item.author()\r
+    @author.fetch({cache: true}).done ->\r
+      _this.author_icon_with_caption = _this.author.icon_with_caption_view(true, 'name', 12)\r
+      _this.render()\r
+  \r
+  render: () ->\r
+    this.$el.html('')\r
+    this.$el.append(@visible.render().el)\r
+    if @author_icon_with_caption\r
+      this.$el.append(@author_icon_with_caption.render().el)\r
+    this\r
+  \r
+class Pettanr.Views.Common.Leaf\r
+class Pettanr.Views.Common.Leaf.Summary extends Backbone.View\r
+  \r
+  initialize: (options) ->\r
+    @item = options.item\r
+    @binder_item_name = options.binder_item_name\r
+    @destination_item_name = options.destination_item_name\r
+    _this = this\r
+    @binder = @item[@binder_item_name]()\r
+    @binder.fetch({cache: true}).done ->\r
+      _this.binder_icon = _this.binder.icon_view(true)\r
+      _this.binder_author = _this.binder.author()\r
+      _this.binder_author.fetch({cache: true}).done ->\r
+        _this.binder_author_icon_with_caption = _this.binder_author.icon_with_caption_view(true, 'name', 12)\r
+        _this.render()\r
+    @destination = @item[@destination_item_name]()\r
+    @destination.fetch({cache: true}).done ->\r
+      _this.destination_icon = _this.destination.icon_view(true)\r
+      _this.destination_author = _this.destination.author()\r
+      _this.destination_author.fetch({cache: true}).done ->\r
+        _this.destination_author_icon_with_caption = _this.destination_author.icon_with_caption_view(true, 'name', 12)\r
+        _this.render()\r
+  \r
+  render: () ->\r
+    this.$el.html('')\r
+    if @binder_author_icon_with_caption and @destination_author_icon_with_caption\r
+      this.$el.append(@binder_icon.render().el)\r
+      this.$el.append(@binder_author_icon_with_caption.render().el)\r
+      this.$el.append(@destination_icon.render().el)\r
+      this.$el.append(@destination_author_icon_with_caption.render().el)\r
+    this\r
+  \r
index 50dbce1..3711393 100644 (file)
@@ -1,10 +1,14 @@
 class Pettanr.Views.GroundColor.Summary extends Backbone.View\r
   \r
   initialize: (options) ->\r
-    super(options)\r
+    @item = options.item\r
   \r
   render: () ->\r
     this.$el.html('')\r
-    this.$el.append('-')\r
+    _this = this\r
+    panel = @item.panel()\r
+    panel.fetch().done ->\r
+      panel_icon = new Pettanr.Views.Common.Icon({item: panel, half: true})\r
+      _this.$el.append(panel_icon.render().el)\r
     this\r
   \r
index f3a72e8..e0f8949 100644 (file)
@@ -1,10 +1,18 @@
 class Pettanr.Views.GroundPicture.Summary extends Backbone.View\r
   \r
   initialize: (options) ->\r
-    super(options)\r
+    @item = options.item\r
+    @picture = @item.picture()\r
   \r
   render: () ->\r
     this.$el.html('')\r
-    this.$el.append('-')\r
+    _this = this\r
+    @picture.fetch().done ->\r
+      credit = _this.picture.credit_view(false)\r
+      _this.$el.append(credit.render().el)\r
+      panel = _this.item.panel()\r
+      panel.fetch().done ->\r
+        panel_icon = new Pettanr.Views.Common.Icon({item: panel, half: true})\r
+        _this.$el.append(panel_icon.render().el)\r
     this\r
   \r
index 200eccd..93c2e1e 100644 (file)
@@ -1,10 +1,18 @@
 class Pettanr.Views.License.Summary extends Backbone.View\r
   \r
   initialize: (options) ->\r
-    super(options)\r
+    @item = options.item\r
   \r
   render: () ->\r
     this.$el.html('')\r
-    this.$el.append('-')\r
+    _this = this\r
+    @system_picture = @item.system_picture()\r
+    @system_picture.fetch({cache: true}).done ->\r
+      img = new Tag.Img({\r
+        attr: {\r
+          src: _this.system_picture.r_url()\r
+        }\r
+      })\r
+      _this.$el.html(img.render().el)\r
     this\r
   \r
index e98dd33..978849b 100644 (file)
@@ -1,10 +1,18 @@
 class Pettanr.Views.PanelPicture.Summary extends Backbone.View\r
   \r
   initialize: (options) ->\r
-    super(options)\r
+    @item = options.item\r
+    @picture = @item.picture()\r
   \r
   render: () ->\r
     this.$el.html('')\r
-    this.$el.append('-')\r
+    _this = this\r
+    @picture.fetch().done ->\r
+      credit = _this.picture.credit_view(false)\r
+      _this.$el.append(credit.render().el)\r
+      panel = _this.item.panel()\r
+      panel.fetch().done ->\r
+        panel_icon = new Pettanr.Views.Common.Icon({item: panel, half: true})\r
+        _this.$el.append(panel_icon.render().el)\r
     this\r
   \r
index 0ecdd85..ccc629d 100644 (file)
@@ -1,10 +1,20 @@
 class Pettanr.Views.Panel.Summary extends Backbone.View\r
   \r
   initialize: (options) ->\r
-    super(options)\r
+    @item = options.item\r
+    @visible = new Tag.Div({\r
+      content: Pettanr.AppHelper.t_selected_item(@visible_t, @item.get(@visible_column_name))\r
+    })\r
+    _this = this\r
+    @author = @item.author()\r
+    @author.fetch({cache: true}).done ->\r
+      _this.author_icon_with_caption = _this.author.icon_with_caption_view(true, 'name', 12)\r
+      _this.render()\r
   \r
   render: () ->\r
     this.$el.html('')\r
-    this.$el.append('-')\r
+    this.$el.append(@visible.render().el)\r
+    if @author_icon_with_caption\r
+      this.$el.append(@author_icon_with_caption.render().el)\r
     this\r
   \r
index 37a69a8..97aedaf 100644 (file)
@@ -4,12 +4,14 @@ class Pettanr.Views.Picture.Credit extends Backbone.View
   \r
   initialize: (options) ->\r
     @item = options.item\r
+    @with_icon = options.with_icon\r
     @url = @item.url + '/credit'\r
   \r
   render: () ->\r
     this.$el.html('')\r
-    p = @item.credit_icon_view()\r
-    this.$el.append(p.render().el)\r
+    if @with_icon\r
+      p = @item.credit_icon_view()\r
+      this.$el.append(p.render().el)\r
     _this = this\r
     f = (data, status) ->\r
       _this.$el.append(data)\r
index 812199a..b8e0ded 100644 (file)
@@ -1,10 +1,14 @@
 class Pettanr.Views.ResourcePicture.Summary extends Backbone.View\r
   \r
   initialize: (options) ->\r
-    super(options)\r
+    @item = options.item\r
+    @picture = @item.picture()\r
   \r
   render: () ->\r
     this.$el.html('')\r
-    this.$el.append('-')\r
+    _this = this\r
+    @picture.fetch().done ->\r
+      credit = _this.picture.credit_view(false)\r
+      _this.$el.append(credit.render().el)\r
     this\r
   \r
index dfac77b..e2450e0 100644 (file)
@@ -1,24 +1,7 @@
-class Pettanr.Views.ScrollPanel.Summary extends Backbone.View\r
+class Pettanr.Views.ScrollPanel.Summary extends Pettanr.Views.Common.Leaf.Summary\r
   \r
   initialize: (options) ->\r
-    @item = options.item\r
-    _this = this\r
-    @scroll = @item.scroll()\r
-    @scroll.fetch({cache: true}).done ->\r
-      _this.scroll_icon = _this.scroll.icon_view(true)\r
-      _this.panel = _this.item.panel()\r
-      _this.panel.fetch({cache: true}).done ->\r
-        _this.panel_icon = _this.panel.icon_view(true)\r
-        _this.author = _this.scroll.author()\r
-        _this.author.fetch({cache: true}).done ->\r
-          _this.author_name = _this.author.name_view(12)\r
-          _this.render()\r
-  \r
-  render: () ->\r
-    this.$el.html('')\r
-    if @author_name\r
-      this.$el.append(@scroll_icon.render().el)\r
-      this.$el.append(@panel_icon.render().el)\r
-      this.$el.append(@author_name.render().el)\r
-    this\r
+    options['binder_item_name'] = 'scroll'\r
+    options['destination_item_name'] = 'panel'\r
+    super(options)\r
   \r
index ea5adbe..8759ad8 100644 (file)
@@ -1,22 +1,7 @@
-class Pettanr.Views.Scroll.Summary extends Backbone.View\r
+class Pettanr.Views.Scroll.Summary extends Pettanr.Views.Common.Binder.Summary\r
   \r
   initialize: (options) ->\r
-    @item = options.item\r
-    @visible = new Tag.Div({\r
-      content: Pettanr.AppHelper.t_selected_item('scroll_visible_items', @item.get('visible'))\r
-    })\r
-    _this = this\r
-    @author = @item.author()\r
-    @author.fetch({cache: true}).done ->\r
-      _this.author_icon = _this.author.icon_view(true)\r
-      _this.author_name = _this.author.name_view(12)\r
-      _this.render()\r
-  \r
-  render: () ->\r
-    this.$el.html('')\r
-    this.$el.append(@visible.render().el)\r
-    if @author_icon\r
-      this.$el.append(@author_icon.render().el)\r
-      this.$el.append(@author_name.render().el)\r
-    this\r
+    options['visible_t'] = 'scroll_visible_items'\r
+    options['visible_column_name'] = 'visible'\r
+    super(options)\r
   \r
diff --git a/app/assets/javascripts/views/sheets/icon.js.coffee b/app/assets/javascripts/views/sheets/icon.js.coffee
new file mode 100644 (file)
index 0000000..c3271f6
--- /dev/null
@@ -0,0 +1,5 @@
+class Pettanr.Views.Sheet.Icon extends Pettanr.Views.Common.Icon\r
+  \r
+  initialize: (options) ->\r
+    super(options)\r
+  \r
index c2f1a3c..16d87ae 100644 (file)
@@ -1,10 +1,7 @@
-class Pettanr.Views.Sheet.Summary extends Backbone.View\r
+class Pettanr.Views.Sheet.Summary extends Pettanr.Views.Common.Binder.Summary\r
   \r
   initialize: (options) ->\r
+    options['visible_t'] = 'sheet_visible_items'\r
+    options['visible_column_name'] = 'visible'\r
     super(options)\r
   \r
-  render: () ->\r
-    this.$el.html('')\r
-    this.$el.append('-')\r
-    this\r
-  \r
index 2367602..eb8fafd 100644 (file)
@@ -1,10 +1,14 @@
 class Pettanr.Views.SpeechBalloon.Summary extends Backbone.View\r
   \r
   initialize: (options) ->\r
-    super(options)\r
+    @item = options.item\r
   \r
   render: () ->\r
     this.$el.html('')\r
-    this.$el.append('-')\r
+    _this = this\r
+    panel = @item.panel()\r
+    panel.fetch().done ->\r
+      panel_icon = new Pettanr.Views.Common.Icon({item: panel, half: true})\r
+      _this.$el.append(panel_icon.render().el)\r
     this\r
   \r
index dffd114..5bb4320 100644 (file)
@@ -1,10 +1,16 @@
 class Pettanr.Views.Speech.Summary extends Backbone.View\r
   \r
   initialize: (options) ->\r
-    super(options)\r
+    @item = options.item\r
+    @speech_balloon = @item.speech_balloon()\r
   \r
   render: () ->\r
     this.$el.html('')\r
-    this.$el.append('-')\r
+    _this = this\r
+    @speech_balloon.fetch().done ->\r
+      panel = _this.speech_balloon.panel()\r
+      panel.fetch().done ->\r
+        panel_icon = new Pettanr.Views.Common.Icon({item: panel, half: true})\r
+        _this.$el.append(panel_icon.render().el)\r
     this\r
   \r
diff --git a/app/assets/javascripts/views/stories/icon.js.coffee b/app/assets/javascripts/views/stories/icon.js.coffee
new file mode 100644 (file)
index 0000000..dd6260e
--- /dev/null
@@ -0,0 +1,5 @@
+class Pettanr.Views.Story.Icon extends Pettanr.Views.Common.Icon\r
+  \r
+  initialize: (options) ->\r
+    super(options)\r
+  \r
index 06b1775..22acf79 100644 (file)
@@ -1,10 +1,7 @@
-class Pettanr.Views.Story.Summary extends Backbone.View\r
+class Pettanr.Views.Story.Summary extends Pettanr.Views.Common.Binder.Summary\r
   \r
   initialize: (options) ->\r
+    options['visible_t'] = 'story_visible_items'\r
+    options['visible_column_name'] = 'visible'\r
     super(options)\r
   \r
-  render: () ->\r
-    this.$el.html('')\r
-    this.$el.append('-')\r
-    this\r
-  \r
index 493bb87..95d86fa 100644 (file)
@@ -1,10 +1,7 @@
-class Pettanr.Views.StorySheet.Summary extends Backbone.View\r
+class Pettanr.Views.StorySheet.Summary extends Pettanr.Views.Common.Leaf.Summary\r
   \r
   initialize: (options) ->\r
+    options['binder_item_name'] = 'story'\r
+    options['destination_item_name'] = 'sheet'\r
     super(options)\r
   \r
-  render: () ->\r
-    this.$el.html('')\r
-    this.$el.append('-')\r
-    this\r
-  \r
index ffac6e3..91801bc 100644 (file)
   </tr>\r
 </table>\r
 </div>\r
+<div width="100%" style="background-color: #ddfadd; padding: 5px;">\r
+  <%= link_to t_m('Folder'), main_app.root_folders_path() %>\r
+  :\r
+  <%= link_to t('tab.reader.title'), '/' %>\r
+  <%= link_to t_m('Scroll'), main_app.scrolls_path %>\r
+  <%= link_to t_m('Panel'), main_app.panels_path %>\r
+  <%= link_to t_m('ResourcePicture'), main_app.resource_pictures_path %>\r
+  :\r
+  <%= link_to t('tab.creator.home'), '/home' %>\r
+  <% if @operators.author %>\r
+    <%= link_to t('tab.creator.scroll'), '/home/scrolls' %>\r
+    <%= link_to t('*'), main_app.new_scroll_path %>\r
+    <%= link_to t('tab.creator.panel'), '/home/panels' %>\r
+    <%= link_to t('*'), main_app.new_panel_path %>\r
+  <% end -%>\r
+  <% if @operators.artist %>\r
+    <%= link_to t('tab.creator.original_picture'), main_app.original_pictures_path %>\r
+    <%= link_to t('*'), main_app.new_original_picture_path %>\r
+    <%= link_to t('tab.creator.resource_picture'), '/home/resource_pictures' %>\r
+  <% end %>\r
+</div>\r
 <%= yield %>\r
 <div width="100%" style="background-color: #faddfa; padding: 5px;">\r
   <%= link_to t('tab.demander.title'), main_app.demanders_path %>\r