- end
-
- def show
- @read_reports = @issue.read_reports
- @unread_reports = @issue.unread_reports
- @comments = @issue.comments
- @related_issues = @issue.user.issues.where(issue_type: @user_role)
- if @issue.updated_by
- @updated_by_admin = User.find(@issue.updated_by)
- end
- end
-
- def new
- unless create_new_issue_params.blank?
- @issue = Issue.find_or_initialize_by(create_new_issue_params)
- path = 'issues.report_strings.' + @issue.reportable.class.name.to_s
- @report_strings_yaml = t(path)
- end
- end
-
- def create
-
- # TODO: Find better place to add these
- admin_issues = [ 'DiaryEntry', 'DiaryComment', 'User']
- moderator_issues = [ 'Changeset' ]
-
-
- @issue = Issue.find_by_reportable_id_and_reportable_type(params[:reportable_id],params[:reportable_type])
- # Check if Issue alrwady exists
- if !@issue
- @issue = Issue.find_or_initialize_by(issue_params)
- @issue.updated_by = nil