Exemple #1
0
// Display shows the default page for the repository
func (controller *Repository) Display() {
	repository := controller.GetRepository()
	controller.Data["processes"] = harvest.GetProcessesByRepository(repository.ID, 5)
	controller.Data["institution"] = repository.GetInstitution()
	controller.Data["identification"] = repository.GetIdentification()
	controller.LoadTemplate("home")
}
Exemple #2
0
// ClearRepository deletes all records, formats, collections,
// emails and information about the repository
func (controller *Repository) ClearRepository() {
	repository := controller.GetRepository()
	processes := harvest.GetProcessesByRepository(repository.ID, 0)
	for _, process := range processes {
		process.Delete()
	}
	wisply.ClearRepository(repository.ID)
	controller.RemoveLayout()
	controller.ShowBlankPage()
}