Skip to content

Instantly share code, notes, and snippets.

View elmarputz's full-sized avatar

Elmar Putz elmarputz

  • Studio Mitte Digital Media GmbH
  • Linz, Austria
View GitHub Profile
<div class="ui grid" *ngIf="book">
<div class="four wide column">
<img class="ui large image" *ngIf="book.images && book.images[0]"
[src]="book.images[0].url">
</div>
<div class="twelve wide column">
<h1 class="ui header">{{ book.title }}</h1>
<h3 class="ui header">{{ book.subtitle }}</h3>
<div class="ui divider"></div>
<div class="ui grid">
<div class="ui middle aligned selection divided list">
<a *ngFor="let book of books" class="item">
<img class="ui tiny image"
*ngIf="book.images"
[src]="book.images[0].url">
<div class="content">
<div class="header">{{ book.title }}</div>
<div class="description"> {{ book.subtitle }} </div>
<div class="metadata">
ngOnInit() {
this.books = [
new Book(1,
'9783864903571',
'Angular',
[new Author(1,'Johannes', 'Hoppe'), new Author(2,'Danny','Koppenhagen'),
new Author(3,'Ferdinand','Malcher'), new Author(4,'Gregor', 'Woiwode')],
new Date(2017, 3, 1),
1,
'Grundlagen, fortgeschrittene Techniken und Best Practices mit TypeScript - ab Angular 4, inklusive NativeScript und Redux',
public function update(Request $request, string $isbn) : JsonResponse
{
DB::beginTransaction();
try {
$book = Book::with(['authors', 'images', 'user'])
->where('isbn', $isbn)->first();
if ($book != null) {
$request = $this->parseRequest($request);
$book->update($request->all());
{
"isbn":"24543534332342431",
"title":"Erstes neues Buch",
"user_id": 1,
"rating" : 3,
"authors":[{
"id":3,
"firstName":"Karl",
"lastName":"Huber"
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $exception
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $exception)
{
/**
plugin.tx_news {
view {
# 1 is current template, 0 is fallback
templateRootPaths {
0 = EXT:news/Resources/Private/Templates/
1000 = fileadmin/templates/HTMLTemplates/Extensions/news/Resources/Private/Templates/
}
partialRootPaths {
0 = EXT:news/Resources/Private/Partials/
1000 = fileadmin/templates/HTMLTemplates/Extensions/news/Resources/Private/Partials/
config {
debug = 1
doctype = html5
htmlTag_setParams = none
htmlTag_stdWrap {
setContentToCurrent = 1
cObject = COA
cObject {
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<article>
<span class="{data.subheader}"></span>
<div class="content">
<h3>{data.header}</h3>
<f:format.html>{data.bodytext}</f:format.html>
</div>
</article>
</html>
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<div id="c{data.uid}" class="content">
<f:if condition="{data.header}">
<header>
<h1>{data.header}</h1>
<p>{data.subheader}</p>
</header>
</f:if>
<f:if condition="{data.bodytext}">