Commit 0a62ae2b2649623dace3e6d99f28d02946021a65
1 parent
957bdd63
Exists in
staging
and in
4 other branches
define a lobby note title dinamically
Showing
1 changed file
with
7 additions
and
0 deletions
Show diff stats
plugins/notification/lib/notification_plugin/lobby_note_content.rb
| 1 | 1 | class NotificationPlugin::LobbyNoteContent < Event |
| 2 | 2 | |
| 3 | + before_validation :set_title | |
| 4 | + | |
| 3 | 5 | def self.short_description |
| 4 | 6 | 'Lobby note for gatekeepers' |
| 5 | 7 | end |
| ... | ... | @@ -8,6 +10,11 @@ class NotificationPlugin::LobbyNoteContent < Event |
| 8 | 10 | 'Notify gatekeeper' |
| 9 | 11 | end |
| 10 | 12 | |
| 13 | + def set_title | |
| 14 | + self.name = _('Notification %s') % self.profile.lobby_notes.count unless self.profile.nil? | |
| 15 | + end | |
| 16 | + | |
| 17 | + | |
| 11 | 18 | #FIXME make the html output specific |
| 12 | 19 | # def to_html(options = {}) |
| 13 | 20 | # source = options["source"] | ... | ... |