<commit_before><?php
defined('BASEPATH') OR exit('No direct script access allowed');

class MainPage extends CI_Controller {

	public function index() {
		$this -> load -> helper('url');
		$this -> load -> view('main_page');
	}

	public function loadRecords() {
		$table = '<div class="col-md-12">
					<table class="table table-striped">
						<thead>
							<tr>
								<th>ID</th>
								<th>Evento</th>
								<th>Descripcion</th>
								<th>Fecha Alta</th>
								<th>Prioridad</th>
								<th width="25%">Acciones</th>
							</tr>
						</thead><tbody>{%content%}</tbody></table>
				</div>';
		$row = '<tr>
					<td>1</td>
					<td>2</td>
					<td>3</td>
					<td>4</td>
					<td>5</td>
					<td><div class="btn-group">
						<button class="btn btn-primary">Edit</button>
						<button class="btn btn-info">View</button>
						<button class="btn btn-danger">Remove</button>
					</div></td>
				</tr>';		
		$content = "";
		for ($i = 0; $i < 10; $i++) {
			$content .= $row;
		}

		echo str_replace('{%content%}', $content, $table);
	}
	
	public function modalAdd(){
		$this ->load -> view("modalAdd");
	}

}
?>
<commit_msg>adding controller of editModal<commit_after><?php
defined('BASEPATH') OR exit('No direct script access allowed');

class MainPage extends CI_Controller {

	public function index() {
		$this -> load -> helper('url');
		$this -> load -> view('main_page');
	}

	public function loadRecords() {
		$table = '<div class="col-md-12">
					<table class="table table-striped">
						<thead>
							<tr>
								<th>ID</th>
								<th>Evento</th>
								<th>Descripcion</th>
								<th>Fecha Alta</th>
								<th>Prioridad</th>
								<th width="25%">Acciones</th>
							</tr>
						</thead><tbody>{%content%}</tbody></table>
				</div>';
		$row = '<tr>
					<td>1</td>
					<td>2</td>
					<td>3</td>
					<td>4</td>
					<td>5</td>
					<td><div class="btn-group">
						<button class="btn btn-primary" onclick="modalEdit()">Edit</button>
						<button class="btn btn-danger">Remove</button>
					</div></td>
				</tr>';		
		$content = "";
		for ($i = 0; $i < 10; $i++) {
			$content .= $row;
		}

		echo str_replace('{%content%}', $content, $table);
	}
	
	public function modalAdd(){
		$this ->load -> view("modalAdd");
	}
	
	public function modalEdit(){
		$this ->load -> view("modalEdit");
	}

}
?>

{'fraction_non_alphanumeric': 0.2172797262617622, 'fraction_numerical': 0.010265183917878529, 'mean_word_length': 2.643302180685358, 'pattern_counts': {'":': 0, '<': 93, '<?xml version=': 0, '>': 105, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3935381', 'n_tokens_mistral': 1128, 'n_tokens_neox': 842, 'n_words': 171}