<link rel="stylesheet" href="<?php echo base_url(); ?>css/modules/aktualnosciModule.css" type="text/css" media="screen" title="default" />
				<!--<p style="margin-bottom: 10px;"><?php foreach($parents as $node){
					echo '<img src="'.base_url().'images/icon_arrow.png" align="baseline" style=" position:relative; top:4px;" /><a href="'.base_url().'admin/wyswietl/'.$node->id.'">'.$node->nodeData['name'].'</a>';
				 } 
				echo '<img src="'.base_url().'images/icon_arrow.png" align="baseline" style=" position:relative; top:4px;" /><a href="'.base_url().'admin/module/'.$this->uri->segment(3).'">'.$module->modules_name; ?></a> </p>
				
				
				<div id="navigationContener">
				<p ><img src="<?php echo base_url(); ?>images/navigation_head_icon.png" align="absmiddle" style="" /> <?php foreach($parents as $node){
					echo '<img src="'.base_url().'images/next_navigation.png" align="absmiddle" style="" /><a href="'.base_url().'admin/wyswietl/'.$node->id.'">'.$node->nodeData['name'].'</a>';
				 } 
				 echo '<img src="'.base_url().'images/next_navigation.png" align="absmiddle" style="" /><a href="'.base_url().'admin/module/'.$this->uri->segment(3).'">'.$module->modules_name.'</a>';
				?> </p>
                </div>-->
                
                <div class="breadcrumb ui-corner-tl ui-corner-tr">
                <div style="float:left; position:relative;"><img class="breadcrumbIcon" align="absmiddle"  src="<?php echo base_url();?>images/homePage.png" /><a href="<?php echo base_url(); ?>">Strona WWW</a><img src="<?php echo base_url(); ?>images/breadcrumbSeparator.png" align="absmiddle" style="" /></div>
                <?php
				$counter = count($parents);
				$count = 1;
				$lastNode = null;
				 foreach($parents as $node){
					 
					echo '<div class="contenerNodeBreadcrumb"><img src='.base_url().'images/newspaper.png align="absmiddle" class="breadcrumbIcon"><a href="'.base_url().'admin/wyswietl/'.$node->id.'">'.truncate($node->nodeData['name']).'</a>';
				//	if($counter==$count) echo '<img style="position:absolute; left:40%; top:32px;" src='.base_url().'images/pointer_breadcrumb.png /> ';
				
					echo '</div><img src="'.base_url().'images/breadcrumbSeparator.png"  align="absmiddle"  class="separatorBreadcrumb" />'; 
				 $count++;
				 $lastNode = $node; 
				 } 
				 echo '<div class="contenerNodeBreadcrumb"><img src="'.base_url().'images/brick_mini.png" align="absmiddle" class="breadcrumbIcon" /><a  href="'.base_url().'admin/module/'.$this->uri->segment(3).'">'.truncate($module->modules_name).'</a> <img class="pointerBreadcrumb" src='.base_url().'images/pointer_breadcrumb.png /></div>';
				?>
                <a href="<?php echo base_url()?>admin/wyswietl/<?php echo $lastNode->id ?>"><img src="<?=base_url(); ?>images/back_cms_main.png" border="0" style="float:right;"></a>
                </div>		
				<br/>
				<div id="newNews" >
				
            
					<form style="display: none;" id="newNewsForm" method="post" action="<?php echo base_url(); ?>admin/addnews">
                        <div class="contenerGreyLight ui-corner-all">
                     <!-- ??? -->
					<table border="0" cellpadding="0" cellspacing="0"  id="id-form">
						<tr>
							<th valign="top">Tytuł:</th>
							<td><table><tr id="input-title">
								<td><input type="text" class="inp-form" name="title" /></td>
								<td class="error-td">
							
								</td>
							</tr></table></td>
						</tr>
						<tr>
							<th valign="top">Data ważności:</th>
							<td><table><tr id="input-expiration_date">
								<td><input id="date-pick" type="text" class="inp-form" name="expiration_date" /></td>
								<td class="error-td">
							
								</td>
							</tr></table></td>
						</tr>
						<tr>
							<th valign="top">Treść skrócona:</th>
							<td><table><tr id="input-text_short">
								<td><!--<textarea name="text_short" class="inp-form ckeditorContener"></textarea>-->
								<?php echo $this->ckeditor->editor("text_short", '', 'class="inp-form ckeditorContener"'); ?>
								</td>
								<td class="error-td">
							
								</td>
							</tr></table></td>
						</tr>
						<tr>
							<th valign="top">Treść pełna:</th>
							<td><table><tr id="input-text">
								<td><!--<textarea name="text" class="inp-form ckeditorContener"></textarea>-->
								<?php echo $this->ckeditor->editor("text", '', 'class="inp-form ckeditorContener"'); ?>
								</td>
								<td class="error-td">
							
								</td>
							</tr></table></td>
						</tr>
						<tr>
						  <th valign="top">&nbsp;</th>
						  <input type="hidden" name="module_id" value="<?php echo $this->uri->segment(3); ?>"/>
						  <td align="left">  <a  style="margin-left:10px;" class=" button buttonBlack submit" ><img src="<?php echo base_url(); ?>images/add.png" />Zapisz</a>
						  <a  class=" button buttonBlack" id="newNewsCancel" ><img src="<?php echo base_url(); ?>images/cancel.png" />Anuluj</a>
						  </td>
						</tr>
					</table>	
						</div>	
							
					
					<!--<input type="submit" value="Dodaj" style="width: 200px;" /><button id="addNewsCancel" style="width: 200px;">Anuluj</button>-->
					</form>
                    
					<button class=" button buttonGreen addIcon" id="newNewsShowForm"><img src="<?php echo base_url(); ?>images/buttons/add_icon.png">Nowa aktualność</button>
					<div id="addedNews">
					<script type="text/javascript" src="<?php echo base_url(); ?>js/submitDelete.js"></script>
					<br/>
					
						<?php if($news && $news->num_rows() > 0) {
							?> <br />
<br />

							<h2>Dodane aktualności</h2>
							<?php 
							
							foreach($news->result() as $singlenews){ ?>
								<div class="singlenews contenerSingleNews ui-corner-all">
								<h3><?php echo $singlenews->news_title ?></h3>
								<div style="width:100%;"><?php echo $singlenews->news_text_short ?></div>
								<?php 
								/*
								 $singlenews->news_text, $singlenews->news_expiration_date, $singlenews->news_added
								 */
								?><br />

							
								<a  class=" button buttonLightGrey" href="<?php echo base_url(); ?>admin/news/<?php echo $singlenews->ID_news; ?>"><img src="<?php echo base_url(); ?>images/pencil.png" />Edycja</a>
                            	<a  class="usunnews button buttonLightGrey" href="<?php echo base_url(); ?>admin/removenews/<?php echo $singlenews->ID_news; ?>/<?php echo $singlenews->news_module_id; ?>"><img src="<?php echo base_url(); ?>images/bin.png" />Usuń</a>
                            	<br/><br/>
                            	</div>
							<?php }
														
						}?>
					</div>
				</div>
				<!--<button id="addNews" style="width: 200px;">Nowy wpis</button>-->
				
				
				
						
			
				
						
				