func (VS *Server) reportToHTML(c *gin.Context, user User, r Report) ReportHTML {
	var rep ReportHTML
	rep.ID = r.ID
	rep.User = VS.getUserByID(c, user.ID, "h_view", "reportToHTML", "rep.User = VS.getUserByID").Name
	rep.Text = r.Text
	if r.Photo != "" {
		rep.Photo = "/local/users/" + user.Username + "/reports/" + r.Photo
	}
	rep.Audio = "bug"
	y, m, d := time.Unix(r.Date, 0).Date()
	rep.Date = time.Unix(r.Date, 0).Weekday().String() + ", " + strconv.Itoa(d) + " of " + m.String() + " of " + strconv.Itoa(y)
	rep.Type = strings.Title(string(r.Type))
	rep.IsClose = r.IsClose
	rep.Village = VS.getVillageByID(c, r.IDVillage, "h_view", "reportToHTML", "rep.Village = VS.getVillageByID").Name
	return rep
}
// Create the human readable information for one Report
Create the human readable information for one Report
// Create the human readable information for one Report
func (VS *Server) reportToHTML(c *gin.Context, user User, r Report) ReportHTML {
	var rep ReportHTML
	rep.ID = r.ID
	rep.User = VS.getUserByID(c, user.ID, "h_view", "reportToHTML", "rep.User = VS.getUserByID").Name
	rep.Text = r.Text
	if r.Photo != "" {
		rep.Photo = "/local/users/" + user.Username + "/reports/" + r.Photo
	}
	rep.Audio = "bug"
	y, m, d := time.Unix(r.Date, 0).Date()
	rep.Date = time.Unix(r.Date, 0).Weekday().String() + ", " + strconv.Itoa(d) + " of " + m.String() + " of " + strconv.Itoa(y)
	rep.Type = strings.Title(string(r.Type))
	rep.IsClose = r.IsClose
	rep.Village = VS.getVillageByID(c, r.IDVillage, "h_view", "reportToHTML", "rep.Village = VS.getVillageByID").Name
	return rep
}
func ( VS * Server ) reportToHTML ( c * gin . Context , user User , r Report ) ReportHTML { var rep ReportHTML rep . ID = r . ID rep . User = VS . getUserByID ( c , user . ID , " " , " " , " " ) . Name rep . Text = r . Text if r . Photo != " " { rep . Photo = " " + user . Username + " " + r . Photo } rep . Audio = " " y , m , d := time . Unix ( r . Date , 0 ) . Date ( ) rep . Date = time . Unix ( r . Date , 0 ) . Weekday ( ) . String ( ) + " " + strconv . Itoa ( d ) + " " + m . String ( ) + " " + strconv . Itoa ( y ) rep . Type = strings . Title ( string ( r . Type ) ) rep . IsClose = r . IsClose rep . Village = VS . getVillageByID ( c , r . IDVillage , " " , " " , " " ) . Name return rep }
Create the human readable information for one Report
Create the human readable information for one Report