This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% @comments.each do |comment| %> | |
<div class="feed-element"> | |
<div class="media-body" style="font-size:14px;"> | |
<span class="pull-right text-navy"><%= time_ago_in_words(comment.updated_at) %> ago</span> | |
<strong><%= comment.user.username %></strong> updated this service request. | |
<br> | |
<small class="text-muted"><%= @servicerequest.created_at.to_time.strftime('%B %e at %l:%M %p') %></small> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function () { | |
"use strict"; | |
$(function () { | |
$(".preloader").fadeOut(); | |
}); | |
jQuery(document).on('click', '.mega-dropdown', function (e) { | |
e.stopPropagation() | |
}); | |
// ============================================================== | |
// This is for the top header part and sidebar part |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="row clearfix"> | |
<% if todo_item.completed? %> | |
<div class="complete"> | |
<%= link_to complete_todo_list_todo_item_path(@todo_list, todo_item.id), method: :patch do %> | |
<i style="opacity: 0.4;" class="fa fa-check"></i> | |
<% end %> | |
</div> | |
<div class="todo_item"> | |
<p style="opacity: 0.4;"><strike><%= todo_item.content %></strike></p> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Project < ApplicationRecord | |
include AttachmentUploader[:file] | |
has_one :proj_status, :foreign_key => "status_id", :primary_key => 'status_id' | |
belongs_to :user | |
has_many :comments, dependent: :destroy | |
has_many :uploads, dependent: :destroy | |
scope :newproj, lambda { where(:status_id < 1)} | |
validates_presence_of :projname, {:message => "Project Name cannot be blank."} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% if object.errors.any? %> | |
<div class="panel panel-danger"> | |
<div class="panel-heading" id="error_explanation"> | |
<h2><%= pluralize(object.errors.count, "error") %> | |
prohibited this project from being saved:</h2> | |
<ul> | |
<% object.errors.full_messages.each do |message| %> | |
<li><%= message %></li> | |
<% end %> |