Set user preferences for messages

pull/1610/head
Hagen Schink 10 years ago
parent febe47c223
commit bb9e666ef1
  1. 4
      app/assets/javascripts/angular/controllers/messages-controllers.js
  2. 4
      app/controllers/boards_controller.rb

@ -28,7 +28,7 @@
angular.module('openproject.messages.controllers')
.controller('MessagesController', ['$scope', '$http', 'PathHelper', 'TimezoneService', 'SortService', 'PaginationService', function ($scope, $http, PathHelper, TimezoneService, SortService, PaginationService) {
.controller('MessagesController', ['$scope', '$http', 'PathHelper', 'SortService', 'PaginationService', function ($scope, $http, PathHelper, SortService, PaginationService) {
$scope.PathHelper = PathHelper;
$scope.messages = gon.messages;
$scope.totalMessageCount = gon.total_count;
@ -36,8 +36,6 @@ angular.module('openproject.messages.controllers')
$scope.projectId = gon.project_id;
$scope.activityModuleEnabled = gon.activity_modul_enabled;
TimezoneService.setTimezone(gon.timezone);
SortService.setColumn(gon.sort_column);
SortService.setDirection(gon.sort_direction);

@ -67,7 +67,9 @@ class BoardsController < ApplicationController
gon.sort_column = 'updated_on'
gon.sort_direction = 'desc'
gon.total_count = @board.topics.count
gon.timezone = User.current.time_zone ? ActiveSupport::TimeZone::MAPPING[User.current.time_zone.name] : ""
gon.settings = {
user_preferences: current_user.pref
}
@message = Message.new
render :action => 'show', :layout => !request.xhr?

Loading…
Cancel
Save