@extends('layouts.base')



@section('content')
    <div class="ui container">
        <h1 class="ui header">Szybka notatka</h1>
		
		<div class="ui container">
			<div class="ui one column middle aligned stackable grid">
				<div class="ui column">
					@include('form.create')


                    <form method="POST" class="ui form" action="/printImage" enctype="multipart/form-data">
                        {{ csrf_field() }}
                        <div class="field">
                            <label for="photo">Plik do wydrukowania:</label>
                            <div class="ui fluid file input action">
                                <input type="text" class="url" name="url" placeholder="Wklej link do zdjęcia, albo wybierz plik z dysku obok">
                                <input type="text" readonly>
                                <input type="file" id="photo" name="photo" autocomplete="off" accept=".jpg,.png,.gif,.jpeg,.bmp">
                                <div class="ui button trigger">
                                    Wybierz plik...
                                </div>
                                <button class="ui submit button primary" type="submit" name="print-image">Drukuj</button>
                            </div>
                        </div>
                    </form>
				</div>
			</div>
		</div>
        
		
		
    </div>
    <div class="ui container">

        <h1 class="ui header">Lista notatek</h1>
        <div class="ui middle aligned divided list">

            @foreach($notes as $note)

                <div class="item">
                    <div class="right floated content">
                        <form method="post" action="/print/{{ $note->id }}">
                            {{ csrf_field() }}
                            <button type="primary" class="ui tiny button primary">Drukuj</button>
                        </form>
                    </div>
                    <div class="content">
                        <a href="/edit/{{ $note->id }}/{{ $note->topic_slug?$note->topic_slug:str_limit($note->text, 30, '...') }}"> {{ $note->topic?$note->topic:str_limit($note->text, 30, '...') }} </a>
                    </div>
                </div>


            @endforeach

        </div>

        <div class="ui teal tiny buttons">
            <a class="ui button" href="/repertoire/today">Repertuar dziś</a>
            <div class="ui floating dropdown icon button">
                <i class="dropdown icon"></i>
                <div class="menu">
                    <a class="item" href="/multikino/today">Multikino</a>
                    <a class="item" href="/gdynskiecentrumfilmowe/today">Gdyńskie Centrum Filmowe</a>
                    <a class="item" href="/cinemacity/today">Cinema City</a>
                    <a class="item" href="/helios/today">Helios</a>
                </div>
            </div>
        </div>

        <div class="ui teal tiny buttons pointing top left">
            <a class="ui button" href="/repertoire/tomorrow">Repertuar jutro</a>
            <div class="ui floating dropdown icon button">
                <i class="dropdown icon"></i>
                <div class="menu">
                    <a class="item" href="/multikino/tomorrow">Multikino</a>
                    <a class="item" href="/gdynskiecentrumfilmowe/tomorrow">Gdyńskie Centrum Filmowe</a>
                    <a class="item" href="/cinemacity/tomorrow">Cinema City</a>
                    <a class="item" href="/helios/tomorrow">Helios</a>
                </div>
            </div>
        </div>

    </div>

@endsection